MyBB Community Forums

Full Version: Poll On Index missing date.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, first of all I need to thank Yaldaram for putting up with me on this issue previously.

I've just installed the plugin called "Poll On Index" created by Krafdi and it's great. I like it a lot and it's really helped boost the participation in our polls even in just a few days.

However there's a problem. The poll that's on the index.php page doesn't show the date the poll is closing. However the poll on the thread view does.

Now I had a problem with this back in the day when none of my polls would display the ending date and was able to get that solved with help from Yaldaram. I've gone back and re-applied the fixes he suggested to me in this thread, but it's just not working.

So to sum up, normal poll show ending date, poll that's posted over on the index page isn't showing the date.

Any ideas, super friends?
Alright, you need to edit the plugin file too to display ending time and date.

Open plugin file and find;
		$expiretime = $poll['dateline'] + $poll['timeout'];
and Add the following code just below that;
        $enddate = my_date($mybb->settings['dateformat'], $poll['dateline'] + $poll['timeout']);
        $endtime = my_date($mybb->settings['timeformat'], $poll['dateline']);

It'll display ending time and date on the Index as well Wink
That did it!

Thank you so much for your help. I'm going to email this to the guy that made the plugin, assuming I can find him, and see if I can get him to add this.
You're welcome Smile