As I stated in http://www.vbulletin.com/forum/index.php?t=281504, the current poll preview feature
sucks.
For those who can't wait till Jelsoft fixes this, here is a solution:
Warning: If you are allergic to file edits or to manual template changes, don't read further.
Template changes: 1
File edits: 1
In
poll.php find (around lines 202-215 in an unmodified version of poll.php):
PHP Code:
if ($vbulletin->GPC['preview'] != '')
{
$previewpost = 1;
$counter = 0;
$pollpreview = '';
$previewquestion = $bbcode_parser->parse(unhtmlspecialchars($question), $foruminfo['forumid'], $foruminfo['allowsmilies']);
while ($counter++ < $polloptions)
{
$pollpreviewbits .= " $counter. " . $bbcode_parser->parse($vbulletin->GPC['options']["$counter"], $foruminfo['forumid'], $foruminfo['allowsmilies']) . '<br />';
}
eval('$pollpreview = "' . fetch_template('pollpreview') . '";');
}
and delete (or comment) them.
Then find (it should be right after the lines you just deleted/commented):
PHP Code:
$checked = array(
'multiple' => ($vbulletin->GPC['multiple'] ? 'checked="checked"' : ''),
'public' => ($vbulletin->GPC['public'] ? 'checked="checked"' : ''),
'parseurl' => ($vbulletin->GPC['parseurl'] ? 'checked="checked"' : ''),
);
and add below:
PHP Code:
if ($vbulletin->GPC['preview'] != '')
{
$previewpost = 1;
$counter = 0;
$pollpreview = '';
$pollinfo['question'] = $bbcode_parser->parse(unhtmlspecialchars($question), $foruminfo['forumid'], $foruminfo['allowsmilies']);
if($checked['public']) $show['publicwarning'] = true;
if($timeout)
{
$pollinfo['dateline'] = TIMENOW;
$pollinfo['timeout'] = $timeout;
$pollendtime = vbdate($vbulletin->options['timeformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
$pollenddate = vbdate($vbulletin->options['dateformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
$show['pollenddate'] = true;
}
while ($counter++ < $polloptions)
{
$option['number'] = $counter;
$option['question'] = $bbcode_parser->parse($vbulletin->GPC['options']["$counter"], $foruminfo['forumid'], $foruminfo['allowsmilies']);
if ($checked['multiple'])
{
eval('$pollbits .= "' . fetch_template('polloption_multiple') . '";');
}
else
{
eval('$pollbits .= "' . fetch_template('polloption') . '";');
}
}
eval('$pollpreview = "' . fetch_template('polloptions_table') . '";');
}
In template
newpoll find:
HTML Code:
<form action="poll.php?do=postpoll&t=$threadid" method="post">
$pollpreview
and change it to:
HTML Code:
$pollpreview
<form action="poll.php?do=postpoll&t=$threadid" method="post">
Presto!
Enjoy your new REAL poll preview!