HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Help on increasing Max Poll Block search list

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#75348 (In Topic #15618)
Avatar

Community saint

Poll archive list limited to first 100

It appears that the main_poll block search list is limited to the first 100 entries.

I could not find where this limit is setup after investigating setup, php blocks and tpl.

Please advise,

Thank you,
Jean
Back to the top
 
Posted
Rating:
#75353
Avatar

Hi,

Line 678 of sources/misc_scripts.php.

Now you point it out, I can see it's not even sorted. Should be last 100, really. New line:

Code

$rows=$GLOBALS['SITE_DB']->query_select('poll',array('id','question'),NULL,'ORDER BY id DESC',100/*In case insane number*/);

Sometimes the nice block UI may make it impossible to type exactly what you want, and since we remove visibility of the Comcode, manually typing requires disabling the WYSIWYG editor to do it.

Chris


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#75366
Avatar

Community saint

*In case insane number* LOL. Indeed, since my students discovered that images can be used in polls, they are having fun with this medium. A similar situation is developing with the Quiz, creating more interest to produce better and fun content on the site.

Thanks for the code Chris, but after the usual cache clearing procedures, the Poll Block search list still shows the same 100 polls. I've tested the edited file for the correct new line and re-cached with no change.

Disabling the WYSIWYG editor enables me to edit the poll id and add them to the forum poll collection. So there is no emergency here.

Here is the new line in context:
Back to the top
 
Posted
Rating:
#75402
Avatar

Community saint

Looks like you've placed the code in the wrong place, it should be in the next elseif block. The line your modified was for chat_rooms, not for main_poll. Also, the new line should replace the old line. It's not an additional line.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#75414
Avatar

Community saint

temp1024 said

Looks like you've placed the code in the wrong place, it should be in the next elseif block. The line your modified was for chat_rooms, not for main_poll. Also, the new line should replace the old line. It's not an additional line.

Perfect, Temp!:thumbs:

How could I have missed that?

I must change my glasses as I could only see the line numbers it seems.LOL.




You're ever the expert coder, Temp. Thank you!:)
Jean
Back to the top
 
Posted
Rating:
#75430
Avatar

Community saint

Temp is rather amazingly good and quite an asset to these forums.

Bob
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: