vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Poll Write-In & Change Vote Hack (https://vborg.vbsupport.ru/showthread.php?t=142964)

TomasDR 11-25-2007 01:56 PM

Quote:

Originally Posted by gmattox (Post 1353531)
OK, I think I figure out how to remove it on my own. In the xml file that you download, look for this line
Code:

$optionvalue = $optionvalue . " (" .$vbulletin->userinfo[username]. ")";
                $poll->set_option($optionvalue, $counter - 1,

And put // in front of the first $optionvalue. It comments out the username part and doesnt show it when the poll options are added.

If anyone has any idea how to make it so that only admins can see the name of who added it, please let me know...

Sorry as mentioned had some family issues. Yes that's how you remove the name. As for allowing admins only to see the name that would be much more difficult since as you see all I was doing was changing the actual text of the write-in choice to add the username to the text of choice.

It's very possible it might be available in 3.7 since 3.7 will be recording a history of edits in posts.

TomasDR 11-25-2007 01:58 PM

Quote:

Originally Posted by zetetic (Post 1357996)
I've installed this on 3.6.8 and I'm having a problem with votes disappearing on write-in polls.

I haven't narrowed down exactly when it happens, but it's definitely happening.

I am running a patch version of 3.6.5 and awaiting 3.7 now before any upgrade. I will install a 3.6.8 test copy and look into your issue.

TomasDR 11-25-2007 03:27 PM

Quote:

Originally Posted by zetetic (Post 1357996)
I've installed this on 3.6.8 and I'm having a problem with votes disappearing on write-in polls.

I haven't narrowed down exactly when it happens, but it's definitely happening.

I installed a test board with 3.6.8PL2 and installed my product with no problems. What other add-ons are you running?

The only template that has changed (that this product uses) between 3.5.5 & 3.6.8 is "editpoll" which was a non-mandatory change in 3.6.6 that included an option check so you could add options when editing a poll if you exceeded the poll limit.

TomasDR 11-25-2007 06:56 PM

Quote:

Originally Posted by gmattox (Post 1353531)
OK, I think I figure out how to remove it on my own. In the xml file that you download, look for this line
Code:

$optionvalue = $optionvalue . " (" .$vbulletin->userinfo[username]. ")";
                $poll->set_option($optionvalue, $counter - 1,

And put // in front of the first $optionvalue. It comments out the username part and doesnt show it when the poll options are added.

If anyone has any idea how to make it so that only admins can see the name of who added it, please let me know...

I have added the feature to turn off the username and if it is turned off there is a moderator log entry each time there is a write in vote.

glorify 11-26-2007 05:14 AM

Quote:

Originally Posted by TomasDR (Post 1225207)
There is a permission check within the Plugin for that, I just didn't add the IF Conditional to the template where the link is added, so no one can change their vote after it's closed even though they will see the link.

Quote:

Originally Posted by zetetic (Post 1357996)
I've installed this on 3.6.8 and I'm having a problem with votes disappearing on write-in polls.

I haven't narrowed down exactly when it happens, but it's definitely happening.

Like the idea of this hack--would be extremely useful. To be clear before install, have the above issues been addressed/fixed?

zetetic 11-26-2007 05:25 AM

Quote:

Originally Posted by TomasDR (Post 1389200)
I installed a test board with 3.6.8PL2 and installed my product with no problems. What other add-ons are you running?

The only template that has changed (that this product uses) between 3.5.5 & 3.6.8 is "editpoll" which was a non-mandatory change in 3.6.6 that included an option check so you could add options when editing a poll if you exceeded the poll limit.

I'm sorry I can't be more helpful but I'm running a brazillion other add-ons and I don't really have the time to do any testing right now. To be clear though, the issue I had was votes disappearing altogether. Like I voted for one poll item and wrote in another, then when I checked the thread the following day my write-in poll item was still there but my vote for the other poll item was gone.

TomasDR 11-27-2007 02:21 AM

Quote:

Originally Posted by zetetic (Post 1389492)
I'm sorry I can't be more helpful but I'm running a brazillion other add-ons and I don't really have the time to do any testing right now. To be clear though, the issue I had was votes disappearing altogether. Like I voted for one poll item and wrote in another, then when I checked the thread the following day my write-in poll item was still there but my vote for the other poll item was gone.

Well you cannot add a write-in vote to a poll you have voted in already, the link doesn't even appear.

You can change your vote (remove your vote) and then add a write-in vote. Could it be possible you forgot to vote again after adding the write-in vote? Unless of course you were talking about 2 different polls.

TomasDR 11-27-2007 02:47 AM

Quote:

Originally Posted by glorify (Post 1389490)
Like the idea of this hack--would be extremely useful. To be clear before install, have the above issues been addressed/fixed?

You know I forgot completely about the if conditional to make the "change vote" link disappear if a poll is closed, but as I mentioned in the original post, eventhough the link to change your vote still shows, you cannot change your vote in a closed poll, there is a permission check in the plugin. So while it wasn't really an issue I have updated the template edit so the link to change your vote will not show if the poll is closed.

As for the other issue with 3.6.8 I cannot see how my add-on could be removing a vote, I did reply to the user's problem and the way he described what happened, it could be possible that he forgot to vote again after removing his vote to add a write-in vote. I have tested it in a clean copy of 3.6.8PL2 without any issues.

TomasDR 12-15-2007 05:23 PM

Found a bug if you allow the "Unregistered / Not Logged In" group to vote in polls. If they change their vote they will change all guest's votes. You only need to upgrade if you allow Unregistered users the ability to vote in polls.

Atwal 12-28-2007 09:27 PM

does this work with 3.7.0 beta 3??


All times are GMT. The time now is 01:03 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.01246 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)bbcode_code_printable
  • (9)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