Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: 1.00, by Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-11-2002 Last Update: Never Installs: 23
 
No support by the author.

Firefly has a hardcoded version of this for hacker of the month, it allows the original poll poster, admins and mods of that form to view the results of the poll and none of the regular users. They can only view the poll if the poll is closed either by a admin/mod or the poll ends.

Relatively simple install, just two templates and two php files, though editing poll.php will be one of the more lengthy tasks.

This was tested on vB 2.2.6 and won't work without some editing on versions before as the multiple choice poll was introduced in the 2.2.x series and there is some reference to this in the queries, if you remove the references to these it should work.

Show Your Support

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

Comments
  #22  
Old 06-30-2002, 11:26 PM
BillaBongUSA BillaBongUSA is offline
 
Join Date: Mar 2002
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, thanks alot . But there's that problem that if you click on "View Results" before you vote, you can see the results.
Reply With Quote
  #23  
Old 06-30-2002, 11:44 PM
BillaBongUSA BillaBongUSA is offline
 
Join Date: Mar 2002
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, nevermind, I just read your post on the first page about changing $thread to $threadinfo. Thanks again!
Reply With Quote
  #24  
Old 10-10-2002, 07:17 PM
WizyWyg's Avatar
WizyWyg WizyWyg is offline
 
Join Date: Oct 2001
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to HIDE the results even from the ADMINS of the board as well as those who created the poll. I want to have it so the results remain anonymous to everyone (including admins and tbose who created the poll) until it ends or the admin closes the poll.
Reply With Quote
  #25  
Old 10-10-2002, 09:17 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If an admin wanted to see it, all they'd have to do is hit "Edit Poll" which defeats that purpose
Reply With Quote
  #26  
Old 12-11-2002, 08:13 PM
Phillip Chapman Phillip Chapman is offline
 
Join Date: Apr 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm working on installing this hack and it appears my poll.php file doesn't contain the following which needs to be changed...

Quote:
if ($option[votes] == 0) {
$option[percent]=0;
} else{
$option[percent] = number_format($option[votes]/$pollinfo[numbervotes]*100,2);
}
Am I missing something? Or because I'm running vBulletin 2.2.9 is this change no longer necessary?

This is the first hack I've installed, so please be as detailed as posssible.
Reply With Quote
  #27  
Old 12-12-2002, 01:42 PM
Phillip Chapman Phillip Chapman is offline
 
Join Date: Apr 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok... I was able to install the hack. However, now whenever I post a poll I'm getting the following error...

Quote:
Database error in vBulletin 2.2.9:

Invalid SQL: INSERT INTO poll (pollid,question,dateline,options,votes,active,num beroptions,timeout,multiple,hidepoll) VALUES (NULL,'What is your favorite non-Muppet series of characters?','1039707446','Looney Tunes|||Peanuts|||Disney|||Hanna-Barbara|||Nick Toons','0|||0|||0|||0|||0',1,5,'7','0','0')
mysql error: Unknown column 'hidepoll' in 'field list'

mysql error number: 1054

Date: Thursday 12th of December 2002 08:37:26 AM
Script: http://forum.muppetcentral.com/poll.php
Referer: http://forum.muppetcentral.com/poll.php
Can anyone please help with this?
Reply With Quote
  #28  
Old 12-12-2002, 08:30 PM
Phillip Chapman Phillip Chapman is offline
 
Join Date: Apr 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Think I finally got everything working now. :classic:
Reply With Quote
  #29  
Old 02-21-2003, 07:44 PM
Phillip Chapman Phillip Chapman is offline
 
Join Date: Apr 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm needing to uninstall this hack. It works fine, we just want to have a totallly clean board and database. Obviously, I just overwrite the original php files.

My question is, how do I remove an SQL Query from the database under PHP admin? The code I added was...

PHP Code:
ALTER TABLE `pollADD `hidepollSMALLINT(5UNSIGNED NOT NULL AFTER `voters
Exactly, what do I need to do to remove this from the database? (I understand it may not be totally necessary to remove this but I want to be sure it is gone and there are no future issues with this code).

Thanks in advance for your help!
Reply With Quote
  #30  
Old 02-21-2003, 08:20 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Scott, in the following code from your file, is this supposed to be $thread['postuserid'] or $threadinfo['postuserid']?

PHP Code:
----------------------
showthread.php
----------------------
look for the following on line 294
$pollbits
="";

below it add
  $noshow 
0;
  if(
$pollinfo['hidepoll'] && $bbuserinfo['usergroupid'] != && $thread['postuserid'] != $bbuserinfo['userid'] && !ismoderator($thread[forumid],"caneditposts")) {
    
$noshow 1;
  } 
Reply With Quote
  #31  
Old 08-01-2003, 07:57 PM
Threshold Threshold is offline
 
Join Date: May 2003
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1) The thread notes that you made some changes to the original. Are those changes in the .txt file that is part of the first post?

2) At the beginning of the instructions, there are some steps for people who are using verions 2.0.x. Where do those instructions end and where do the instructions begin for people using later versions? (I am running 2.3.0).

Is this step for people on version 2.0.x ? ==>

Quote:
Run the sql query to add the column to the poll table so users can select to hide the poll or not
ALTER TABLE `poll` ADD `hidepoll` SMALLINT(5) UNSIGNED NOT NULL AFTER `voters`
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:23 AM.


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.14796 seconds
  • Memory Usage 2,303KB
  • 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_php
  • (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
  • (3)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_onlinestatus
  • (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
  • postbit_imicons
  • 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