View Full Version : [RELEASE] Poll Hack v1.0.1
Some users found a badley-coded part of the hack, I am rewriting that part and therefore have deleted the url from this post
The Poll Hack for the vB, now updated for speed and fuctionality. Demo at http://www.naboonline.com/polltest/
new features from 0.9.2 (previous version)
- if a user votes without logging in, is asked to login and the pollvote still counts
(2 new templates,error_pollvotenologin, error_pollvoteinvaliduser)
- Graphical view of poll results available. Template pollyesvote has a new variable $pollbargraph. If you
do not want to have the graphical view, simply remove the variable.
- poll icon ist now not needed to be inserted into the vBulletin icon db.
- new file pollmodule.php - hacks in files only reference to it, much less code to enter into the new files!
- speed enhancements and less mysql calls.
Overall features
- Let registered users post a new thread that has a poll integrated in it
- Let registered users vote on the poll
- Multiple votes impossible as userid is stored on vote
- Define # of poll options in CP
- Limit who can post a poll by usergroups (from the control panel)
- Designed to be easily translated. Only some text is hard coded (see localisation section below)
- Fully templateable - you can customise the look of the poll
- Users who can not post can not vote as well
- Make sure person did not vote, press back, and vote again
- Admin/Moderator edit of Polls at all times
- Edit Poll while no votes (for user who started the poll thread)
- vB code parse for options
- closing a thread == close a poll
- Admin delete
- View results without voting
- Close a poll (admin/mod/author)
- Graphical view of votes (bar graph and/or pie graph) **NEW**
Note to upgraders: Due to a change in the how data is stored, the new poll is not backwards compatible. Therefore, you will need to run updatepoll.php
The poll hack will be intergrated into vBulletin 2.0, so if you are in no hurry, you should better wait ;)
[Edited by doron on 11-04-2000 at 06:00 AM]
Hey doron, does this work with 1.1.4?
yes, there is a special 1.1.4 install file (notes114.txt) which details installing it on 1.1.4. the polltest forums run 1.1.4 now.
I'll install it on my test board then! (I love playing with new stuff). Unfortunately since the PM hack isn't compatible with 1.1.4, I can't go live with that version :(
But I'll let you know if I come across anything!!
Hello Doron,
Thank you very much for your efforts.
I am getting a couple of errors:
The poll shows twice on the poll page
Even though the user is already logged in it asks them to login again...then when the user does it gives them a database error.
This is the database error I receive when the user trys to login...even though they are already logged in:
Database error in vBulletin: Invalid SQL: SELECT threadid FROM post WHERE pollid=
mysql error: You have an error in your SQL syntax near '' at line 1
mysql error number: 1064
Date: Friday 03rd of November 2000 02:08:22 PM
Script: /poll.php
Referer: http://forums.paintballcity.net/poll.php
Any ideas. :)
double poll: go to your postbit template,
$posticon <smallfont><B>$postitle</b></smallfont>
<p><normalfont>$message<BR><BR>$pollbit</normalfont></p>
remove $pollbit.
as for the 2nd, looking at it
In showthread.php my line around 180 looks like this:
$posts=$DB_site->query("SELECT post.dateline as dateline,post.postid as postid,post.pagetext as pagetext,post.allowsmilie as allowsmilie,post.signature AS showsignature,post.title as title,post.ipaddress as ipaddress,post.iconid as iconid,post.username as fakename,post.userid as userid, user.usergroupid as usergroupid,user.userid as userid,user.email as email,user.username as username,user.usertitle as usertitle,user.signature as signature,user.showemail as showemail,user.homepage as homepage,user.icq as icq,user.aim as aim,user.yahoo as yahoo,user.joindate as joindate,user.posts as posts,user.usertext as usertext,user.iconpath as iconpath,user.city as city,user.state as state,user.country as country,user.receivepm as receivepm FROM post LEFT JOIN user ON (user.userid = post.userid) WHERE post.threadid=$threadid AND visible=1 ORDER BY dateline $postorder LIMIT $limitlower,$perpage");
So I made it look like this to match:
$posts=$DB_site->query("SELECT post.pollid as pollid,post.dateline as dateline,post.postid as postid,post.pagetext as pagetext,post.allowsmilie as allowsmilie,post.signature AS showsignature,post.title as title,post.ipaddress as ipaddress,post.iconid as iconid,post.username as fakename,post.userid as userid, user.usergroupid as usergroupid,user.userid as userid,user.email as email,user.username as username,user.usertitle as usertitle,user.signature as signature,user.showemail as showemail,user.homepage as homepage,user.icq as icq,user.aim as aim,user.yahoo as yahoo,user.joindate as joindate,user.posts as posts,user.usertext as usertext,user.iconpath as iconpath,user.city as city,user.state as state,user.country as country,user.receivepm as receivepm FROM post LEFT JOIN user ON (user.userid = post.userid) WHERE post.threadid=$threadid AND visible=1 ORDER BY dateline $postorder LIMIT $limitlower,$perpage");
Could that be causing the 2nd problem above?
No because that error is being generated by a query in poll.php
ahh, you have some of the optimisation hacks installed, so yes, that should help.
perhaps you should kill your cookies and see if that helps too.
I would say that poll.php isn't getting the threadid passed onto it after the user logs in i.e. <SUBMIT type="hidden" name="threadid" value="$threadid">
Hello,
Here is the HTML in the form:
<FORM ACTION=poll.php method=post>
<INPUT TYPE=hidden name=pollid VALUE=2>
<INPUT TYPE=hidden name=pollid VALUE=2>
<INPUT TYPE=hidden name=threadid VALUE=60786>
< poll html here >
<INPUT TYPE=hidden NAME=action VALUE=pollvote>
<INPUT TYPE=hidden NAME=username VALUE=Jim Murray>
<INPUT TYPE=hidden NAME=password VALUE=xxxxxx>
<INPUT TYPE=submit NAME=submitaction VALUE=Vote!>
[Edited by VirtueTech on 11-03-2000 at 07:19 PM]
Jim you should delete that line with your password as I could now log on as you by passing the encrypted password on the command line.
I tried to access that thread but it must be in a forum that I don't have access to and I forget the login info for phpMyAdmin so I could tweak myself to an admin ;)
[Edited by freddie on 11-03-2000 at 06:47 PM]
Freddie - I made you an admin and emailed you your password to webmaster@hedgehogwheels.com
Also - Doron tried logging in and said he was able to vote on the poll. I have tried clearing my cookies...Other users have tried and gotten the same error I did.
I don't see how he could have voted and myself and my users cannot.
[Edited by VirtueTech on 11-03-2000 at 06:54 PM]
Well Jim I logged on as you using the trick I warned you about and this is what I see as the code for the page where it asks for your name/password
<form action="poll.php" method=post>
Username: <INPUT TYPE="TEXT" NAME="username" SIZE=7 MAXLENGTH=25>
Password: <INPUT TYPE="PASSWORD" NAME="password" SIZE=7 MAXLENGTH=13>
<input type="hidden" name="action" value="pollvote">
<input type="hidden" name="optionNumber" value="">
<input type="hidden" name="pollid" value="">
<input type="submit" value="Login!"></form>
I see fields with no values..Doron^^^I also don't see a threadid.
I was able to vote as myself as it didn't ask me to login.
I don't know how Doron tells if you are logged in but it should not be asking you to login when click on the vote button. Are you checking if $bbuserid != 0?
Hello Freddie,
GOD what trick is that? ICQ me if you don't mind...please and tell me...thanks.
Also...why does it go to the password page if I am already logged in...
If you lookk above you will see the HTML source from the showthread page where the poll resides.
this is wierd, why is it for you not handing over the id's with form submit, but is for me and new people.
I'd suspect it is in my coding, but there is nothing that would differenciate between users.
My user on his forum is not new, it has been there since day 1.
Jim edit your post where you posted the HTML and remove the line that has your password in it!
Jim has a space in his name whereas we don't, you could start with that and go from there.
[edit]
Yes I changed my name to "rangers fan" and now I get prompted to login so your user verification code is at fault. Why do you pass the password/username through the form instead of just checking for $bbuserid == 0 in poll.php and prompting them to login if it is 0?
btw Jim I was reading the threads in the mods forum and you can't embed viruses into .jpgs so don't fear that someone can get a virus by uploading avatars. What people believe, geez.
[Edited by freddie on 11-03-2000 at 07:23 PM]
freddie: came to the same conclusion, i sent him a fix, gonna see if that helps. stupid mistakeof mine
Ahhh I did not think of that....YES...that is it.
Doron - so you don't get confused by my last post....the fix did not work.
Freddie - I don't want the moderators to know about the control panel and other such things...but I do agree with your statement.
The problem is that you need to put quotes around your form variables.
ie username="$username" instead of username=$username
;)
Can I mod the "Bugs in Hacks" forum also?
Damn doron you made it difficult, you need to put more of it into templates. Jim you need to edit the code that sets the $formend variable in pollmodule.php and put quotes around the line that sets the $username
This line:
$formend= "<INPUT TYPE=hidden NAME=action VALUE=pollvote><INPUT TYPE=hidden NAME=username VALUE=$bbusername><INPUT TYPE=hidden NAME=password VALUE=$bbpassword><INPUT TYPE=submit NAME=submitaction VALUE=Vote!> <A HREF=poll.php?action=showresults&pollid=$pollid><normalfont>View Results</normalfont></A></FORM>";
Needs to be:
$formend= "<INPUT TYPE=\"hidden\" NAME=\"action\" VALUE=\"pollvote\"><INPUT TYPE=\"hidden\" NAME=\"username\" VALUE=\"$bbusername\"><INPUT TYPE=\"hidden\" NAME=\"password\" VALUE=\"$bbpassword\"><INPUT TYPE=\"submit\" NAME=\"submitaction\" VALUE=\"Vote!\"> <A HREF=\"poll.php?action=showresults&pollid=$pollid\"><normalfont>View Results</normalfont></A></FORM>";
(And it needs to be in a template also)
[Edited by freddie on 11-03-2000 at 07:53 PM]
you mean the pollmodule.php....new zip is up with the fix.
it's complex cause I do it dynamically, not via templates. It's a waste of mysql for one line only.
now this should be settled, I aplogise for the inconvinience. but that is what users are for, to be misused for finding bugs ;)
Doron yes but I do some dynamic things in my hacks also and you can use templates, albeit alot of them. Just look how many I use in my hacks.
Something's wrong...
When i click on 'view results' i get this:
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
And guess what you get on 'polltest forum'. :p
http://www.naboonline.com/polltest
Here's address line
http://www.naboonline.com/polltest/poll.php?action=showresults&pollid=$pollid
There should be number instead of $pollid, right?
[Edited by PeF on 11-03-2000 at 09:02 PM]
Same problem here ... the "view results" link does not work.
http://209.15.159.99/showthread.php?threadid=60884
Go there and try for yourself.
The $pollid is being escaped somehow so it isn't being parsed. I will let Doron tell you how to fix it when he comes online..
This hack is very unoptimized....the person who told me this will remain anonymous.
Wasn't I as I have never actually looked at it other than to help fix todays problem..
Hmm, after looking through the code, the killer lies here:
$pollidcheck=$DB_site->query_first("SELECT pollid FROM post WHERE threadid=$threadid");
That SQL query is issued for each table row displayed in forumdisplay, so if you have 50 threads listed per page, thats 50 extra queries.
ouch...maybe I should take this off for now.
Originally posted by VirtueTech
This hack is very unoptimized....the person who told me this will remain anonymous.
I would love to see their version of it.
It's easy to sit back and complain about the work of others, not so easy to do it yourself. Your source would do well to remember that doron is doing this out of the goodness off his heart and doesn't have to contribute anything at all.
Originally posted by Stallion
Hmm, after looking through the code, the killer lies here:
$pollidcheck=$DB_site->query_first("SELECT pollid FROM post WHERE threadid=$threadid");
That SQL query is issued for each table row displayed in forumdisplay, so if you have 50 threads listed per page, thats 50 extra queries.
Sorry for this confusion, I was working fast to fix that spce in name thing that I messed some stuff up. argghhh
that is need however, as forumdisplay checks threads, not posts. And users wanted to have the poll icon showed without it being choosen. I could add a table to thread which would help. You can remove that code, but the custom icon won't show then.
http://www.naboonline.com/pollhack/pollmodule.php has the fix for the nonescaped showresults, it regressed cause of trying to fix the space thing at 1 AM here, and I was not thinking correctly.
I'll fix the pollidcheck thing today and add a column to the thread table.
Sorry again for this, I shoudl have tested this more, but I had 30 people email me last week requesting this hack.
ok, I now have the optimised version done, thanks to Ed for finding that. i had removed such code away from all other files before, somehow forgot to do that for forumdisplay.php
http://www.naboonline.com/pollhack/pollupgrade.zip is for those who are stuck with the unoptomised version.
http://www.naboonline.com/pollhack/pollv101.zip has the full version
If anyone else finds anything wrong, don't hesitate to tell.
thanks to you all for testing this and all, I guess I should be spanked for this (anyone have a paddle)?
Works just fine. Thanks to all. :p
Hello Martin,
The comment made about the hack was simply to notify everyone about the truth of the hack....the person who I will still keep anonymous is very understanding that the hack was out of the goodness of dorons heart....we were just making him aware....and thanks goes to doron for his fix. :)
I keep getting this error emailed to my administrators email address:
Database error in vBulletin: Invalid SQL: SELECT threadid FROM post WHERE pollid=
mysql error: You have an error in your SQL syntax near '' at line 1
mysql error number: 1064
Date: Saturday 04th of November 2000 03:27:00 PM
Script: /poll.php
Referer: http://209.15.159.99/poll.php
Any ideas?
this happens during voting...I'll look at this, seems that people are able to vote though on your forums
Yeah it is really weird....I just got like 15 more emails like that this morning.
I went through and tested all of the poll functions as an administrator and as a regular users...I'm not sure were the error is coming into play.
Maybe it is from:
- A moderator trying to edit the poll
- A guest trying a poll function
I'll try and do some more testing.
Originally posted by VirtueTech
Yeah it is really weird....I just got like 15 more emails like that this morning.
I went through and tested all of the poll functions as an administrator and as a regular users...I'm not sure were the error is coming into play.
Maybe it is from:
- A moderator trying to edit the poll
- A guest trying a poll function
I'll try and do some more testing.
Perhaps you can ask your users if they saw it and what triggered it. My only guess is, as your forum is pretty big, that people are playing with the poll by trying to vote directly. If this continues, I can patch up poll.php to throw an html error and thus avoid the db errors.
James-
Did you edit the two new templates that were created to have $pollid and $optionChoice in BOTH of them? (I think those are the variable names)
Doron-
In the updatepoll file you forgot to escape the $'s.
all bugs should be ironed out now, waiting on VirtueTech to see about that error he keeps getting, even though it could be a template issue...
I see you installed it on your forums, are you getting any sort of db errors?
hello !
I got the same DB-Error as VirtuTech.
My users do not see the poll-hack, cause the button is not implemented - but even then i got some error messages from time to time.
So i do not think it is a problem when users play with the poll itself.
bye tom
Originally posted by doron
all bugs should be ironed out now, waiting on VirtueTech to see about that error he keeps getting, even though it could be a template issue...
I see you installed it on your forums, are you getting any sort of db errors?
Database error in vBulletin: Invalid SQL: SELECT threadid FROM post WHERE
pollid=
mysql error: You have an error in your SQL syntax near '' at line 1
mysql error number: 1064
Date: Monday 06th of November 2000 09:38:52 AM
Script:
Referer: http://atforumz.com/poll.php
That's the one I get, but the polls seem to work anyway. I didn't bother to check last night (I have a special addy for DB errors), but it's the only one I get.
are you missing a $pollid at the end of that statement? I'm at work and don'e have ready access to the code...
Look at the 2 new templates that were created - they're probably missing the variables $pollid and $optionChoice (the variables have the same names as the <input type="hidden"..> they're in)
error_pollvotenologin
You must be logged in to vote on a poll
<p>To log in, fill in the form below:
<p>
<form action="poll.php" method=post>
Username: <INPUT TYPE="TEXT" NAME="username" SIZE=7 MAXLENGTH=25>
Password: <INPUT TYPE="PASSWORD" NAME="password" SIZE=7 MAXLENGTH=13>
<input type="hidden" name="action" value="pollvote">
<input type="hidden" name="optionNumber" value="$optionNumber">
<input type="hidden" name="pollid" value="$pollid">
<input type="submit" value="Login!"></form>
<p><smallfont>The administrator has required you to <a href="member.php?action=signup">register</a> before you can vote on polls. <a href="member.php?action=lostpw">Forgotten your password?</a></smallfont>
error_pollvoteinvaliduser:
Your username and password do not correspond.
<p>To vote in, fill out the correct informaion below:
<p>
<form action="poll.php" method=post>
Username: <INPUT TYPE="TEXT" NAME="username" SIZE=7 MAXLENGTH=25>
Password: <INPUT TYPE="PASSWORD" NAME="password" SIZE=7 MAXLENGTH=13>
<input type="hidden" name="action" value="pollvote">
<input type="hidden" name="optionNumber" value="$optionNumber">
<input type="hidden" name="pollid" value="$pollid">
<input type="submit" value="Login!"></form>
<p><smallfont>The administrator has required you to <a href="member.php?action=signup">register</a> before you can vote on polls. <a href="member.php?action=lostpw">Forgotten your password?</a></smallfont>
I really have no idea how the $pollid and $optionNumber are not there - could you all check if it exists in your templates?
thanks!
Perhaps you didn't escape the variables and so they were evaluated (which would make them blank)
You have to escape the $'s in the installation files. Otherwise, they'll try to be evaluated - which doesn't work.
Yeah or what I said before that.
the wierd thing is, it worked for me on my test boards...
/me dies in shame
Yes that was the problem. Thanks all. :)
Does this mean you'll release a updated zip file with all of the fixes? :)
I had some problems with 1.01 but decided to just drop the db's and kill the modifications and install it on a test board instead of a main production one :)
<a href="http://www.naboonline.com/pollhack/pollv101.zip" target="_blank">http://www.naboonline.com/pollhack/pollv101.zip</a>
that has the newest fixes
Are there any changes in the code or i can simply reupload .php files?
Hello Doron,
have you made any other changes in that new zip other than the bugs/fixes we discussed above?
Thanks Doron :cool:
I'll give them a whirl
Originally posted by PeF
Are there any changes in the code or i can simply reupload .php files?
from what version? if you installed the 1.0.1 version went it first went up, you are best off reinstalling it
Virtuetech: that is an old zip of all the fixes for the bugs you guys found.
Hmm,
I've tried to install the poll, but I get an error-message:
Fatal error: Call to undefined function: checkipban() in /home/theotc/public_html/board/admin/poll.php on line 11
So the problem is with the IP-check.
Can anyone help me?
Thx a l0T
what version of the vB are you using?
The latest one.
It's 1.1.4
what system are you on? this is wierd, the function is used by other files in the vB too.
hmm, where is the location of your vB?
All is ok in the poll and my test-board.
So but the poll looks bad.
http://213.61.114.140/~theotc/board/showthread.php?threadid=6
This the link to my board and teh poll.
I mean the question looks bad, cause its not big enough.
*sorry for bad 'n poor english
Thx
i'm not even seeing a poll - check your templates (pollview).
I have added this hack for 1.1.4 on my test board... but it did not add any of the templates when I ran the makepolltables.php file.
Any ideas?
Doron, can you help me? I got this error when I ran the updatepoll.php - the weird thing is that my directory is not /usr/local/apache/sites...
But my board is still functional so I don't know what this is about!
<!-- Database error in vBulletin: Invalid SQL: ALTER TABLE thread ADD poll SMALLINT (1) DEFAULT '0' not null
mysql error: Duplicate column name 'poll'
mysql error number: 1060
Date: Saturday 02nd of December 2000 08:33:54 PM
Script: /updatepoll.php
Referer:
-->
Warning: Cannot add header information - headers already sent by (output started at /usr/local/apache/sites/***.com/htdocs/updatepoll.php:7) in /usr/local/apache/sites/***.com/htdocs/global.php on line 754
Warning: Cannot add header information - headers already sent by (output started at /usr/local/apache/sites/***.com/htdocs/updatepoll.php:7) in /usr/local/apache/sites/***.com/htdocs/global.php on line 757
Editing thread table ...
[Edited by Me2Be on 12-02-2000 at 07:44 PM]
Me2b, I had a kind of similar problem than the one you mention in you last 2 quotes.
Check my recent thread:
http://www.vbulletin.com/forum/showthread.php?threadid=5041
I'm sure you have the same blank lines problem.
Benj
[Edited by Benj on 12-02-2000 at 08:37 PM]
Benj, I just tried checking for blank spaces and couldn't find anything. The weird thing is that the board is working fine - It just gives me the error when I run the updatepoll.php file
ALTER TABLE thread ADD poll SMALLINT (1) DEFAULT '0' not null
look for that and comment it ouy with a //, you seem to already have the poll column in thread. As for the other error, that other thread seems to cover it.
you probably got the 2nd error once, retried the updatescript, but it succedded the first time to create that column. What sort of system are you on?
Originally posted by ukliam
I have added this hack for 1.1.4 on my test board... but it did not add any of the templates when I ran the makepolltables.php file.
Any ideas?
Right... could I have a copy of the templates or an edited makepolltables.php file that just does the templates and does not add any tables...
thanks
Originally posted by ukliam
Originally posted by ukliam
I have added this hack for 1.1.4 on my test board... but it did not add any of the templates when I ran the makepolltables.php file.
Any ideas?
Right... could I have a copy of the templates or an edited makepolltables.php file that just does the templates and does not add any tables...
thanks
just comment out (by putting a // infront of the line) the lines where the tables are created ie ALTER etc. The onlyones you need are the INSERT lines.
Cheers... it was a problem with my header as well.
But it all works fine now.
doron, commenting out that line worked perfectly! I still got that header error even after making sure there was no white space, but nevertheless, it still worked!
Thanks doron!
hmm, the header issue is wierd, I'll try to reproduce. Are you all running php4?
php4 for me! But like I said, it did work though!
I have to warn you guys first, I'm a total newbie, I haven't got the faintest idea what I'm talking about :). I'm planning on learning the basics soon though, but in the meantime, I'm relying on you here ;)
When I run makepolltables.php (after having done everything in the readmethingy), I get the following error:
Editing post table ...
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
And this is the email I recieve:
Database error in vBulletin: Invalid SQL: ALTER TABLE post ADD pollid MEDIUMINT (8) UNSIGNED DEFAULT '0' not null
mysql error: Access denied for user: 'kroet@localhost' to database 'kroet'
mysql error number: 1044
Date: Thursday 14th of December 2000 01:47:30 PM
Script: /~kroet/murmellius/makepolltables.php
Referer:
Er? Prolly some basic, newbie, mistake on my side, but I'm curious anywayz :)
seems you have no permissions to alter tables...also, are you running it form the main vB directory?
I'm running it from the forum main dir, and should have all the permissions I need on the server. I found out that makepolltables.php seems to be looking for *.php files instead of the *.php3 files I have on the server. It's 1.0.1.3 btw, but I thought I used the 1.0.1.3 manual readme thingy.
Originally posted by KroeT
I'm running it from the forum main dir, and should have all the permissions I need on the server. I found out that makepolltables.php seems to be looking for *.php files instead of the *.php3 files I have on the server. It's 1.0.1.3 btw, but I thought I used the 1.0.1.3 manual readme thingy.
i have not done a .php3 version, you should just do a search and replace in all the files, that should help.
btw, it's 1.1.3
Errr. I knew that. I don't remember why I typed it wrong then ;)
I'll try the search 'n replace now :)
I did the search 'n replace, which didn't work. Still got the following email:
Database error in vBulletin: Invalid SQL: ALTER TABLE post ADD pollid MEDIUMINT (8) UNSIGNED DEFAULT '0' not null
mysql error: Access denied for user: 'kroet@localhost' to database 'kroet'
mysql error number: 1044
Date: Saturday 16th of December 2000 02:24:47 PM
Script: /~kroet/murmellius/makepolltables.php3
Referer:
So I think it must be the acces stuff. I don't see how it could be wrong though, since makepolltables.php3 requires global.php3 for the password etc, which requires /admin/config.php3 for the password. So, that should work. Hummzz
Originally posted by KroeT
I did the search 'n replace, which didn't work. Still got the following email:
Database error in vBulletin: Invalid SQL: ALTER TABLE post ADD pollid MEDIUMINT (8) UNSIGNED DEFAULT '0' not null
mysql error: Access denied for user: 'kroet@localhost' to database 'kroet'
mysql error number: 1044
Date: Saturday 16th of December 2000 02:24:47 PM
Script: /~kroet/murmellius/makepolltables.php3
Referer:
So I think it must be the acces stuff. I don't see how it could be wrong though, since makepolltables.php3 requires global.php3 for the password etc, which requires /admin/config.php3 for the password. So, that should work. Hummzz
my best guess is, you have no alter access. Is this a dedcated or a shared server? Also, have you installed any other hacks?
This is the first hack I installed. And I don't know if it's a shared one.
http://www.marmoset.net
I'll have a look
Couldn't find it :|
[Edited by KroeT on 12-17-2000 at 09:45 AM]
you better contact your host and ask them for alter privilidges for mysql...
Hii
doron ..Where is the zip file of this hack ??
:(:)
I may be going nuts but here is the whole story in a nutshell.
I had vB 113 and the older poll hack from october. Cant remember the version number. I upgraded to vB ver.114. During this time I also moved servers. Worst came to worst... I created a back up of the vB data base. On the new server I installed 114 instead of doing a 113 to 114 upgrade. I imported the tables and all.
Now yesterday I download the latest release of Poll Hack. I read the intructions not thinking about theolder verison I had installed befor ethe server move and before the 114 upgrade. I follow the instruction for the 114 install cause I did not see in the MySQL tables any of the tables that were there from when I did the install of Poll hack on 113.
I get the following error running makepolltables.php
Editing post table ...
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
I get the following in an email:
Database error in vBulletin: Invalid SQL: ALTER TABLE post ADD pollid MEDIUMINT (8) UNSIGNED DEFAULT '0' not null
mysql error: Duplicate column name 'pollid'
mysql error number: 1060
Date: Monday 18th of December 2000 11:14:58 AM
Script: /makepolltables.php
Referer:
Ok now the fun part. After reviewing the tables and not finding any reference to Poll hack install. I decided to try the upgrade from older version as in the instructions. Still I get the error as above.
I am lost. I need some where to be pointed.
Anyone?
first - the hack is at vbulletin.org
Originally posted by GMTalk
I may be going nuts but here is the whole story in a nutshell.
I had vB 113 and the older poll hack from october. Cant remember the version number. I upgraded to vB ver.114. During this time I also moved servers. Worst came to worst... I created a back up of the vB data base. On the new server I installed 114 instead of doing a 113 to 114 upgrade. I imported the tables and all.
Now yesterday I download the latest release of Poll Hack. I read the intructions not thinking about theolder verison I had installed befor ethe server move and before the 114 upgrade. I follow the instruction for the 114 install cause I did not see in the MySQL tables any of the tables that were there from when I did the install of Poll hack on 113.
I get the following error running makepolltables.php
Editing post table ...
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
I get the following in an email:
Database error in vBulletin: Invalid SQL: ALTER TABLE post ADD pollid MEDIUMINT (8) UNSIGNED DEFAULT '0' not null
mysql error: Duplicate column name 'pollid'
mysql error number: 1060
Date: Monday 18th of December 2000 11:14:58 AM
Script: /makepolltables.php
Referer:
Ok now the fun part. After reviewing the tables and not finding any reference to Poll hack install. I decided to try the upgrade from older version as in the instructions. Still I get the error as above.
I am lost. I need some where to be pointed.
Anyone?
this means you already have the poll hack installed (at least in the db). Do you have a poll table and does it contain anything? Try running the upgrade script in stead...
No there is not a poll table in there :(
I went through and looked and there is no table with Poll in it.
I have also tried the upgrade and it did not work either.
I decided to try the upgrade from older version as in the instructions. Still I get the error as above.
What can I do at this point. I would really like to have poll hack on the board.
so, you don't have any old polls? If not, simply remove the pollid column from the post table
Doron,
I have removed the poll id from the post table and tried once again.
THis is the error that I have gotten now when trying to run makepoll....
Editing post table ... Editing thread table ... Done!
Editing usergroup table ...
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
Did a refreash and I got the same error.
This is what I got in the Email:
Database error in vBulletin: Invalid SQL: ALTER TABLE usergroup ADD canpostpoll SMALLINT (6) DEFAULT '0' not null
mysql error: Duplicate column name 'canpostpoll'
mysql error number: 1060
Date: Tuesday 19th of December 2000 04:54:30 PM
Script: /makepolltables.php
Referer:
I also tried it once again and did the items you stated and then did the following: removed poll from thread table as well as canpostpoll from usergroup table.
Upon doing this and retrying I get the following:
Editing post table ...
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
The email is as follows.
Database error in vBulletin: Invalid SQL: INSERT INTO template (templateid,title,template) VALUES (NULL,'editpoll','<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> $cssinclude
Then I got this email:
Database error in vBulletin: Invalid SQL: ALTER TABLE post ADD pollid MEDIUMINT (8) UNSIGNED DEFAULT '0' not null
mysql error: Duplicate column name 'pollid'
mysql error number: 1060
Date: Tuesday 19th of December 2000 05:05:50 PM
Script: /makepolltables.php
Referer:
I just want to say I appreciate the help Doron.
[Edited by GMTalk on 12-19-2000 at 06:06 PM]
seems you have some fields from the poll hack and some not...
delete the poll table
drop the pollid in post
drop the canpostpoll in table usergroup
drop the poll column in the thread table
drop the table pollvote
you might also want to delete the templates as well, they are listing in the file. If you still are having problems, mail me and I will send you a script that will automatically do it.
hi,
The only problem i have is when i created a poll, and then try to vote, i get this:
No forum specified. If you followed a valid link, please notify the webmaster.
Anybody has the same problem as me? or know how i can fix this, thnx
i'm using vB1.1.3
Originally posted by DEMOLiTiON
hi,
The only problem i have is when i created a poll, and then try to vote, i get this:
No forum specified. If you followed a valid link, please notify the webmaster.
Anybody has the same problem as me? or know how i can fix this, thnx
i'm using vB1.1.3
when did you download the poll? this was the bug about a variable not being escaped in the install script.
In the pollvote template, look for <INPUT TYPE=hidden name=threadid VALUE=
there should be a $threadid in the VALUE=""
ok Doron,
here is what I run into now. I followed all your instructions removed all traces of Poll hack and all templates associated with it. Run makepolltables.php get the following:
Editing post table ... Editing thread table ... Done!
Editing usergroup table ... Done!
Creating table poll..
Creating table pollvote..
FINISHED!
Creating templates...
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
I deleted the make polltables.php and then gave myself the rights to create polls as instructed.
I pull up the forum to test and enter the
poll.php?action=newpoll&forumid=x with the x being the forum ID and all O got was a blank screen. ALl other areas and tests were fine for the posting of messages and all. Just when I try the polls I get a blank screen
Any suggestions.
what error occured on the template creation?
Doron,
The error above is the only error that I got. I went through and deleted all exsistance of the Poll hack once again and I get to the point of install it in and get the same error as above.
I go in to look at the templates before I do anything and they are not there. THey were not created. That could have explained the blank screen.
I htink I am bald now. I have no hair left. :)
i meant, what does the error look like in real (ie, the email that got sent, or simply view the source of the page to get the error?)
Database error in vBulletin: Invalid SQL: INSERT INTO template (templateid,title,template) VALUES (NULL,'editpoll','{htmldoctype}
<HTML>
<HEAD>
<TITLE>$bbtitle - Edit this poll</TITLE>
on the top
HTML layout
on the bottom
$footer ') mysql error: You have an error in your SQL syntax near 's Hot Topics
<table wi' at line 1 mysql error number: 1064 Date: Wednesday 27th of December 2000 05:28:41 PM Script: /makepolltables.php Referer:
Here is the one that gets sent after trying to install polls.
No message is sent when I try to do the polls. There are also no templates created. I just tried this once again :(
Tried once again
ran Make polltables.php
got errors
Editing post table ... Editing thread table ... Done!
Editing usergroup table ... Done!
Creating table poll..
Creating table pollvote..
FINISHED!
Creating templates...
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
This is the email
Database error in vBulletin: Invalid SQL: INSERT INTO template (templateid,title,template) VALUES (NULL,'editpoll','{htmldoctype} $cssinclude
Same as the previous message
I was wondering how i disable polls on certain forums?
Right now they are available on all, I want just one or 2 forums to have the ability to do it.
How do I do this?
I think there is one nasty bug in this poll hack.
It was the cause of vBoard's death :(
But I am not upset with the creater as I installed this hack at my own risk. :)
Just curious what happened? Post it here or email me either way I would like to know what happened to your board.
First off I removed everything off the poll hack on my board and there was nothing left of it.
Then I entered my forums to find a database error blocking me seeing the thread listing or any post.
Database dump was affected by this as it wouldn't dump right so my backup was a failer so I had no choice but to delete my database as it was giving off errors on the board.
I had no idea all my 24 hour backups were along not backing up right and that was since I installed the Poll Hack.
Originally posted by vBoard.co.uk
First off I removed everything off the poll hack on my board and there was nothing left of it.
Then I entered my forums to find a database error blocking me seeing the thread listing or any post.
Database dump was affected by this as it wouldn't dump right so my backup was a failer so I had no choice but to delete my database as it was giving off errors on the board.
I had no idea all my 24 hour backups were along not backing up right and that was since I installed the Poll Hack.
that's highly interesting..i can't see how the poll hack would do that, sounds more like a db corruption to me. how were your dumps conifgured?
I dump my database by PHP My Admin and its been missing some data to backup.
But there was no way I could make my board fresher as that error was there so I had no choice but to drop it.
Originally posted by vBoard.co.uk
I dump my database by PHP My Admin and its been missing some data to backup.
But there was no way I could make my board fresher as that error was there so I had no choice but to drop it.
i assume the error was because some old code from the poll hack still remained.
as for the db issues, possibly a corruption. i can't imagine any way that it could ruin the db unless something was wrong with the db structure.
I dont know it sounds like it but I can live with that. :)
I was wondering how i disable polls on certain forums?
Right now they are available on all, I want just one or 2 forums to have the ability to do it.
How do I do this?
Originally posted by Shak
I was wondering how i disable polls on certain forums?
Right now they are available on all, I want just one or 2 forums to have the ability to do it.
How do I do this?
the only current way is to have templates for each forum,and simply include the new poll image in those you want.
I sent you the email that you requested. I just want to tell you that I have just done the 115 upgrade. Let me know what needs to be done.
Thanks in advance.
Doron, I'm trying to update my other board from 1.1.3 to 1.1.5.
When I run the updatepoll.php, I'm getting the following error:
Editing thread table ... Done!
Poll number 1 converted
Poll number 2 converted
Poll number 3 converted
There seems to have been a slight problem with the database...
The error code is:
<!-- Database error in vBulletin: Invalid SQL: UPDATE thread SET poll='1' WHERE threadid=7372
mysql error: Unknown column 'poll' in 'field list'
mysql error number: 1054
Date: Friday 05th of January 2001 04:18:35 PM
Script: /backup/updatepoll.php
Referer:
-->
There is no poll #4, but there is a #5, etc...Can you help me?
Will there be instructions on how to do this hack to 1.1.5? Please help me get this done as I was hoping to install this but I did the upgrade to 1.1.5 and now it seems the code has changed. Please let me know how I can do this.
sorry, i was having issues with my computer, still am.
Me2Be: did you have the previous version installed? the error "Unknown column 'poll' in 'field list' " means there is no poll column in the thread table. The script should be clever and only take the existing polls...
Philly: as for 1.1.5, i have not had the time to look at it yet. It should work if you used the 1.1.4 install info.
Dumb newbie question.
Poll hack installed, works great, but ... when you view the poll results, there are no totals and no percent.
What is the var used for this? this is the pollresults template:
<TR>
<TD COLSPAN=2 ALIGN="CENTER"><FONT face="verdana, arial, helvetica" size="2" ><B>Total:</B></font></TD>
<TD ALIGN="LEFT"><FONT face="verdana, arial, helvetica" size="2" ><B> votes</B></font></TD>
<TD ALIGN="CENTER"><FONT face="verdana, arial, helvetica" size="2" ><B>100%</B></font></TD>
</TR>
i know i'm missing something before "votes".
Wendy,
Did you use the poll hack on vBulletin 1.1.5? If so could you let me know if there is any special I need to do. Just because the very first change wasn't in 1.1.5 or it was exact. Not quite sure I just really want the easy way out without screwing thing up.
Originally posted by wendy
Dumb newbie question.
Poll hack installed, works great, but ... when you view the poll results, there are no totals and no percent.
What is the var used for this? this is the pollresults template:
<TR>
<TD COLSPAN=2 ALIGN="CENTER"><FONT face="verdana, arial, helvetica" size="2" ><B>Total:</B></font></TD>
<TD ALIGN="LEFT"><FONT face="verdana, arial, helvetica" size="2" ><B> votes</B></font></TD>
<TD ALIGN="CENTER"><FONT face="verdana, arial, helvetica" size="2" ><B>100%</B></font></TD>
</TR>
i know i'm missing something before "votes".
here is how it should be:
<TR>
<TD COLSPAN=2 ALIGN=\"CENTER\"><normalfont><B>Total:</B></normalfont></TD>
<TD ALIGN=\"LEFT\"><normalfont><B>$total votes</B></normalfont></TD>
<TD ALIGN=\"CENTER\"><normalfont><B>100%</B></normalfont></TD>
</TR>
i will release a new version that is 1.1.5 compatible this weekend, hopefulyl get a version that has all variables escaped correctly
sorry! no, i'm on version 1.14, probably won't upgrade until i have to!
Thanks for the code, that did the trick ;)
I receive this error when I install the poll hack:
Database error in vBulletin Control Panel: Invalid SQL: UPDATE usergroup SET title='!Auto-generated moderator Please leave! Aaron Samsonoff',usertitle='Founder & Owner',canview=1,cansearch=1,canemail=1,canpostnew =1,canreply=1,canadminedit=1,canedit=1,candelete=1 ,canopenclose=1,canmove=1,cancontrolpanel=,canpost poll=1,canusepm=1 WHERE usergroupid=7
mysql error: You have an error in your SQL syntax near 'canpostpoll=1,canusepm=1 WHERE usergroupid=7' at line 1
mysql error number: 1064
Date: Sunday 14th of January 2001 04:48:53 PM
Script: /admin/usergroup.php
Referer: http://www.survivor-chat.com/admin/usergroup.php?action=edit&usergroupid=7
I already have the private messaging hack installed on version 1.1.5 and it works fine, except when I go to change the name of a super moderator to moderator I receive this error message.
Database error in vBulletin Control Panel: Invalid SQL: UPDATE usergroup SET title='Moderator',usertitle='Moderator',canview=1, cansearch=1,canemail=1,canpostnew=1,canreply=1,can adminedit=1,canedit=1,candelete=1,canopenclose=1,c anmove=1,cancontrolpanel=,canpostpoll=0,canusepm=1 WHERE usergroupid=5
mysql error: You have an error in your SQL syntax near 'canpostpoll=0,canusepm=1 WHERE usergroupid=5' at line 1
mysql error number: 1064
Date: Sunday 14th of January 2001 05:52:17 PM
Script: /admin/usergroup.php
Referer: http://www.survivor-chat.com/admin/usergroup.php?action=edit&usergroupid=5
It is for my message forum here http://www.survivor-chat.com Does anybody know what is wrong? I have a feeling the pm hack and the poll hack don't like each other.
oh man.......guess i'll have to wait until 2.0 is out to use the poll function......
or can anyone send me the hack?? i mean...it's not that buggy is it?
Originally posted by webmasterlane.com
I receive this error when I install the poll hack:
Database error in vBulletin Control Panel: Invalid SQL: UPDATE usergroup SET title='!Auto-generated moderator Please leave! Aaron Samsonoff',usertitle='Founder & Owner',canview=1,cansearch=1,canemail=1,canpostnew =1,canreply=1,canadminedit=1,canedit=1,candelete=1 ,canopenclose=1,canmove=1,cancontrolpanel=,canpost poll=1,canusepm=1 WHERE usergroupid=7
mysql error: You have an error in your SQL syntax near 'canpostpoll=1,canusepm=1 WHERE usergroupid=7' at line 1
mysql error number: 1064
Date: Sunday 14th of January 2001 04:48:53 PM
Script: /admin/usergroup.php
Referer: http://www.survivor-chat.com/admin/usergroup.php?action=edit&usergroupid=7
| cancontrolpanel= | that is the issue. you should reedit that file and see if there is a variable after that, namely $cancontrolpanel. it's correct in the documentation for the poll hack.
the hack is on http://www.vbulletin.org
Originally posted by Martin
Originally posted by VirtueTech
This hack is very unoptimized....the person who told me this will remain anonymous.
I would love to see their version of it.
It's easy to sit back and complain about the work of others, not so easy to do it yourself. Your source would do well to remember that doron is doing this out of the goodness off his heart and doesn't have to contribute anything at all.
I know this is old but...AMEN to this! I'm currently trying to implement polls on my forum and I cannot begin to fathom how complex it is.
Originally posted by SonnetCelestial
Originally posted by Martin
Originally posted by VirtueTech
This hack is very unoptimized....the person who told me this will remain anonymous.
I would love to see their version of it.
It's easy to sit back and complain about the work of others, not so easy to do it yourself. Your source would do well to remember that doron is doing this out of the goodness off his heart and doesn't have to contribute anything at all.
I know this is old but...AMEN to this! I'm currently trying to implement polls on my forum and I cannot begin to fathom how complex it is.
where can i get this hack???
Originally posted by SonnetCelestial
Originally posted by Martin
Originally posted by VirtueTech
This hack is very unoptimized....the person who told me this will remain anonymous.
I would love to see their version of it.
It's easy to sit back and complain about the work of others, not so easy to do it yourself. Your source would do well to remember that doron is doing this out of the goodness off his heart and doesn't have to contribute anything at all.
I know this is old but...AMEN to this! I'm currently trying to implement polls on my forum and I cannot begin to fathom how complex it is.
actually, that got fixed. I'm always open for optimisation suggestions
and you can get it at vbulletin.org.
greeting,,,
Hi Doron, and everyone...
i installed pollhack and it is work well. But whin someone not choos any option it gaives me an error in email :
Database error in vBulletin: Invalid SQL: INSERT INTO pollvote (pollvoteid,pollid,votedate,voteoption,userid) VALUES (NULL,17,981810256,,204)
mysql error: You have an error in your SQL syntax near '204)' at line 1
mysql error number: 1064
Date: Saturday 10th of February 2001 08:04:16 AM
Script: /forums/poll.php3
Referer: http://mydomain.com/forums/poll.php3
How can i solve this ?
Thank you ..
Originally posted by dellow
greeting,,,
Hi Doron, and everyone...
i installed pollhack and it is work well. But whin someone not choos any option it gaives me an error in email :
Database error in vBulletin: Invalid SQL: INSERT INTO pollvote (pollvoteid,pollid,votedate,voteoption,userid) VALUES (NULL,17,981810256,,204)
mysql error: You have an error in your SQL syntax near '204)' at line 1
mysql error number: 1064
Date: Saturday 10th of February 2001 08:04:16 AM
Script: /forums/poll.php3
Referer: http://mydomain.com/forums/poll.php3
How can i solve this ?
Thank you ..
the newest version should check if a option is not selected and should push a error to the user...
I have just downloaded the poll hack from vBulletin.org.
I have gone through all the tasks without error (as far as I know) ;)
At stage 8 when I am testing all the changes:
8. Create a test poll in your test forum, and let people vote/reply to it, to make sure that the poll script is working fine. Do this with entering this into your url bar: http://www.domainname.com/forum/poll.php?action=newpoll&forumid=x
where x is the forumid of the test forum or whatever forum you want to test it in.
At this point when I do this I simply get a white page. No errors or anything.
I am sure that this is a very simple issue but am not clued up enough to work out what I have done.
If someone could offer some advice it would be very much appreciated.
TIA.
Tim
Originally posted by twiglet
I have just downloaded the poll hack from vBulletin.org.
I have gone through all the tasks without error (as far as I know) ;)
At stage 8 when I am testing all the changes:
8. Create a test poll in your test forum, and let people vote/reply to it, to make sure that the poll script is working fine. Do this with entering this into your url bar: http://www.domainname.com/forum/poll.php?action=newpoll&forumid=x
where x is the forumid of the test forum or whatever forum you want to test it in.
At this point when I do this I simply get a white page. No errors or anything.
I am sure that this is a very simple issue but am not clued up enough to work out what I have done.
If someone could offer some advice it would be very much appreciated.
TIA.
Tim
what is your domain name? be sure to replace domainname.com/forum/ with the location of your forum.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.