Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
Edit Poll Options Details »»
Edit Poll Options
Version: 1.0.1, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Category: Moderators Functions - Version: 3.5.1 Rating:
Released: 06-06-2005 Last Update: 12-02-2005 Installs: 48
Uses Plugins Template Edits
 
No support by the author.

Description
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.

Details
File edits: 0
Template edits: 1
Difficulty: Easy

History
1.0.0
Initial Version for vBulletin 3.5.0 Beta 1

1.0.1
Quick tweak to support PHP 5
Converted to a product

Please only click Install if you actually have installed/are using this Hack, and click Uninstall whan you don't use it any longer!

Update 10.10.2009
I am sorry for having to pull off this Add-on completely as this is the only option to stop it being abused for ilegal actions.

Show Your Support

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

Comments
  #32  
Old 09-28-2009, 02:35 AM
briangreul briangreul is offline
 
Join Date: Aug 2009
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Andreas View Post
Err ... this could also be done with a checkbox, but I don't want it to be possible.
If a user has decided that a poll is private - it should be kept private
That's why I don't support making non-public polls public.
I think it's best to let the admin decide how to run their site. On our site we use polls for "meetup" type voting and activity management. So features that would be useful for us are:
- changing polls to public (because the default is non-public and people forget to check it because they have to scroll down to find it).... and there is no way to fix it without recreating the thread... which is a giant pain in the butt for admins.
- the ability to have more than one poll on a thread.
- letting users change their votes.

For example, I posted a poll about an upcoming camping trip. I forgot to make it public, so we can't see who is interested. The only fix is to delete the event/thread (we have a mod installed that ties events to a thread for discussion).

As the event evolves people may need to change their vote from yes to no or vice versa. Likewise, we may want to post another poll as we solidify the event.

Our needs aren't necessarily the way someone else may use it and I think it's important to leave the options up to the site operator. A site for sports might not want people shifting around on their votes. I can see where it would become a popularity contest on some forums.

Overall, vbulletin is great. However there are some options that are annoying and the lack of control over polls is one of them. Ideallly, this should all be built in and controllable from the admin panel.
Reply With Quote
  #33  
Old 09-28-2009, 02:54 AM
briangreul briangreul is offline
 
Join Date: Aug 2009
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I spent a few minutes on this and managed to modify it to allow the poll to be made public.

There are two modifications needed:
1. Modify the XML code:
PHP Code:
<title>Edit Poll OptionsProcess Data</title>
            <
hookname>poll_update_process</hookname>
            <
phpcode><![CDATA[$poll->set('multiple'$vbulletin->input->clean_gpc('p''multiple'TYPE_BOOL));
if (
$pollinfo['public'])
{
    
$poll->set('public'$vbulletin->input->clean_gpc('p''public'TYPE_BOOL));
}]]></
phpcode
Make it look like this:
PHP Code:
<title>Edit Poll OptionsProcess Data</title>
            <
hookname>poll_update_process</hookname>
            <
phpcode><![CDATA[$poll->set('multiple'$vbulletin->input->clean_gpc('p''multiple'TYPE_BOOL));
    
$poll->set('public'$vbulletin->input->clean_gpc('p''public'TYPE_BOOL));
]]></
phpcode
\\
Save as -v2 or something in case you need the original mod. If you are going to re-install this don't forget to check "allow overwrite"

Step 2:
Use this code on the template mod:
PHP Code:
<fieldset class="fieldset">
     <
legend>$vbphrase[miscellaneous_options]</legend>
    <
div style="padding:$stylevar[formspacer]px">
        <
div><label for="cb_multiple"><input type="checkbox" name="multiple" value="1" id="cb_multiple" tabindex="1" $checked[multiple] />$vbphrase[allow_multiple_choice]</label></div>
      
      <
div><label for="cb_public"><input type="checkbox" name="public" value="1" id="cb_public" tabindex="1" $checked[public] />$vbphrase[make_votes_public]</label></div>
      </
div>
   </
fieldset
NOTE: I agree with the original author that care should be exercised when converting a poll from private to public. I also think that there are times when it is appropriate and I needed this feature on my system. Many thanks to Andreas for the original mod as he did all of the heavy lifting and I simply hacked his script a little bit.

I am new to mods on vbulletin and can't promise that this won't cause you headaches. It works on my board on v.3.8.2 Please exercise caution and make a backup before installing any mod.
Reply With Quote
  #34  
Old 09-30-2009, 04:03 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@briangreul
As said I don't support adding such (which most likely would be illegal in germany at least)

Please remove the code you've posted immediately.
Thanks.
Reply With Quote
  #35  
Old 10-10-2009, 10:22 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As this Add-on still gets abused for illegal actions I've got no choice but to pull if off completely.

Sorry.
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 08:46 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.11237 seconds
  • Memory Usage 2,264KB
  • Queries Executed 21 (?)
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
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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