Advertisement:

Author Topic: View Voters at Polls  (Read 14831 times)

Offline eric1234

  • Full Member
  • ***
  • Posts: 683
Re: View Voters at Polls
« Reply #20 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? :)


Offline Ray Cardillo

  • Semi-Newbie
  • *
  • Posts: 44
  • Gender: Male
  • Work Hard // Play Harder
    • raycardillo on LinkedIn
Re: View Voters at Polls
« Reply #22 on: May 07, 2012, 09:04:21 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 and it was recently approved for release so we are hoping that others start using it and help spread the word!  :)

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.

Offline usrfsledge

  • Semi-Newbie
  • *
  • Posts: 30
Re: View Voters at Polls
« Reply #23 on: March 22, 2014, 10:44:45 AM »
Any updates for v2.0.7 coming up, or is this mod dead?


Offline usrfsledge

  • Semi-Newbie
  • *
  • Posts: 30
Re: View Voters at Polls
« Reply #25 on: March 25, 2014, 05:04:06 AM »
Thanks, I'm gonna try that


Offline Blade73

  • Semi-Newbie
  • *
  • Posts: 50
  • Gender: Male
Re: View Voters at Polls
« Reply #27 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.

Offline Nibogo

  • SMF Hero
  • ******
  • Posts: 6,663
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: View Voters at Polls
« Reply #28 on: September 13, 2018, 11:04:51 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 :(

Offline Combert

  • Semi-Newbie
  • *
  • Posts: 16
  • Gender: Male
Re: View Voters at Polls
« Reply #29 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.

Code: [Select]
        <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>