vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [HTL] & [TXT] Edit Poll Options (https://vborg.vbsupport.ru/showthread.php?t=61814)

Andreas 02-22-2004 10:00 PM

[HTL] & [TXT] Edit Poll Options
 
Edit Poll Options
Version: 1.0
vB-version: 3.0.0 Release Candidate 2
Developer: Kirby
Install difficulty: Easy
File edits: 4
Template edits: 1

Description of the Hack:
By default it is not possible to change poll options (multiple votes, public) when you edit a poll.
This hack allows to change these options.
Please note that it is only possible to make a public poll non-public, you cannot make a non-public poll public with this hack.

History
  • 1.00 Initial release
  • 1.01 Updated instructions for vB 3.0.3
    Dropped HTL

HACK INSTALLATION DETAILS:
Files modified for this Hack:
poll.php

Templates modified for this Hack:
editpoll.php

Merjawy 02-23-2004 06:11 AM

hmmm I don't see the hack.. wheres the zip file? :)

gmarik 02-23-2004 10:04 AM

It's lost, don't you see it?

Boofo 02-23-2004 12:35 PM

I found 3 instances of this code in the poll.php:

PHP Code:

 $threadinfo $DB_site->query_first("
  SELECT *, NOT ISNULL(deletionlog.primaryid) AS isdeleted 

Are we supposed to put this code above all 3?

PHP Code:

 if (!$pollinfo['public'] AND $public)
  
$public 0


Andreas 02-23-2004 12:57 PM

No. Only around line 459 (for RC2).

Boofo 02-23-2004 01:02 PM

Maybe you should update the instructions? ;)

Boofo 02-23-2004 01:04 PM

The one under this?


start adding the edit to the db

Andreas 02-23-2004 01:10 PM

Yep.

Instructions updated (line number added)

Boofo 02-23-2004 01:13 PM

You might want to alos mention it is under that. RC3 has that on a different line. ;)

msimplay 03-14-2004 06:19 PM

What did i do wrong i get that error :(
i use rc4 vb3

Code:

Database error in vBulletin 3.0.0 Release Candidate 4:
 
  Invalid SQL:
                  UPDATE poll
                  SET numberoptions = '6',
                  question = 'Is this site any good ?',
                  votes = '0|||0|||0|||0|||0|||0',
                options = 'Excellent|||Good|||Average|||Poor|||Never been here before|||I thought this used to be amc\'s homepage :S',
                  active = '1',
                  REPLACE that with
                  timeout = '0',
                  multiple = 0,
                  public = 1
                  WHERE pollid = 3
   
 mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'REPLACE that with
                  timeout = '0',
                  multiple = 0,
 
 
  mysql error number: 1064
 
  Date: Sunday 14th of March 2004 12:20:45 PM
  Script: http://www.wambam.net/vbulletin/poll.php
  Referer: http://www.wambam.net/vbulletin/poll...ledit&pollid=3
  Username: wAmbAm
  IP Address: 82.37.28.131


assassingod 03-14-2004 06:25 PM

You've installed it incorrectly (You've copied text from the install file into the query accindently)

msimplay 03-14-2004 06:38 PM

Quote:

Originally Posted by assassingod
You've installed it incorrectly (You've copied text from the install file into the query accindently)

thank you fixed now :D very useful hack lol why on earth is this even a hack should be standard :mad:

msimplay 03-20-2004 09:18 PM

ok what about vb3 gold now :o

Leah 04-02-2004 02:07 PM

I tried to install it in vB3 Gold, but there's something with the code in poll.php that needs to be changed.

msimplay 04-02-2004 02:14 PM

Quote:

Originally Posted by kie
I tried to install it in vB3 Gold, but there's something with the code in poll.php that needs to be changed.

i had a problem with installing this too

PET 04-06-2004 02:31 AM

is this working in GOLD ?

msimplay 04-06-2004 06:45 AM

Quote:

Originally Posted by PET
is this working in GOLD ?

i tested it and its not working for me i don't know about anyone else

Leah 04-06-2004 07:55 AM

Not working in GOLD for me either.

JaNa 04-23-2004 09:58 PM

Very useful...

/me clicks install

PET 06-30-2004 06:57 PM

bleah. How a bad way of writing the TXT file. How can i know that the TXT file is not finished ? You shoud'v write an ending message. Like :

#########################3
That's id, i hope you enjoy my hack

Andreas 06-30-2004 07:14 PM

Hmm, I haven't upgraded to Gold yet :(

But normally it should work.
I'll test that when I got time to do so.

theArchitect 11-05-2004 10:26 PM

*theArchitect Clicks intalll*.

Very nice. Though I had to make a couple of changes to get it working with 3.0.3.

Andreas 11-05-2004 10:36 PM

Hmm ... gonna check & update the instructions soon :)

theArchitect 11-06-2004 02:49 AM

Quote:

Originally Posted by KirbyDE
Hmm ... gonna check & update the instructions soon :)

Sorry, I should have been more specific.

In your instructions your original code requested a find and replace for:
PHP Code:

globalize($_POST, array('pollid' => INT'closepoll''pollquestion' => STR'options''pollvotes''timeout')); 

while the original PHP was:
PHP Code:

globalize($_POST, array('pollid' => INT'closepoll''pollquestion' => STR'options''pollvotes''timeout' => INT)); 

Another find and replace requested I search for:
PHP Code:

timeout '" . addslashes($timeout) . "' 

while the original PHP was:
PHP Code:

timeout $timeout 

Nit picking I know, but perhaps confusing for a newbie who is expecting a carbon copy with the find and replace.

And nice to see that you have updated the instructions too. :cool:

Love your work.

Andreas 11-06-2004 04:45 AM

Yep. As this was originally written for RC2 the code to search for was a bit different.
In the meanwhile I already updated the instructions :)


All times are GMT. The time now is 07:25 PM.

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.02161 seconds
  • Memory Usage 1,770KB
  • 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
  • (1)bbcode_code_printable
  • (6)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete