I was just wondering if there's a way (or more likely where I'm missing the place) to set the amount of days left on a poll to display.
I'm looking a poll I've put at right now and it doesn't have any place to indicate how many days are left to vote on said poll.
As I said, I've probably looked right at it 3-4 times now and just missed it, but any help would be super awesome.
Thanks a lot!
There is an option while creating a poll, Poll Timeout: This is the number of days from the poll creation date until the poll is automatically closed and users will not be able to vote any more.
More info:
http://wiki.mybb.com/index.php/Polls
Yeah, I know that. I set it to X amount of days before it closes, but there's nothing on the actual poll itself that says "This Poll Will Close in X Days".
That's what I'm looking for.
I believe you found a bug. I've edited a core file and few templates, so I'm sharing this with you.
Open ./showthread.php and find;
$expiretime = $poll['dateline'] + $poll['timeout'];
and Replace it with the following code;
$expiretime = $poll['dateline'] + $poll['timeout'];
$enddate = my_date($mybb->settings['dateformat'], $poll['dateline'] + $poll['timeout']);
$endtime = my_date($mybb->settings['timeformat'], $poll['dateline']);
Now Go to: ACP > Templates > Showthread Templates > showthread_poll > and find;
{$lang->poll} {$poll['question']}</strong>
and add the following code just after that;
<br/>
<div class="smalltext">This poll will end on {$enddate} , {$endtime}</div>
Similarly open "showthread_poll_results" template and find;
{$lang->poll} {$poll['question']}</strong>
and add the following code just after that;
<div class="smalltext">This poll will end on {$enddate} , {$endtime}</div>
Now it should look like this;
[
attachment=21859]
That's exactly what I was looking for.
Went in and did the changes and it's all good.
Thanks a lot!
Just an update here, when I updated my forum to 1.6.3 the date went away.
What I'm seeing now is...
"This poll will end on ,"
You'll need to make the changes to ./showthread.php again.
Sorry, forgot to mention that I did that before I posted my recent problem.
Actually you've upgraded your forum with overwriting the showthread.php file to the old one. That's why the edits/modified lines erased.
In order to achieve the same modification, you've to make the above edits again.