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
  #2  
Old 11-03-2000, 04:27 PM
Guest
 
Posts: n/a
Default

Hey doron, does this work with 1.1.4?
Reply With Quote
  #3  
Old 11-03-2000, 04:30 PM
Guest
 
Posts: n/a
Default

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

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!!
Reply With Quote
  #5  
Old 11-03-2000, 06:34 PM
Guest
 
Posts: n/a
Default

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

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

In showthread.php my line around 180 looks like this:
Code:
$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:
Code:
$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?
Reply With Quote
  #8  
Old 11-03-2000, 09:14 PM
Guest
 
Posts: n/a
Default

No because that error is being generated by a query in poll.php
Reply With Quote
  #9  
Old 11-03-2000, 09:14 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #10  
Old 11-03-2000, 09:25 PM
Guest
 
Posts: n/a
Default

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">
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 05:48 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.04459 seconds
  • Memory Usage 2,273KB
  • Queries Executed 23 (?)
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
  • (1)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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)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