Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Nibogo on May 02, 2011, 12:54:31 PM

Title: View Voters at Polls
Post by: Nibogo on May 02, 2011, 12:54:31 PM
(http://www.smfpacks.com/imagenes/nuevo_logo_mod.png) (http://www.smfpacks.com)

View Voters at Polls v1.0 - NIBOGO
Simple mods that allows each poll creator to show (or not) the voters of his/her poll.


Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3003) | Support (http://www.smfpacks.com/index.php?board=20) | Official Website (http://www.smfpacks.com/) | Donate (http://www.smfpacks.com/donate.php)



Important Info:
o This Mod was created by SMFPacks.com - The #1 Website for the Customziation of your SMF.

SMFPacks.com Provides Other Great Packages:
- Reason for Editing Mod.
- Yet Another Global Announcements Mod.
- SMF Social Groups.
- SMF Links Directory.
- SMF Downloads Directory.
- SMF Dynamic Directory.
- Advanced Topic Prefix Mod.
- Advanced Invitations System.
- Move Topic Notification.
- PM to New Members.
- Permissions Info.
- Next Post Level.
- Karma Buttons.
- SMF Multi Quote.
- Attachments in Topics.
- and much more visit us on SMFPacks.com

Features:
o Each poll creator can show or not voters.
o A warning messages is showned to users, in case that are going to vote and voters are showned.
o Voters are showned based on the same permissions that results are.
o Works on all databases system.

Languages:
- English/English UTF8

Compatibility:
- 2.0

Changelog:

+ = New Features | ! = Bug Fixing | @ = Change | - = Feature Removed | * = Important Info

Version 1.0 - 10/March/2010
* Modification Released
Title: Re: View Voters at Polls
Post by: -=[Vyorel]=- on May 02, 2011, 02:01:13 PM
Wow! Very nice mod!

Romanian translate:

<file name="$languagedir/Modifications.romanian.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// View Voters by NIBOGO for SMFPacks.com
$txt['poll_show_voters'] = 'Afiseaza Vontatii';
$txt['poll_show_voters_desc'] = '(Poate fi schimbata mai tarziu)';
$txt['poll_view_voters'] = 'Vizualizeaza Votantii';
$txt['poll_warning_view_voters'] = 'ATENTIE! Votantii si alegerile lor vor fi afisate!';
]]></add>
</operation>
</file>
    <file name="$languagedir/Modifications.romanian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// View Voters by NIBOGO for SMFPacks.com
$txt['poll_show_voters'] = 'fiseaza Vontatii';
$txt['poll_show_voters_desc'] = '(Poate fi schimbata mai tarziu)';
$txt['poll_view_voters'] = 'Vizualizeaza Votantii';
$txt['poll_warning_view_voters'] = 'ATENTIE! Votantii si alegerile lor vor fi afisate!';
]]></add>
</operation>
</file>
Title: Re: View Voters at Polls
Post by: luuuciano on May 06, 2011, 08:37:53 PM
Nibogo, this mod will work on rc4 + security patch?
Title: Re: View Voters at Polls
Post by: Nibogo on May 06, 2011, 08:38:40 PM
Quote from: luuuciano on May 06, 2011, 08:37:53 PM
Nibogo, this mod will work on rc4 + security patch?


I guess
Title: Re: View Voters at Polls
Post by: chinaren on May 07, 2011, 02:04:53 AM
OMG, thank you so much for this mod.  I've wanted exactly this for ages!   ;D
Title: Re: View Voters at Polls
Post by: chinaren on May 07, 2011, 02:21:46 AM
Mm, just a couple of things.  You've a typo, it says 'showned' instead of 'shown'. 


Also, would it be possible to have an option to just show who voted, but not for what?


Seems to be working perfectly so far though!
Title: Re: View Voters at Polls
Post by: MaxLiao on June 25, 2011, 07:38:16 AM
Quote from: chinaren on May 07, 2011, 02:21:46 AM
Also, would it be possible to have an option to just show who voted, but not for what?
I second this request.  On my site, it is often important to know IF someone voted, but it's not always fair to them for people to know HOW they voted.
Title: Re: View Voters at Polls
Post by: Jessica. on June 25, 2011, 02:09:38 PM
maybe only admins can see who voted for what?
Title: Re: View Voters at Polls
Post by: Nibogo on June 29, 2011, 07:43:26 PM
Mod updated for SMF 2.0
Title: Re: View Voters at Polls
Post by: Shorti25 on June 30, 2011, 12:40:12 AM
it would be great to make the voters shown only to admins
Title: Re: View Voters at Polls
Post by: Joker™ on June 30, 2011, 12:52:47 AM
Link to Mod << you need to fix that url ;).
Title: Re: View Voters at Polls
Post by: Matthew K. on June 30, 2011, 01:47:09 AM
You should be able to modify his post to add it, can you not?
Quote from: Joker™ on June 30, 2011, 12:52:47 AM
Link to Mod << you need to fix that url ;).
Title: Re: View Voters at Polls
Post by: live627 on June 30, 2011, 01:57:45 AM
Woudn't it be better for Nibogo to do it himself?
Title: Re: View Voters at Polls
Post by: Joker™ on June 30, 2011, 09:00:23 AM
Quote from: Labradoodle-360 on June 30, 2011, 01:47:09 AM
You should be able to modify his post to add it, can you not?
Nope don't have edit powers here :P.


Quote from: live627 on June 30, 2011, 01:57:45 AM
Woudn't it be better for Nibogo to do it himself?
+100.
Title: Re: View Voters at Polls
Post by: Shorti25 on July 14, 2011, 03:15:16 AM
Quote from: Shorti25 on June 30, 2011, 12:40:12 AM
it would be great to make the voters shown only to admins
is it possible ?
maybe there will be only something included like "allowed if admin"
but where and what´s the right code for it

help please
Title: Re: View Voters at Polls
Post by: Sapinho® on July 18, 2011, 04:01:22 AM
regards all any know, if the mod of nibogo "view voters at polls", can compatiby whit "additonal polls"

when i have to try install additional polls, not can, and i very noob, for make work two

ty for advances
Title: Re: View Voters at Polls
Post by: MovedGoalPosts on July 23, 2011, 11:08:32 AM
Quote from: chinaren on May 07, 2011, 02:21:46 AM
Mm, just a couple of things.  You've a typo, it says 'showned' instead of 'shown'. 

Ditto?  Is there an easy fix in a template somewhere?

Edit:  this can be corrected by searching for "showned" in the languages/modifications.engligh.php file.
Title: Re: View Voters at Polls
Post by: chinaren on July 23, 2011, 07:28:49 PM
Quote from: movedgoalposts on July 23, 2011, 11:08:32 AM
Edit:  this can be corrected by searching for "showned" in the languages/modifications.engligh.php file.


Thanks for finding this! 



Title: Re: View Voters at Polls
Post by: Shorti25 on July 31, 2011, 06:52:15 AM
Quote from: Shorti25 on July 14, 2011, 03:15:16 AM
Quote from: Shorti25 on June 30, 2011, 12:40:12 AM
it would be great to make the voters shown only to admins
is it possible ?
maybe there will be only something included like "allowed if admin"
but where and what´s the right code for it

help please
bump
Title: Re: View Voters at Polls
Post by: Khadamon on August 04, 2011, 04:53:26 AM
I second all the propositions :

- Make a permission for ALWAYS be able to see who voted what, no matter what the option selected : usefull for Admin (always) and some user group like moderation or whatever
- Make a setting to just show the voters and not what they voted for
- Make it reversible ; in case of unappropriate poll, the moderation could act on it without necesseraly delete/recreate the poll

Thanks !
Title: Re: View Voters at Polls
Post by: eric1234 on March 20, 2012, 03:55:49 PM
I notice that normal user also able to view that who vote for who. >.<

May i know how to set it that it is only the Admin and selected membergroup that can view? :)
Title: Re: View Voters at Polls
Post by: Nibogo on March 21, 2012, 06:59:57 PM
You'd add a permission for it
Title: Re: View Voters at Polls
Post by: Ray Cardillo on May 07, 2012, 09:04:21 AM
Quote from: Shorti25 on July 31, 2011, 06:52:15 AM
Quote from: Shorti25 on July 14, 2011, 03:15:16 AM
Quote from: Shorti25 on June 30, 2011, 12:40:12 AM
it would be great to make the voters shown only to admins
is it possible ?
maybe there will be only something included like "allowed if admin"
but where and what´s the right code for it

help please
bump

In support of CNY Roller Derby, I was asked if similar capabilities are possible with SMF, so I asked other mod writers for similar features, but was denied by all of them.  So I had to spend the time to derive requirements from their needs and create a new modification.  Since I had to spend the time, I also spent the time to contribute back to the community and release it as an official modification.

I don't want to list all of the features here, but it can do what you asked about by configuring a poll to be PRIVATE instead of DISCRETE or PUBLIC and it can do lots of other stuff that others have asked about.  So we think it's awesome, but I am also willing to consider implementing other features in the future, as time permits.

The modification is known as Voter Visibility (http://custom.simplemachines.org/mods/index.php?mod=3373) and it was recently approved for release so we are hoping that others start using it and help spread the word!  :)

Title: Re: View Voters at Polls
Post by: usrfsledge on March 22, 2014, 10:44:45 AM
Any updates for v2.0.7 coming up, or is this mod dead?
Title: Re: View Voters at Polls
Post by: Nibogo on March 22, 2014, 12:09:11 PM
Using version emulate should do it.
Title: Re: View Voters at Polls
Post by: usrfsledge on March 25, 2014, 05:04:06 AM
Thanks, I'm gonna try that
Title: Re: View Voters at Polls
Post by: Nibogo on March 25, 2014, 08:28:08 AM
No problem :)
Title: Re: View Voters at Polls
Post by: Blade73 on September 08, 2018, 01:05:43 PM
well im still using this mod but there is one thing that i would like to get some help with
Thats is the names that is showned is the reg. username in our forums all has been given a displayname , so where is it possible to change that?

Thx in advance for any asistance.
Title: Re: View Voters at Polls
Post by: Nibogo on September 13, 2018, 11:04:51 PM
Quote from: Blade73 on September 08, 2018, 01:05:43 PM
well im still using this mod but there is one thing that i would like to get some help with
Thats is the names that is showned is the reg. username in our forums all has been given a displayname , so where is it possible to change that?

Thx in advance for any asistance.

Unfortunately that can only be changed code wise :(
Title: Re: View Voters at Polls
Post by: Combert on September 22, 2018, 07:25:12 AM
Hi

I am not a coder, but I changed these two operations in the install.xml file to make it 2.0.15 compatible and make it show real names instead of user name.

Maybe someone with better smf coding knwoledge can check if what I did was OK.


        <operation>
            <search position="replace"><![CDATA[$context['allow_poll_view'] = allowedTo('moderate_board') || $pollinfo['hide_results'] == 0 || ($pollinfo['hide_results'] == 1 && $context['poll']['has_voted']) || $context['poll']['is_expired'];
$context['poll']['show_results'] = $context['allow_poll_view'] && (isset($_REQUEST['viewresults']) || isset($_REQUEST['viewResults']));
$context['show_view_results_button'] = $context['allow_vote'] && $context['allow_poll_view'] && !$context['poll']['show_results'];]]></search>
            <add><![CDATA[$context['allow_poll_view'] = allowedTo('moderate_board') || $pollinfo['hide_results'] == 0 || ($pollinfo['hide_results'] == 1 && $context['poll']['has_voted']) || $context['poll']['is_expired'];
            $context['poll']['view_voters'] = $context['allow_poll_view'] && isset($_REQUEST['viewvoters']) && $pollinfo['show_voters'] == 1;
            $context['poll']['show_results'] = !$context['poll']['view_voters'] && $context['allow_poll_view'] && (isset($_REQUEST['viewresults']) || isset($_REQUEST['viewResults']));
            $context['show_view_results_button'] = $context['poll']['view_voters'] || ($context['allow_vote'] && $context['allow_poll_view'] && !$context['poll']['show_results']);
            $context['show_view_voters_button'] = $context['poll']['show_voters'] && !$context['poll']['view_voters'];]]></add>
        </operation>
        <operation>
            <search position="replace"><![CDATA[// Now look through each option, and...]]></search>
            <add><![CDATA[// View Voters!
            if ($context['poll']['view_voters'])
            {
                $request = $smcFunc['db_query']('', '
                    SELECT lp.id_member, mem.real_name, lp.id_choice
                    FROM {db_prefix}log_polls AS lp
                        LEFT JOIN {db_prefix}members AS mem ON (lp.id_member = mem.id_member)
                    WHERE lp.id_poll = {int:id_poll}',
                    array(
                        'id_poll' => $context['poll']['id'],
                    )
                );
           
                while ($row = $smcFunc['db_fetch_assoc']($request))
                {
                    $pollOptions[$row['id_choice']]['voters'][$row['id_member']] = $row['real_name'];
                }
                $smcFunc['db_free_result']($request);
            }

            // Now look through each option, and...]]></add>
        </operation>