![]() |
I know a lot people wanted and asked for this, so here it is, just for you! (and me :))
Pretty simple actually. This adds an option to the new poll screen (screenshot 1), that lets you choose between a regular poll (like it is now), or a multiple choice poll. If the latter is selected, instead of radio buttons there will be check boxes (screenshot 2). I also must say that installation is rather simple. All you need to do is edit 2 files, and 1 template. The rest is done automatically. This is the place to thank Bane that generously let me use his great installer! Without further ado, here's the installer: Installer - just upload to your admin folder and run in your browser. (note: all installation is reversable. uninstallation can be done from the installer) For a small add-on (not included in the installer), please see this page. |
First screenshot - new poll screen.
|
Second screen shot - show thread screen.
|
Installed and working great on talkloud :) Great hack sir!
I may have mentioned this |
Screen Shot on Talkloud!
|
After Vote :D
|
but i see 2 votes but really it's one vote and 2 choices :D
|
Hmm, i've downloaded the hack but there seems to be a small error. The field "multiple" from table "poll" is installed incorectly: actually is inserted as "mulitple" by your installer. So, when voting MySQL will generate an error: "multiple not in field list". :)
I've fixed it by setting the correct field name in MySQL administration panel. BTW, great hack :D |
I'm confused, does the installer do EVERYTHING for us, or is there something we're supposed to do manually. I installed it, but I get no choice to create the other poll.
|
New installer (can't update first post).
Thanks. :) drumsy, everything is on screen. What I can automatically is already done by the installer. You will need to do other changes to two files and another template. |
beautiful hack BUT, when I use it with vbportal, it doesnt allow multiple selections on the portal :(
can anyone help ? |
also, gives an error that I have not selected an option even when I know I have , so I cant vote full stop ! :(
|
Cyrus, you'll likely have to do some additional hacking if you want this to appear in the front page poll.
|
great hack, installed with ease!
|
Another great hack FireFly! Installation was a breeze, thanks very much... :D
|
Quote:
P.S. Bravo FireFly! |
there is no file called vbpstuff.php in version 2.0.3 if vbportal !!!
:( |
Small addon re floleb7's first post.
This will display the number of voters with multi choice polls, instead of number of votes. In showthread.php, find this: Code:
$counter=0; Code:
if ($pollinfo[multiple]!=0) { Easy wasn't it? :) |
what about me FF ?? :( :(
|
I get all kinds of undefined function errors such as cpheader and makelinkcode. :(
|
Cyrus, I don't use vbPortal.
RobAC, I suspect you didn't upload the installer to the admin folder. Is that correct? |
argh.....ok.....just slap me now! :mad: ;)
|
*looks around - BAM!*
|
Works perfectly! Thanks Chen! :D
|
|
Quote:
|
Ive searched high and low, cant seem to find it anywhere myself :(
what should I Do ??? |
Quote:
|
i did that,
I then went and daw the source for the vbportal homepage, and it says p_home is the template. so i searched for p_home in the vbp files and mailfile.php and header.php seem to mention it what now ? |
It can't be p_home. The temlate name should be like polloption... and looks like
Code:
<tr> |
that was what you told me to add in a new template as on the first post on page 2 of this thread!!!
:confused: |
O, sorry. The original looks practically the same
Code:
<tr> |
right
so what do I do ??? what template do I edit and/or what php file do i edit ?? :confused: |
P_polloptions or something to that effect
|
this is what I got in p_polloptions template :-
[QUOTE]<form action="$bburl/poll.php" method="get"> <input type="hidden" name="s" value="$session[dbsessionhash]"> <input type="hidden" name="action" value="pollvote"> <input type="hidden" name="pollid" value="$P_pollinfo[pollid]"> <table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td> <table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%"> <tr> <td bgcolor="{tableheadbgcolor}" align="center" colspan="4"><smallfont color="{tableheadtextcolor}"><b>$P_pollinfo[question]</b></smallfont></td> </tr> $P_pollbits </table> </td></tr></table> <table cellpadding="2" cellspacing="0" border="0" width="100%" {tableinvisibleextra} align="center"> <tr> <td style="font-size: 8pt"><smallfont><input type="submit" class="bginput" value="Vote!" style="font-size: 8pt"> <a href="$bburl/poll.php?s=$session[sessionhash]&action=showresults&pollid=$P_pollinfo[pollid]">View Results</a> </smallfont></td></tr> </table> </form> |
You need create new template as shown above
and modify php file which use this template simular as made by FireFly for vB or in my first post. |
You need P_pollbits temlate if you have.
In my case $P_pollbits based on P_polloption temlate. I guess you have P_polloption also. |
i cant see any P_pollbits template listed here
BUT, I do have P_polltions as stated above wht should I do ? |
Look for P_polloption
|
Quote:
Create new template and look for php file which create P_pollbits from P_polltions |
All times are GMT. The time now is 09:33 PM. |
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:
|