Version: 1.00, by noppid
Developer Last Online: Sep 2015
Version: 2.3.x
Rating:
Released: 05-04-2003
Last Update: Never
Installs: 12
No support by the author.
A user requested that if a poll is closed the thread be preceeded by Closed Poll: instead of just Poll:.
Here's a few lines of code that did it for us. (see attachment )
All you have to do is insert a few lines of code to forumdisplay.php.
Good luck, hope it helps.
History:
1.4
Added closed poll functionality to search.php in showresult function.
1.3
Added field to poll table lookup.
Added condition to show poll closed when timeout has occured.
Elimiated HTML tags for bold since the default vB prefixes are not bold.
1.2
Removed HTML tag for font color.
1.1
Added condition to show poll closed if thread or poll is closed.
1.0
Initial release.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Yesterday at 08:15 PM WEForums said this in Post #8 ...doesn't seem to do anything....strange.....
EDIT: Nevermind. It doesn't work when locking a poll (locking the entire thread, that is).
We do not have this issue. When we lock a thread with a closed poll, the closed poll tag still shows. Maybe you can show the block of code you edited so we can debug.
Today at 12:21 AM noppid said this in Post #10 A query occurs for each thread with a poll attached that is going to be displayed to see if it is open or closed.
The guys that wrote vB are sharp, we're not dealing with "ALL" the posts in the forum when we do a display. We get the number of threads that is set in the admin panel displayed. So, if I'm reading this code correctly, a forum display of 15 threads occuring would yield - worst case senario if all 15 threads have polls - 15 additional queries per forumdisplay. This is usually about 3 or 4 from what I've seen. Boards with more polls may want to be aware of the over head though.
Thanks. That help?
Regards
I have a forum that is just for polls. So all of the threads would have polls. Ouch.
Today at 01:38 AM Boofo said this in Post #12 I have a forum that is just for polls. So all of the threads would have polls. Ouch.
When ya think about it in the terms of the amount of queries some pages have, IMHO 15 indexed queries is not really an ouch. I'd think most of the lookups would actually be cached after the first time it ran as well. If you have a way of benchmarking then perhaps a true measure of the overhead could be taken. I'm curious to know how effiecent a single field indexed lookup is or isn't.
Your idea here might be a good thing to add to my Polls Start Date and Time hack. I could have it automatically do a Poll Closed when the poll is over. Could I save some queries doing it that way?
Unfortunatly I'm not familiar with the code you refer to, but I'd be glad to look at it. Perhaps we can create a tighter piece of code for the Poll closed hack.
Got a link? Can ya post the code snippet for the hack and where it goes in what form?
Today at 06:27 AM noppid said this in Post #11 We do not have this issue. When we lock a thread with a closed poll, the closed poll tag still shows. Maybe you can show the block of code you edited so we can debug.
Regards
I followed the instructions. I created a new thread, locked the entire thread, and get "Poll:" still.