News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Voter Visibility

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

Previous topic - Next topic

Ray Cardillo

Link to Mod

Overview

This modification enhances polling to allow voters to be displayed for those needing to organize and record the results of polls.  For example, when organizing a group event, friends are often curious about how other friends voted.  Likewise, the secretary of an organization might need to be able to record the results of certain polls (who voted for what).  In addition, some polls might want to allow (or require) comments for certain responses.  With this modification, each poll can be configured to allow various levels of voter visibility and comment requirements, and then the voter log can be viewed by those who are allowed to see them based on the configured voter visibility.

This mod has been well received and well tested in several very active forums.  Anyone who needs these features cannot imagine life without it.  If you install it and do not like something, please take a few minutes and tell me why in the support forum.  I will most certainly pay attention to your feedback.


Main Features

  • Voter Visibility and Comment Requirements can be specified when creating a new poll.
  • Voter Visibility can be set to:

    • PUBLIC - Everyone can see the voter log for the poll.
    • DISCREET - Only the creator and admins can see the voter log for the poll.
    • PRIVATE - Only admins can see the voter log for the poll.
  • Comments can be optional or required depending upon the vote choice or option selected.


Other Notes

  • This mod is most likely not compatible with other mods that significantly change poll behavior (e.g., multiple polls mods).
  • Visibility cannot be changed once the poll is created because that is too sensitive an operation.  Members may vote differently if they know their vote will be PUBLIC versus PRIVATE and changing visibility without their consent would be a violation of the trust communicated when they first voted.
  • Guests that are allowed to post polls cannot specify DISCREET voter visibility because there is no originating account associated with the poll.
  • When comments are available, there is only one comment block available for the vote because that is sufficient most users.
  • The Vote Log results table is a javascript sortable table created by Christian Bach and known as tablesorter 2.0.


Release Notes

  • 1.00 - The initial release candidate.
  • 1.01 - Small bug fixes discovered during the mod approval process.
    • Addressed feedback provided by the mod approval team.
    • Fixed a bug relating to guest voting features.
  • 1.02 - Bugs fixes for issues reported by users in the support forum.
    • Fixed errors being reported relating to polls that do not allow comments.
    • Fixed add polls so that the visibility can be set when adding a poll to an existing topic.
    • Upgraded tablesorter and jQuery to latest stable releases.
  • 2.0 - Redefining version labeling scheme so package manager can see the updates.
  • 2.1 - Updated to be compatible with latest SMF and other minor updates
    • Added support for 2.0.9-2.0.11 (only verified against 2.0.11).
    • Updated jQuery library to latest stable release.
    • Corrected visibility label from "DISCRETE" to "DISCREET".
    • Changed default visibility level to PUBLIC based on user feedback.



License agreement

  • By using this software, you agree to be bound by the license agreement.
  • A copy of the license is included in the license.txt file at the root of the installation package.
  • Simple Machines® is authorized to distribute this modification on SimpleMachines.org and any other medium.


Donationware Notice - Support Local Roller Derby

       
  • This modification was created by Ray Cardillo (aka Mr. Mighty) of Cardillo's Creations LLC and Mr. Mightys Fine Designs in the spirit of helping the Roller Derby community in general, and more specifically The Quadfathers men's roller derby league and the Men's Roller Derby Association.
  • The suggested contribution is $20 to each but any donation is better than nothing.  Go see a game, or help a local league, but please try to contribute something.  These modifications take time to create, improve, and support.  Anything you donate will help motivate future development and will be greatly appreciated by the leagues.


Make A Contribution Using These Links

  • Contribute to The Quadfathers
    The Quadfathers are a league from the Mohawk Valley area of Central New York (my home town and my initial foray into the world of Roller Derby).  It's not a big city so fund-raising can be difficult.  Anything you send will be greatly appreciated!
  • Contribute to the Men's Roller Derby Association
    The Roller Derby community is very open and accepting, promotes volunteerism, and inspires grass roots efforts with strong community ties.  Send a few dollars their way if that's the type of world you want to live in!  :)
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.

Inti31

very nice mod

german(-utf8). translation

// Begin Poll Vote Visibility Display strings
$txt['poll_vv_opt'] = 'Abstimmungsergebnisse anzeigen';
$txt['poll_vv_opt_ro'] = '(nur lesen)';
$txt['poll_vv_opt_public'] = 'ÖFFENTLICH';
$txt['poll_vv_opt_discrete'] = 'DISKRET';
$txt['poll_vv_opt_private'] = 'PRIVAT';
$txt['poll_vv_opt_public_txt'] = 'Jedem Benutzer ist es möglich die Abstimmungsergebnisse aufzurufen';
$txt['poll_vv_opt_discrete_txt'] = 'Nur der Ersteller kann die Abstimmungsergebnisse aufrufen (Administratoren natürlich auch)';
$txt['poll_vv_opt_private_txt'] = 'Nur Administratoren können die Abstimmungsergebnisse aufrufen';
$txt['poll_vv_vlog_empty'] = 'Auf diese Umfrage wurde noch nicht abgestimmt.';
$txt['poll_vv_vlog_title'] = 'Abstimmungslog';
$txt['poll_vv_vlog_button'] = 'zeige Abstimmungen';
$txt['poll_vv_vlog_for'] = 'Antworten auf %1$se Umfrage:';
$txt['poll_vv_vlog_th_tstamp'] = 'Datumsstempel';
$txt['poll_vv_vlog_th_member'] = 'Mitglied';
$txt['poll_vv_vlog_th_choicenum'] = 'Auswahl';
$txt['poll_vv_vlog_th_choicelbl'] = 'Auswahllabel';
$txt['poll_vv_vlog_th_comment'] = 'Kommentar';
$txt['poll_vv_vlog_err_discrete'] = 'Die Abstimmungsergebnisse sind nicht sichtbar, da die Umfrage im Status DISKRET läuft. Da Du nicht der Ersteller der Umfrage bist, hast Du nicht die Möglichkeit die Abstimmungsergebnisse zu sehen (oder Du benötigst Administratorrechte).';
$txt['poll_vv_vlog_err_private'] = 'Die Abstimmungsergebnisse stehen nur den Administratoren zur Verfügung. Die Umfrage hat den Status PRIVAT.';
$txt['poll_vv_vlog_vote_warning'] = 'Status der Umfrage: %1$s; %2$s';
$txt['poll_vv_vlog_guest_or_unknown'] = '(Gast oder Ex-Mitglied)';
$txt['poll_vv_shwcmt_opt'] = 'Erlaube Kommentare zu dieser Umfrage';
$txt['poll_vv_reqcmt_opt'] = 'benötigt Kommentar für';
$txt['poll_vv_reqcmt_warn'] = '(Kommentar erforderlich)';
$txt['poll_vv_cmt_label'] = 'Kommentar';
$txt['poll_vv_cmt_missing_required'] = 'Du musst einen Kommentar zur Auswahloption %1$d: "%2$s" schreiben.';
// End Poll Vote Visibility Display strings
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

Robert.


Ray Cardillo

Thanks for the positive feedback!  Please help me try to "spread the word" and tell people about this mod.  I think every SMF admin would want to install it once they see it in action.  Everyone can benefit from it, but I would think that these features are absolutely essential for any admin who is running a forum for a local organization, volunteer group, sports team, etc.  For example, a secretary must be able to easily record official committee votes without everyone seeing them, sometimes members want to publicly plan a group event and see who else is attending, comments can be used to provide more info or maybe to state what you are bringing to a party, and the list goes on.

Even though there aren't any other mods that provide all of these features I think it's difficult to get visibility.  I tried cross posting to a few relevant threads, but I don't really want to start spamming.  So I'm hoping interest will grow organically by word of mouth.  :)
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.

TheListener

@ Ray the one way you have forgotten for getting word out regarding the mod is by placing a link in your signature.


Ray Cardillo

Yes indeed.   :)  Good suggestion.  Done.
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

I installed this... the new options appear when i make a poll... the comment box appears when I make a poll... but no VIEW VOTES button comes up on the results...

FrizzleFried

Appears to be not compatible with the multi-poll mod I have installed.  Bummer.

TheListener

Quote from: FrizzleFried on May 11, 2012, 08:02:05 PM
Appears to be not compatible with the multi-poll mod I have installed.  Bummer.

May be a good idea to request compatability between the two mods for the next version.

;)

Ray Cardillo

Quote from: FrizzleFried on May 11, 2012, 08:02:05 PM
Appears to be not compatible with the multi-poll mod I have installed.  Bummer.

Ah, yeah, I can't speak for the other mod, but I tried to follow the new SMF mod coding guidelines very carefully (and that mod may have also) but the way the mod system works can make it difficult to ensure compatibility sometimes.  In particular, if two mods touch the same section, and change SMF behavior enough, it can be difficult or impossible for them to be compatible without special workarounds, etc.

Out of curiosity, did you happen to get any errors when you performed the install of this mod?  If it had trouble finding the insertion point, then that would be the obvious source of the problem.  If there were no messages in RED on the pre-install check, then the other mod must have changed the way the polling works in a way that effected my mod.  If the other mod creator has time to diagnose and there's a simple solution, I would be willing to spend some time on that.  Otherwise, I would have to spend some time digging deep, understanding the other mod, etc, so will only do that if it's a common request.
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

Yes... I for 4 errors... and manually installed those sections...

Let see if I can remember...

Display.php

edits 1 and 4.... I believe edit 4 is where the issue is as the mod that is already installed changed the code to include ['poll'] prior to each other [] in the line...

Display.template.pho

edit 3

post.php

edit 6

Most of the manual edits were simply because something else was added to the line it was looking for... but edit 4 of the DISPLAY.PHP file there was considerable difference in the code it was looking for to place the new code after and the code I found.

FrizzleFried

RE: That one edit...

It's looking for:

$context['show_view_results_button'] = $context['allow_vote'] && (!$context['allow_poll_view'] || !$context['poll']['show_results'] || !$context['poll']['has_voted']);

But what is there is:

$context['poll']['show_view_results_button'] = $context['poll']['allow_vote'] && (!$context['poll']['allow_poll_view'] || !$context['poll']['show_results'] || !$context['poll']['has_voted']);

Dropping what it wants to add after the above code in place below the modified code does not work.

Ray Cardillo

Yeah, when you reported that the other mod is a "multi poll" mod I automatically assumed that the other mod is changing the default behavior of one poll per topic and touching all the places required to reference/dereference each poll that might be associated with the topic.  If that's the case, I think this would always have to be a "manual" edit by the installer because you would have to make sure the references to the "poll" that my mod makes also accounts for the possibility of multiple polls per topic.

So that's what you would have to do (unfortunately)... review all of the edits my mod makes... and make sure they're using that other mods style of poll referencing to make sure each operation is happening for the correct poll.  If you're a dev, it's doable (but painful), otherwise it sounds like the kinda thing that is just going to have to be incompatible since it sounds like that mod is changing the storage model slightly to account for the possibility of multiple polls being present.
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 May 11, 2012, 08:42:56 PM
Yeah, when you reported that the other mod is a "multi poll" mod I automatically assumed that the other mod is changing the default behavior of one poll per topic and touching all the places required to reference/dereference each poll that might be associated with the topic.  If that's the case, I think this would always have to be a "manual" edit by the installer because you would have to make sure the references to the "poll" that my mod makes also accounts for the possibility of multiple polls per topic.

So that's what you would have to do (unfortunately)... review all of the edits my mod makes... and make sure they're using that other mods style of poll indexing to make sure each operation is happening for the correct poll.  If you're a dev, it's doable (but painful), otherwise it sounds like the kinda thing that is just going to have to be incompatible since it sounds like that mod is changing the storage model slightly to account for the possibility of multiple polls being present.

Yeah... being that I am a "hack" at best... I think it comes down to deciding which mod is preferable.

:)

Ray Cardillo

Quote from: FrizzleFried on May 11, 2012, 08:44:35 PM
Yeah... being that I am a "hack" at best... I think it comes down to deciding which mod is preferable.

Sorry about that... wish there was an easier way.   :-\

In the community of folks I help out, I know that multiple polls per topic would cause way too much confusion, and they wouldn't want that capability at all (or could live without it for the rare cases they thought it might be useful)... whereas they absolutely require the Voter Visibility features.  So like you said, it's just a matter of determining what your members need more... or will derive more benefit from... even if they don't realize it at first.  :)

Just in case others find this thread, here is a list of "off label" usages that our members started doing with the Voter Visibility mod even though I didn't explicitly design for these cases:

  • Public polls for parties help people determine if their click of friends are going or not (and help decide if they are going or not) and comments can be used as a task or food signup because everyone sees the results in a public poll.
  • Aside from league secretaries using discrete votes, other regular members can use them (e.g., team captain or other representatives) as a way of collecting honest feedback in a semi-private way that they can use to follow up on issues privately.
  • Not only can comments be used to justify a certain answer, or provide some other info, but they can also be used as an "other" poll option.  I try to advise against this practice for the most part, but it can be convenient in some cases.
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

Ironically... I put up a poll...   8)


Ray Cardillo

Quote from: FrizzleFried on May 11, 2012, 09:25:56 PM
Ironically... I put up a poll...   8)

LOL!!!  A poll preference poll.  That's awesome.  :)  If you have the time, I always setup a test instance by restoring a backup onto another test sub-domain, and then invite key members to "kick the tires" before making a decision that gets rolled out to the live site.
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

#17
Membership decided on your mod.  I pulled the multi-poll mod and installed yours without error.  It works great... but it is throwing the occassional error (24 in the last 5 days...nothing huge but I want to track it down)...

These are the errors being thrown:

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


EDIT: The above code stands on it's own ... and the following errors were generated at the same time.

http://www.xxxx.com/index.php?action=editpoll2;topic=1407.0
8: Undefined index: reqcmts
File: /home/ahaforum/public_html/Sources/Poll.php
Line: 844


http://www.xxxx.com/index.php?action=editpoll2;topic=1407.0
8: Undefined index: poll_vvis
File: /home/ahaforum/public_html/Sources/Poll.php
Line: 719


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


The TOP ERROR stands on it's own... the following 3 were generated at the same time.  The bottom 3 have something to do with POSTING a poll as that user had posted a poll at that time and the top error has something to do with viewing the poll.


Ray Cardillo

I will try to take a look soon... but problems like you are reporting usually only happen when something in the install gets FUBAR and the variable is never set from the UI template side, etc.  We did have some things I had to fix regarding Guest polling with this feature, so can you confirm if this is happening to any particular certain type of user?  If it doesnt happen consistently for the same user then it might be caching of some sort.  Does it happen to people using a certain theme?  Did you install to core and curve theme?  Are the users who experience this using another theme?

Basically, tell me anything you can determine regarding the type of user, when/how it happens, and if there is a correlation to what theme (or other config) that might be at play.  I have to be able to debug it or reproduce it to understand what's going on so tell me any details that seem to go together (e.g., lead to the failure case).
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 May 17, 2012, 02:38:08 PM
I will try to take a look soon... but problems like you are reporting usually only happen when something in the install gets FUBAR and the variable is never set from the UI template side, etc.  We did have some things I had to fix regarding Guest polling with this feature, so can you confirm if this is happening to any particular certain type of user?  If it doesnt happen consistently for the same user then it might be caching of some sort.  Does it happen to people using a certain theme?  Did you install to core and curve theme?  Are the users who experience this using another theme?

Basically, tell me anything you can determine regarding the type of user, when/how it happens, and if there is a correlation to what theme (or other config) that might be at play.  I have to be able to debug it or reproduce it to understand what's going on so tell me any details that seem to go together (e.g., lead to the failure case).

FWIW... I have no guests on my forum (it's a private/invite only forum)...

If you can even give me some clues where to look I can poke around.  The PACKAGE MANAGER install wen without a hitch.

EDIT: Oh... and there doesn't appear to be any negative impact on the users experience...nothing is "breaking" or not working from their perspective.



Advertisement: