MyBB Community Forums

Full Version: Adding poll to sideboxes?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Using the Sideboxes plugin by Nayar, is it possible to add a poll to one of the additional sideboxes? So you could vote in the sidebox and then see the result from there too?

Thanks.
i don't have a time to edit the plugin ; but i can give to you a way .....

first great your poll and with your browser copy the code of your poll ; its something like this
<form action="polls.php" method="post">
<input name="my_post_key" value="69e13c5fb0583fbefe3debe8b6d59654" type="hidden">
<input name="action" value="vote" type="hidden">
<input name="pid" value="1" type="hidden">
<table class="tborder" border="0" cellpadding="4" cellspacing="1">
<tbody><tr>
<td colspan="4" class="thead" align="center"><strong>Poll: test</strong></td>
</tr>
<!-- start: showthread_poll_option -->
.
.
.
.
.
<!-- end: showthread_poll_option -->
</tbody></table>
<table width="100%" align="center">
<tbody><tr>
<td><input class="button" value="Vote!" type="submit"></td>
<td valign="top" align="right"><span class="smalltext">[<a href="polls.php?action=showresults&amp;pid=1">Show Results</a> | <a href="polls.php?action=editpoll&amp;pid=1">Edit poll</a>]</span></td>

</tr>
<tr>
<td colspan="2"><span class="smalltext">&nbsp;</span></td>
</tr>
</tbody></table>
</form>

and copy this code and go to your sidebox setting
and add the code to the Additional custom box 1 and save it Smile
That works perfectly, thanks a lot.

Is there a way to show the results as well after voting in the side box?
ur welcome
Just incase you didnt see, i edited the post:

Is there a way to show the results as well after voting in the side box?
Unfortunately no but you can show the results in the other additional custom box 2
with the same steps
Interesting, surely there must be a way of deciding that if a user has voted, they see the results instead. Hmm...
hmm i miss to tell you ... you should change the post key
so every time replace
value="69e13c5fb0583fbefe3debe8b6d59654"
with
value={$mybb->post_code}
Just a final bump, is there a way to display the results in the sidebox after a user has voted?
Could someone tell me why

{$pollbox} doesn't work?

(I've got Poll on Index activated).

There must be a way of doing this.
Pages: 1 2