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)

Dennis B 06-20-2007 09:39 PM

Excellent hack, thanks!

georgeshaner 07-13-2007 12:04 PM

hi,
this looks great.
i'm new to this, so please forgive the basic question:
when you say to download/install the xml file, what location/path do i use?
thanks so much for your efforts.

gmattox 10-05-2007 01:42 PM

I see this hasn't been posted on in awhile, but I need to reiterate the request of Shana. Is their a way to make it so only the admins see who added the write in? I am conducting some serious polls, and don't want the other users seeing who added it. That, or is their a way to just remove the username after it altogether?

gmattox 10-05-2007 03:57 PM

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

fb-guy 10-09-2007 10:15 PM

Hello all,

I am looking for a way of creating a year end "awards" for our members. Our community builds brick ovens, and we want to set up categories, let members nominate ovens, and them we all get to vote. At the end, we will count the votes, and send out physical awards (things we will send to the winners).

Can I do this with the Poll Write-in Hack?

What do you think?
FB

zetetic 10-12-2007 04:08 AM

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.

meissenation 10-14-2007 12:02 AM

Very, very cool! Awesome mod!

gable74 11-07-2007 09:52 PM

Can someone explain how and where to install the .XML file please? I try to upload it in the upload/download styles section and it give me an invalid file error. Can i just upload the .xml to a directory someplace? Thanks

gable74 11-07-2007 10:19 PM

never mind, i figured it out. Had to goto "plug-ins and products"-> product manager-> upload the .xml

TomasDR 11-25-2007 01:53 PM

Quote:

Originally Posted by fb-guy (Post 1356517)
Hello all,

I am looking for a way of creating a year end "awards" for our members. Our community builds brick ovens, and we want to set up categories, let members nominate ovens, and them we all get to vote. At the end, we will count the votes, and send out physical awards (things we will send to the winners).

Can I do this with the Poll Write-in Hack?

What do you think?
FB

I have had personal family issues so sorry for the delay. Yes this will work since it allows users to add write-in votes to a poll. You would need to setup an initial poll with a couple choices first of course.

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??

TomasDR 01-07-2008 02:25 PM

Quote:

Originally Posted by Atwal (Post 1411049)
does this work with 3.7.0 beta 3??

I have no time to install 3.7, even on a test board, until it's out of beta.

I will be upgrading to 3.7 probably a week or two after it goes live, and will update (if needed) the addon then.

RayStorm 01-20-2008 03:24 AM

Hi,

I found a bug (I have 3.6.4 ver)...

If poll is closed and than re-open, "Add Write-In Vote" disappears forever...

Should be nice too, give the possibility to add "Add Write-In Vote" option to a poll that is not created with "Add Write-In Vote" mode.

P.S. Nice mod

TomasDR 01-28-2008 10:11 PM

Quote:

Originally Posted by RayStorm (Post 1424871)
Hi,

I found a bug (I have 3.6.4 ver)...

If poll is closed and than re-open, "Add Write-In Vote" disappears forever...

Should be nice too, give the possibility to add "Add Write-In Vote" option to a poll that is not created with "Add Write-In Vote" mode.

P.S. Nice mod

Did you edit the temple "EditPoll"? If you don't edit the template it would change it to a non write-in poll when closing/opening. (note: Make sure you see the checkbox "Allow Write-in votes" when editing a poll, which also will solve the ability to change it to a write-in poll)

RayStorm 01-29-2008 10:04 PM

Thanks, I'll try...

Byez

Atwal 01-31-2008 03:15 PM

will it work with 3.7.0 Beta 4?

dartho 02-01-2008 06:45 AM

Just did a quick test, and it does work under 3.7B4 :up:

edytwinky 02-01-2008 08:15 PM

Nice mod!!

Ark del KAOS 05-23-2008 08:06 PM

For people with the 3.7 or 3.6.10, and the problem of the security token with this mod:
Go to the writeinvote template, seek for
HTML Code:

<input type="hidden" name="s" value="$session[sessionhash]" />
(its at the beginning), and under it paste
HTML Code:

<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
That's all! ^ ^

ComputerVitals 06-10-2008 03:06 AM

Just what I've been looking for!

Seems to be working in vB 3.7.1 PL1

ComputerVitals 06-10-2008 03:23 AM

How would I change it so the "Add Write-In Vote" would be a button and not a text link?

shlomot 06-12-2008 07:20 AM

Dear TomasDR, can you give us an approximate time frame for the 3.7.x release?

Members push hard:) Thanks a lot.

dartho 06-12-2008 09:55 PM

This works under 3.7.1 for me - just need to make the change in post 68 above

ComputerVitals 06-15-2008 11:26 PM

We've found an issue that might not be good.

What if a user adds a vote to a poll that really isn't suitable?
How can we remove one of the votes?

N/M - Admins can change/remove votes.

trilogy33 06-23-2008 11:35 AM

Without installing the hack, is there a quick way of manually editing the database?
A moderator has written to me explaining that they've added an extra option to an open poll, but would like to adjust their vote to the new option.

Is this quite easy to do in the database and if so, what would I be looking to change?

Many thanks :)

EDIT: No matter now.

EricPSF 07-25-2008 10:40 PM

Hi,

Can it be use for vB 3.7.2?

Thanks.

TomasDR 12-10-2008 04:24 PM

Quote:

Originally Posted by shlomot (Post 1547412)
Dear TomasDR, can you give us an approximate time frame for the 3.7.x release?

Members push hard:) Thanks a lot.

Sorry was in a major Car Accident, as mentioned in another post the only major issue was the security_token.

I have release the 3.7 version.

Ogmuk 09-15-2009 05:04 PM

Sorry if this has already been mentioned but is it possible to allow people to change notes and not allow Write-Ins? Right now it looks like votes can only be changed if Write-Ins are allowed.

kinchyle 05-08-2010 02:02 AM

This was a great mod! Any plans to port it over to Vbulletin 4?

metrika 02-23-2011 08:58 AM

Does Vbulleting 4.x.x have this feature with out need addons?

tommac3 09-29-2012 11:02 PM

THis is exactly what I am looking for anything like this for VB 4.x ?

Does this work for 4.x ?


All times are GMT. The time now is 01:07 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.01377 seconds
  • Memory Usage 1,830KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_html_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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