Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 

The free forums are now under new ownership, a full announcement will be made shortly

       myfreeforum.org Forum Index -> Portal components
Bravo

Most viewed poll portal

I have looked at such as 'editors choice' for this but I don't think it is in there.

What I would like to do is have a portal that displays the most viewed posts, and limit the search to polls only.

The reason for this, is that I am displaying video tutorials as a poll (to act as a rating system), and would like to display the most popular tutorials as far as views are concerned.

Is this possible?  If so, which component would best suit my needs? (If not possible, no worries, would just be a nice touch but nothing earth shattering)

The forum this is for is: http://vidtuts.myfreeforum.org/index.php

A potential problem could arise as I have set most of the tutorials as registered to view only, as that way people are much more inclined to vote/rate the tutorial...they wouldn't register just to vote if they had already seen the tutorials they wanted (the MFF ones are public viewing btw)...so I would still like the portal to display links to these tutorials if that is possible (again if not, no worries).
myff admin

Is this not an extension to the POPULAR portal, setting it to filter based on topic type and whether a poll exists.

e.g. like "Search Type"  in any of the SEARCH portals, but with polls added as a type.
Bravo

Ah, I thought the popular one was based on replies rather than views....silly me.

I'll have a search on HowToDoIt on how to limit it to polls.

Thanks Admin
myff admin

You cannot limit it to polls!

But I will add this.
Bravo

For the type of editing I seek, it appears not to be on HTDI, though I found this.  So I would assume, to limit the search to polls, I would edit my cms_popular.tpl

Code:
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<!--BEGIN switch_popular_title -->     
   <tr>
        <th colspan="1"  class="thTop" nowrap="nowrap">{POPULAR_TITLE}</th>
     </tr>
<!--END switch_popular_title -->          
  <!-- BEGIN popular -->
  <tr>
   <td class="row1"><span class="topictitle"><a href="{popular.U_TITLE}" class="topictitle">{popular.TITLE}</a></span></td>
  </tr>
  <!-- END popular -->
</table>


Now, looking at editorschoice (which is the best one I found that has this tye of exclusive searching), it looks like I need to add something like this

show_results="polls"; ?

The only numbers I could find were these:

NORMAL - 0
STICKY - 1
ANNOUNCE - 2
GLOBAL_ANNOUNCE - 3
FRONTPAGE - 4
TOP - 5
ARCHIVE - 6
EDITORSCHOICE - 7
OPENTICKET - 8

None of these allude to polls?

The filter section seemed to only relate to user type commands.

So, I am assuming I would edit the cms_popular.tpl but would I have to set up the parameters elsewhere first?  If so, where?  And what would be the command word or number for polls?

Or, if I am on completely the wrong track, just say 'there there Bravo' and I'll forget it
Bravo

admin (no pm's please) wrote:
You cannot limit it to polls!

But I will add this.


Bloody hell I typed all that lot out      

Ok, Admin, cheers  
Bravo

Oh, while I am at it, the search limiter to 1,000 posts.....in my case, it would be better if that could be limitless, as this would be a way of keeping the early (yet still useful) tutorials accessible for people...then again, I don't know if a limitless search could potentially clog up the system?  

I tried entering a value of 0, to see if that set it to limitless but it did as it said on the tin and turned up zero results  

If this could clog up the system then again it's not a major issue, after all I am making all the titles and text in a search friendly way anyway, so that should suffice.

Also, adding the 'poll' option on this:  Honestly, if it is a lot of work, please don't do it, as it can't really be a popular desire otherwise it would be in by now already...though a 'most popular polls' might be of benefit to some as a portal?
myff admin

http://forum.myfreeforum.org/sutra103688.php#103688

why not just make the number very large?
Bravo

admin (no pm's please) wrote:
why not just make the number very large?


Ok, can do that...just wanted to make sure a large number wont bugger things up...didn't want to risk causing it to 'hang' or anything like that..is there a max? (65535 perhaps)

Anyway, thanks for sorting this out so easily and so quickly (at least easy to use, not sure about how easy to code).
myff admin

the number is 32bit and hence size is not an issue.

quite trivial to code, only issue being a poll is a different database field to a topic_type, so a very little twiddling needed doing.

The portals always were meant to be extended to meet peoples needs.

       myfreeforum.org Forum Index -> Portal components
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum