News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

Voter Visibility

Started by Ray Cardillo, May 02, 2012, 12:25:01 PM

Previous topic - Next topic

polit-talker

Quote from: Sabrinova on August 14, 2012, 05:02:30 PM
Am I missing something?  Even when creating a poll, my voter visibility is set to read only and won't allow me to modify it to anything other than Only forum admins can see votes.  I want everyone to see the votes!

Ah, this seems to be when adding a poll to an existing thread!  I can set the option if I hit "New Poll" to start a new topic.  Please can anyone tell me how to add a poll to an existing topic and set the voter visibility to public?  Is this possible?

I just had to create a new poll, so I could set the VV to public, (luckily Lazarus completed the fields for me, the little star!) then merge the poll topic with the existing topic that I wanted the poll to be on.  It was a bit of a faff....

Dear Ray, thanks for picking up the who voted what package and put it to SMF 2.0.

BUT: I have the absolutely same problem as explained above. E.g. I'm creating a calendar event and want to determine the participants. If I start merging it becomes really annoying. Is there a way to prevent the read-only restriction?

Thanks a lot

Jochen

polit-talker

Dear All,

I have another short question:

When I create a poll I actually never can see the voters. Instead I get some error like:
Database error:
sql_name.smf_log_polls doesn't exist.

That is simply because my data prefix is not smf_ but smf_tco. So in my MySQL database I actually do have the entry smf_tcolog_polls. In what variable is the database prefix stored? One should change that in the source code to the correct variable...

Cheers

Jochen

polit-talker

Ok,

I did the quick google search myself.

Just replace smf_ with {db_prefix} in VoteLog.php

Cheers

GodKnightX

#43
Is it possible to use this feature when i want to add a new poll to an existing thread?
Because currently doesnt work, just when i create poll with thread, but alone no :(

I hope the author or somebody add this feature in the future.

Edit: Nevermind i edited it for myself :)

demlak

#44
we get databaseerror "Unknown column 'p.timestamp' in 'field list'"

based on file smf/Sources/VoteLog.php line 116

whats this about? i don´t have coding skills =)


same here
Quote from: polit-talker on September 23, 2012, 03:00:00 PM
Ok,

I did the quick google search myself.

Just replace smf_ with {db_prefix} in VoteLog.php

Cheers

demlak

#45
Quote from: FrizzleFried on May 17, 2012, 02:20:19 PM
http://www.xxxx.com/index.php?action=editpoll;topic=1407.0
8: Undefined variable: row
File: /home/ahaforum/public_html/Sources/Poll.php
Line: 553


same here... fix is to add "$row," at line 343... the function misses the variable-definition..
so it should look like this:

global $row, $txt, $user_info, $context, $topic, $board, $smcFunc, $sourcedir, $scripturl;


also in function "vote" at line 74..
and function "EditPoll2" at line 632..

or is the problem somewhere else? im not a coder..

FrizzleFried

You,  sir,  are awesome.

I went from 4 errors per member voting each and every time they voted down to 1...

This is the one remaining error I am getting:


http://www.x.com/index.php?action=vote;topic=5069.0;poll=423
8: Undefined index: voteComment
File: /home/ahaforum/public_html/Sources/Poll.php
Line: 208


You've made my live 75% better!  :)  THANKS AGAIN!

demlak

"Undefined variable" means.. the variable is not defined... easy, he? =)
so just define it... this works in every php file where you get "Undefined variable" error.. (i think so)

since im still not a coder.. i don´t know what "Undefined index" is..

PyroTech03

Quote from: GodKnightX on November 08, 2012, 02:39:10 PM
Is it possible to use this feature when i want to add a new poll to an existing thread?
Because currently doesnt work, just when i create poll with thread, but alone no :(

I hope the author or somebody add this feature in the future.

Edit: Nevermind i edited it for myself :)
How did you fix?? as I'm sure other's would love to know (like myself :3)
YouTube personality PyroTech03 http://www.youtube.com/pyrotech03stream [nofollow]

Owner of Obtenebration Network, home for YouTube gaming content creators and fans! http://www.obten.net [nofollow]

sun-man

I know, its realy realy old. But i cant found a "better" Plugin.
http://www.x.com/index.php?action=vote;topic=5069.0;poll=423
8: Undefined index: voteComment
File: /home/ahaforum/public_html/Sources/Poll.php
Line: 208


You can set all errors to "0". This message is a indexfailure because "voteComment" ist not set. Thats what i know, but i dont know how to set it empty and correct "shouldbe something with "isset" but i cant get it to work).

I you set in the beginning of "poll.php" this -> "error_reporting(0);" you should not see this index-message again.

Ray Cardillo

Hey folks, glad to see community activity on this mod... I was in the midst of resettling after a relocation.  I am going to work on a maintenance release over the next few weeks.  I will incorporate all community contributed fixes also and I will try to address any feedback that is submitted.  So if you have anything more, or any feedback, now is the time!
Author of the Voter Visibility mod customization.  Adds the ability to see (and control who sees) who voted for what.  Allows you to conduct secret ballots.  Can also be used to coordinate volunteer signups, and more.

FrizzleFried

Quote from: Ray Cardillo on January 26, 2013, 03:51:28 PM
Hey folks, glad to see community activity on this mod... I was in the midst of resettling after a relocation.  I am going to work on a maintenance release over the next few weeks.  I will incorporate all community contributed fixes also and I will try to address any feedback that is submitted.  So if you have anything more, or any feedback, now is the time!

Seems to work pretty good.... background errors aside.  I have noticed that the comments area will sometime now include the date...(I am guessing causing or the effect of one of the errors that are thrown).

One suggestion... allow visibility to be changed during edit... currently once you post a poll... if you,  say,  forget to turn ON visibility (so people can see the actual votes, etc).... too bad... the option to turn on/off is grayed out while editing.

Another suggestion:  It would be freakin' KILLER if you incorporated the SMF Graphs capabilities in to polls.  Perhaps that would be for a different mod as that is beyond the specific focus of this one... but a nice selectable pie/bar graph of the current votes would be awesome...

Ray Cardillo

#52
I have just published a maintenance release and I will consider any new features in the future.  However, it's unlikely that I will do anything other than basic support if nobody donates to the organizations that this mod was created to benefit.


The (1.02) maintenance release includes:


Bug Fixes:

  • Full support for alternative database prefixes.  Apparently I had missed three database table references that were hard-coded as "smf_" instead of using the config variable... so that was really easy to hunt down and resolve.
  • Errors first reported by FrizzleFried (in the error log) are all resolved.  The errors being reported were minor bugs mostly having to do with voting or editing polls that were configured not to allow any comments.  The fixes suggested previously were not technically correct (although they would appear to eliminate errors).  I hunted down each one, reproduced, corrected, and tested.
  • Could not change visibility when adding a new poll to an existing topics.  This is now fixed.  This ended up being a bug in the code that prohibits changing visibility after the poll is created.  See notes below for more details.

Updates:

  • Verified to work with SMF 2.0.2 and the latest SMF 2.0.3 update.
  • jQuery updated to the latest stable release (1.9.0).
  • tablesorter updated to the latest stable release (2.0.5).

Languages:

  • German UTF8 Translation (provided by Inti31).
  • Polish UTF8 Translation (provided by Greybrow).

Important Notes:

  • I have no intention to implement or support integration with multi poll mods.  The way mods work would make it difficult (but not impossible) and the folks I did this for aren't seeing any donations yet, so I have no motivation to work on features like that until SMF itself supports that feature... if it ever does... because most people are fine with having one per thread.
  • The mod purposely disables changing voter visibility after a poll is created because people might vote differently if they know their results are going to be PUBLIC, DISCRETE, or PRIVATE.  I don't want to create a mod that would allow people to violate that implicit trust so easily.
  • I have not yet been able to reproduce the problem reported where a date appears in the comment field.  If anyone notices this in the future, please try to provide as many details as possible.  Otherwise, the only thing I can think of is that one of the "manual modifications" caused this, or perhaps someone put a date in the comment field when they voted.
Author of the Voter Visibility mod customization.  Adds the ability to see (and control who sees) who voted for what.  Allows you to conduct secret ballots.  Can also be used to coordinate volunteer signups, and more.

FrizzleFried

Thank you for tackling these issues!


sun-man

#54
Thanks man - thats great


Hm? How to update? Install via package manager ?

Ray Cardillo

Quote from: sun-man on February 04, 2013, 03:58:59 AM
Hm? How to update? Install via package manager ?

Installing or upgrading via package manager is the easiest approach.  The readme will provide full instructions for install and/or upgrade.  Read them carefully and follow them completely and it should be really easy to do.

The only complication would be if something was modified by hand after the previous install, but even then, I provided some advice for that situation as well.
Author of the Voter Visibility mod customization.  Adds the ability to see (and control who sees) who voted for what.  Allows you to conduct secret ballots.  Can also be used to coordinate volunteer signups, and more.

EricGagne

Ray this is a nice mod but there's one little thing missing for us to be able to use it.  We need the administrators to be able to change the visibility setting after a poll is posted.

Is this something I can change with simple changes in the code ?


Arantor

I doubt it would be a simple change; it was specifically written not to allow that.

Ray Cardillo

Quote from: EricGagne on March 10, 2013, 10:39:55 AM
We need the administrators to be able to change the visibility setting after a poll is posted.

This is something people ask about every now and then but I've refused to provide this feature because of what it implies.  I state this limitation in the details for the mod, but maybe explaining the use case a little more would help (see scenarios below).  What it comes down to is that it's a really bad practice once you think about what it implies, so my answer to this request has always been that it's better to delete the poll and ask people to vote again.  This assumes you're asking for the feature to help someone correct a mistake.  In that case, the visibility is either going from more public to less, or from less public to more, and in either case, the voters deserve to have a chance to vote again knowing what the new visibility is (because people often vote differently based on the visibility setting).

Here are the two most relevant scenarios I was faced with when doing usability testing with the community I developed this for...

Scenario #1 (Less Visible -> More Visible):
People who voted in confidence were really upset that their votes were suddenly made available to a larger audience than they originally intended.  They felt that their privacy (or anonymity) on a sensitive topic was violated.  In some cases, they would have voted differently based on the visibility.  When I realized the problem this presented, I came to the conclusion that I wasn't even going to allow this capability as an optional feature, because I didn't want people to have their trust in this mod being so easily violated by an admin.

Scenario #2 (More Visible -> Less Visible):
I considered allowing this case because it's not as dangerous as the former case, but the problem is, that we just have a different spin on a similar problem.  It's again the case that people vote differently based on the visibility of the vote.  The only difference is that in this case, they don't get particularly upset that their vote was revealed, but rather, upset that they would have voted differently if they knew the visibility was more restricted.

So basically, after thinking about these two cases, I came to the decision that I wasn't going to try to support any variant of a feature like that because it would be difficult to do in a way that doesn't introduce complexity or make it easy to violate voter's trust.  Again, a feature like that would have very little value overall (because a better solution is to just republish the vote with the new visibility setting)... so I would encourage you (and anyone else reading this) not to hack the mod or suggest how to hack the mod to implement the feature.  It's not terribly difficult... it's just wrong to do and people will hate you for it (or hate an admin for doing it).  ;)

Hope that explains this issue better for all who have asked about it.

One last thing...
I would consider implementing this in a way that just wipes out all the votes (and warns first)... just for convenience... but that's not really what people are asking for.  I'm also not feeling particularly motivated to be working on new features lately because I don't think anyone who has downloaded the mod has actually donated to the organizations I created this for the benefit of.  ;)
Author of the Voter Visibility mod customization.  Adds the ability to see (and control who sees) who voted for what.  Allows you to conduct secret ballots.  Can also be used to coordinate volunteer signups, and more.

EricGagne

Ray I had a very good reason for asking this.  We run a private forum for board members of a sport federation.  Once a week we have a period of 24 hours where board members can propose resolutions on which we vote.

We need to account for who voted or note because there's consequences for those who miss too many votes.  Since any member of the board can post a poll, I need to make sure that the vote visibility setting is always the same.

It's really not such a big deal since our secretary is an admin on the forum and will always be able to view who voted.   I would just have liked to ensure consistency.

Advertisement: