Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

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
  #32  
Old 11-04-2000, 01:53 AM
Guest
 
Posts: n/a
Default

This hack is very unoptimized....the person who told me this will remain anonymous.
Reply With Quote
  #33  
Old 11-04-2000, 02:23 AM
Guest
 
Posts: n/a
Default

Wasn't I as I have never actually looked at it other than to help fix todays problem..
Reply With Quote
  #34  
Old 11-04-2000, 05:15 AM
Guest
 
Posts: n/a
Default

Hmm, after looking through the code, the killer lies here:
Code:
  $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.
Reply With Quote
  #35  
Old 11-04-2000, 05:28 AM
Guest
 
Posts: n/a
Default

ouch...maybe I should take this off for now.
Reply With Quote
  #36  
Old 11-04-2000, 07:27 AM
Guest
 
Posts: n/a
Default

Quote:
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.
Reply With Quote
  #37  
Old 11-04-2000, 08:51 AM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Stallion
Hmm, after looking through the code, the killer lies here:
Code:
  $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.
Reply With Quote
  #38  
Old 11-04-2000, 12:23 PM
Guest
 
Posts: n/a
Default

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)?
Reply With Quote
  #39  
Old 11-04-2000, 12:41 PM
Guest
 
Posts: n/a
Default

Works just fine. Thanks to all.
Reply With Quote
  #40  
Old 11-04-2000, 06:27 PM
Guest
 
Posts: n/a
Default

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

I keep getting this error emailed to my administrators email address:
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: Saturday 04th of November 2000 03:27:00 PM
Script: /poll.php
Referer: http://209.15.159.99/poll.php
Any ideas?
Reply With Quote
Reply

Thread Tools

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 12:45 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.04745 seconds
  • Memory Usage 2,276KB
  • 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
  • (3)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