Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 11-03-2000 Last Update: Never Installs: 0
 
No support by the author.

[EDIT] Some users found a badley-coded part of the hack, I am rewriting that part and therefore have deleted the url from this post[/EDIT]

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]

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 11-05-2000, 09:22 AM
Guest
 
Posts: n/a
Default

this happens during voting...I'll look at this, seems that people are able to vote though on your forums
Reply With Quote
  #43  
Old 11-05-2000, 03:54 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #44  
Old 11-05-2000, 04:42 PM
Guest
 
Posts: n/a
Default

Quote:
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.
Reply With Quote
  #45  
Old 11-05-2000, 07:48 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #46  
Old 11-06-2000, 12:02 AM
Guest
 
Posts: n/a
Default

so, is it working yet?
Reply With Quote
  #47  
Old 11-06-2000, 12:03 PM
Guest
 
Posts: n/a
Default

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?
Reply With Quote
  #48  
Old 11-06-2000, 05:31 PM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #49  
Old 11-06-2000, 05:47 PM
Guest
 
Posts: n/a
Default

Quote:
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...
Reply With Quote
  #50  
Old 11-06-2000, 05:53 PM
Guest
 
Posts: n/a
Default

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)
Reply With Quote
  #51  
Old 11-06-2000, 08:10 PM
Guest
 
Posts: n/a
Default

error_pollvotenologin

Code:
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:

Code:
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!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:59 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04462 seconds
  • Memory Usage 2,285KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete