vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Hide Poll Results (https://vborg.vbsupport.ru/showthread.php?t=98957)

djnth 02-15-2006 07:20 AM

I installed this and I have one MAJOR problem. I'm using vBAdvanced CMPS and the poll on the front page is pulling polls that are supposed to be hidden and displaying the results. Even when I'm not logged in as an ADMIN, just as a guest. Now I have people that are able to see the results of a secret vote. You can view it at www.azdancemusic.com

msgotit 02-16-2006 12:34 AM

Quote:

Originally Posted by djnth
I installed this and I have one MAJOR problem. I'm using vBAdvanced CMPS and the poll on the front page is pulling polls that are supposed to be hidden and displaying the results. Even when I'm not logged in as an ADMIN, just as a guest. Now I have people that are able to see the results of a secret vote. You can view it at www.azdancemusic.com

Sorry about that, didn't think about it. You will have to go into the currentpoll.php mod and edit it. At line 65 (in mine) so it should be around there, add hidepoll to the list of fields to get:

Find this:

PHP Code:

SELECT thread.pollidopenthreadidreplycountforumidquestionpoll.datelineoptionsvotesactivenumberoptionstimeoutmultiplevoters, public $query[pollfields

Change it to:

PHP Code:

SELECT thread.pollidhidepollopenthreadidreplycountforumidquestionpoll.datelineoptionsvotesactivenumberoptionstimeoutmultiplevoters, public $query[pollfields

Then find this:

PHP Code:

if ($pollinfo['showresults']) 

And change it to this:

PHP Code:

if ($pollinfo['showresults'] && !$pollinfo['hidepoll']) 

I think that will do it, let me know if it doesn't. I don't think there is a way to do it in the product so this is it, let me know if you need anything else.

Mark

EDIT: PS. I haven't actually tried this so I don't know for sure, but it should work.

skogen 02-23-2006 03:50 PM

Need urgent help!

When I and other users try to make a new poll I got errors

PHP Code:

Database error in vBulletin 3.5.3:

Invalid SQL:
INSERT INTO poll
        
(questiondatelineactivetimeoutmultiple, public, maxoptionshidepollnumberoptions,
optionsvotes)
VALUES
        
(Do you want to compte?', 1140716784, 1, 50, 0, 1, 0, 0, 2, 'Yes |||No!', '0|||0');

MySQL Error  : Unknown column '
hidepoll' in 'field list'
Error Number : 1054
Date         : Thursday, February 23rd 2006 @ 06:46:24 PM
Script       : http://www.mysite.com/forum/poll.php
Referrer     : http://www.mysite.com/forum/poll.php?do=newpoll&t=11273
IP Address   : 192.168.0.1
Username     : any
Classname    : vb_database 


msgotit 02-24-2006 04:17 AM

Skogen,

Can you look at your database tables? If so, did the hidepoll field get put in to the poll table?

Because it is trying to insert hidepoll in there I would assume that you have used the one I posted, and I would suggest trying to re-import it. If I had to guess, it didn't add the field, and I am not sure why. Let me know if that works!

BrandiDup 02-24-2006 05:28 PM

exactly what I needed! thank you very much :)

bobc973 03-01-2006 03:46 PM

Quote:

Originally Posted by msgotit
Skogen,

Can you look at your database tables? If so, did the hidepoll field get put in to the poll table?

Because it is trying to insert hidepoll in there I would assume that you have used the one I posted, and I would suggest trying to re-import it. If I had to guess, it didn't add the field, and I am not sure why. Let me know if that works!

What are the type, attributes, null and default values if we want to add it manually to the table?

Thanks!

msgotit 03-02-2006 12:12 PM

Quote:

Originally Posted by bobc973
What are the type, attributes, null and default values if we want to add it manually to the table?

Thanks!

First you have to be using the xml product I posted in the middle of the the last page. If you open that up you will see it but I believe it is tinyint with default 0. Hope this helps!

Mark

bobc973 03-02-2006 03:55 PM

Yes that was it tinyint, length 1, default 0. THANK YOU!

Hurricane 03-03-2006 03:56 PM

I know this is not the proper way of doing this, but here is a modification of the modified version of the regular hack.

This one is for admins. Only the admins can hide results to polls and admins can always see the results.

THIS IS NOT AN UPGRADE! Do not install with the other one! This is named differently so you can not overwrite the other one. You will have to uninstall the other one first and install this one.

gonkowonko 03-04-2006 08:32 PM

Quote:

Originally Posted by Hurricane
I know this is not the proper way of doing this, but here is a modification of the modified version of the regular hack.

This one is for admins. Only the admins can hide results to polls and admins can always see the results.

THIS IS NOT AN UPGRADE! Do not install with the other one! This is named differently so you can not overwrite the other one. You will have to uninstall the other one first and install this one.

Love it works lovely :D


All times are GMT. The time now is 10:46 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01159 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete