![]() |
Poll Start - End - Days Run/Remaining Hack v1.1
Poll Start - End - Days Run/Remaining Hack
Version 1.1 (By Boofo and Zzed) What this hack does: It will list the Start Date, End Date, Days to Run and the Days remaining for a poll in both the forumdisplay (under the thread title) and the showthread (under the poll question or status). If the poll does not have an ending time, the Start Date, End Date, Days to Run and Days Remaining will not show up. Files to edit: 2 (forumdisplay.php, showthread.php) Templates to edit: 3 (forumdisplaybit, showthread_polloptions, showthread_pollresults) Install Time: 5 minutes (if you are REALLY slow) Version 1.0 - Initial release Version 1.1 - Fixed the error that a few people were having with the poll start and end time showing up in each thread instead of just the thread it was intended for. French translation of this hack in post 7. Screenshots in posts 4, 5 and 6 below. If you find this hack useful, please click the install button. |
Thanks for this hack i will install it imediatly.
|
You're very welcome. Enjoy! ;)
|
Image from a poll with a start and end date. This is the forumdisplay view.
|
Image from a poll with a start and end date. This is the poll view.
|
Image from a poll with NO start and end date. This is the poll view.
|
Here is the French translation of this hack (provided by Mathieu).
|
He very cool Hack!!
Thanks for sharing with us! Kars /me kicks installed! |
No problemo. Glad you like it. See you on the site. ;)
|
Pretty cool Boofo, a nice addon for my Gamblick addon.
Well done. |
Thank you, sir. Coming from you, that means alot. ;)
|
Nice hack buddy - you sure love using the date systems in php don't you ;)
- miSt |
If you really think about it, that is the main backbone of vBulletin. I love the $ourtimenow variable. Can't get enough of it. ;)
And Zzed came up with the core of the code. I just re-worked it to fit what we needed. ;) |
Nice one Boofo - I'll add this to my install list :cool:.
|
Quote:
And thank you for your kind words. :) |
I installed it in vb 2.3.0 and it seams to be showing in almost all the threads :surprised: Something in the forumdisplay.php ??
|
If you have a start time and end time configured with the poll, it will show. It you don't have an ending time configured, it will not show. Check your polls and see how many of them are set up with the start and end time. ;)
|
NO, sorry my fault. Perhaps i should include a screenshot to explain :p They all have the same start and end date as the test poll i just posted. so if you set all the polls of the forum not to time out it does not display like the screenshot
|
Quote:
$thread[pagenav]$pollrun I had that happen as I was putting this together before I added: PHP Code:
Please recheck the instructions and make sure everything is there and let me know. There's really no way that should be happening unless you either missed a piece of code or got it in the wrong place. ;) |
nice job., Boofo :)
|
So where abouts do i add
PHP Code:
|
Quote:
|
Quote:
|
Boofo,
I just experienced the same problem as the guy above. Once a poll is created in any forum and is given a expiration date, all of the threads in that forum inherits the poll start and expiration date printed under all threads. If you don't enter a expiration date, everything works fine. Also i've noticed that if someone uses the "Move with redirect" ... it in advertantly adds the polls start/exp date to each thread in that forum where the "Move with Redirect" was applied. |
Was it working fine before? I have not experienced that at all on my forums. It works like clock-work. I will look into it and see if I can figure out what is going on.
|
My Vb version is 2.3.0 RC3
|
Stud_Muffin & Rolodex - Try the following code. Replace it in both the forumdisplay.php and showthread.php files
Find: PHP Code:
PHP Code:
|
Nope that definaltey does not work. It has to be a problem in one of the IF statements then. Calloing for the wrong variable.
But I am using 2.2.9 and am having the same problem. |
I am running 2.2.9 and using the same exact code and it works fine for me and the others who have installed it. Recheck the instructions and make sure you have entered it into the right templates.
|
Getting the same thing for me on VB 2.2.9 followed the instructions carefully as listed and it's displaying the run time on all threads including polls :(
|
I'm looking into this now. I will be sending an update with whatever fix I find to anyone who has installed this and clicked the install button.
|
Remove this (high-lighted):
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= In the "forumdisplaybit" template Find: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $thread[pagenav] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Replace it with: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $thread[pagenav]$pollrun =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Everything should work! ;) |
hi Boofo, you know my english is not the best, but i thing you unterstand if i say "your Hack is very fine, it works*
thank you subu1 |
ups, i dont see in my forum display, i have the same problem with the other Friends here, i have 2.2.8
|
Quote:
ok i have removed $pollrun now it will work :classic: I hope so :bunny: |
Ok, we think some global info might be carrying over to the other polls. Try this fix and it should take care of any problems you guys have been having with this hack.
Look for: PHP Code:
PHP Code:
|
sorry,it work not
|
Try this:
PHP Code:
|
Look guys,
All you need to do is *remove* what I said above and the dang hack will work without error. It worked for me ... that whole bit of code is un-necessary |
Quote:
|
All times are GMT. The time now is 03:51 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|