[ABD] Advanced Show Poll Voters 0.0.1

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Juanla
Registered User
Posts: 44
Joined: Mon Aug 24, 2009 8:03 pm

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by Juanla »

Nice Mod :D Thanks!
Sorry my bad english :)
User avatar
Praetorian Guard
Registered User
Posts: 789
Joined: Wed Oct 07, 2009 12:42 am

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by Praetorian Guard »

Hippie459MN wrote:Nothing is messed up. The select all is a link that when clicked will select all the text in the code box. Thats all.
So here is how it would look with out the code: Select All in there...

Open: language/en/posting.php
Find:

Code: Select all

?>
Add Before:

Code: Select all

$lang = array_merge($lang, array(
	'POLL_SHOW_VOTERS'		=> 'Show poll voters',
	'POLL_SHOW_VOTERS_EXPLAIN'	=> 'If enabled users are able to see the poll voters.',
));
So find ?> in the file and on a line before that, add the code above. That easy. :D

EDIT: You are right. It should be add before. I have fixed this post here to reflect what it should be.


Thanks! So do you see the submit vote button even after submitting a vote intially? Would like to fix this issue. Any help appreciated, thanks!
User avatar
Hippie459MN
Registered User
Posts: 948
Joined: Mon Oct 15, 2007 10:13 pm
Location: Minnesota, USA
Contact:

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by Hippie459MN »

Nope. In the poll creatoin tab I enter the question, then the answers, then select how many options a user is able to select then number of days then make sure allow re-voting is unchecked and then if you want to view the voters check the view voters box and hit submit.

Then once I cast my vote in the poll I click submit and then thats it. I can not revote. The button to submit vote is not even there. I would check all your edits. Maybe back up from your original files and start fresh.
User avatar
Praetorian Guard
Registered User
Posts: 789
Joined: Wed Oct 07, 2009 12:42 am

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by Praetorian Guard »

Hippie459MN wrote:Nope. In the poll creatoin tab I enter the question, then the answers, then select how many options a user is able to select then number of days then make sure allow re-voting is unchecked and then if you want to view the voters check the view voters box and hit submit.

Then once I cast my vote in the poll I click submit and then thats it. I can not revote. The button to submit vote is not even there. I would check all your edits. Maybe back up from your original files and start fresh.

This may be messed up from previous mods. I had some issues a while back with other mods. I wonder if it affected it? I wonder how I can narrow this down? Which files control the poll feature? Thanks!
User avatar
Praetorian Guard
Registered User
Posts: 789
Joined: Wed Oct 07, 2009 12:42 am

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by Praetorian Guard »

Songman
Registered User
Posts: 14
Joined: Wed Jul 11, 2007 11:31 pm

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by Songman »

Anybody know of anything like this that will work with themes based on SubSilver2?
ProfessorJames
Registered User
Posts: 20
Joined: Sun Dec 20, 2009 10:14 am

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by ProfessorJames »

Here are the subsilver based template edits I made:

in posting_poll_body.html
find

Code: Select all

<!-- IF S_POLL_VOTE_CHANGE -->
	<tr>
		<td class="row1"><b class="genmed">{L_POLL_VOTE_CHANGE}:</b><br /><span class="gensmall">{L_POLL_VOTE_CHANGE_EXPLAIN}</span></td>
		<td class="row2"><input type="checkbox" class="radio" name="poll_vote_change"{VOTE_CHANGE_CHECKED} /></td>
	</tr>
<!-- ENDIF -->
after add

Code: Select all

			<tr>
				<td class="row1"><b class="genmend">{L_POLL_SHOW_VOTERS}:</b></td>
				<td class="row2"><span class="gensmall"><input type="checkbox" id="poll_show_voters" name="poll_show_voters"{SHOW_VOTERS_CHECKED} /> {L_POLL_SHOW_VOTERS_EXPLAIN}</span></td>
			</tr>

in viewtopic_body.html
find

Code: Select all

							<td class="gen" align="center">[ {poll_option.POLL_OPTION_RESULT} ]</td>
							<!-- IF poll_option.POLL_OPTION_VOTED -->
								<td class="gensmall" valign="top"><b title="{L_POLL_VOTED_OPTION}">x</b></td>
							<!-- ENDIF -->
						<!-- ENDIF -->
					</tr>
after add

Code: Select all

<tr>
<!-- IF S_SHOW_VOTERS --><!-- IF not S_CAN_VOTE --><td>Who voted the above option:</td><!-- ENDIF --><td class="resultbar">{poll_option.POLL_OPTION_VOTERS}</td><!-- ENDIF -->
</tr>

I hope this helped. Feel free to change the "who voted the above option:" text to whatever you'd prefer to see there.
coolhead
Registered User
Posts: 2
Joined: Wed Apr 28, 2010 10:17 am

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by coolhead »

Can we export voters ? Or have a table, list of voters ?

Thks, Verry good MOD
A quand une version official, after BETA ?
nexum
I've Been Banned!
Posts: 156
Joined: Tue May 25, 2004 8:36 pm

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by nexum »

is it working with phpbb 3.0.5 ?
coolhead
Registered User
Posts: 2
Joined: Wed Apr 28, 2010 10:17 am

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by coolhead »

nexum wrote:is it working with phpbb 3.0.5 ?
oui
pawelooss
Registered User
Posts: 48
Joined: Wed Nov 04, 2009 8:26 pm

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by pawelooss »

It doesn't work for me if I set more than 1 option to choose in poll. :?:
phpBB3 fan! ;)
tunoverde
Registered User
Posts: 5
Joined: Sat Jan 12, 2008 10:02 am

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by tunoverde »

voters can be sorted in order of voting? and not in alphabetical order.
tunoverde
Registered User
Posts: 5
Joined: Sat Jan 12, 2008 10:02 am

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by tunoverde »

Please need help, so someone tell me how to order the voters by voting order and not alphabetically
I guess this is the part that should be changed but I try and I do not know how.

Code: Select all

$sql = 'SELECT poll_option_id
         FROM ' . POLL_VOTES_TABLE . '
         WHERE topic_id = ' . $topic_id . '
            AND vote_user_id = ' . $user->data['user_id'];
      $result = $db->sql_query($sql);
pawelooss
Registered User
Posts: 48
Joined: Wed Nov 04, 2009 8:26 pm

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by pawelooss »

Look for "ORDER BY", here:

Code: Select all

		$sql_voters = '
			SELECT u.username, u.user_colour, pv.vote_user_id
			FROM ' . POLL_VOTES_TABLE . ' pv, ' . USERS_TABLE . ' u
			WHERE pv.topic_id = ' . $topic_id . '
				AND poll_option_id = ' . $poll_info[$i]['poll_option_id'] . '
				AND pv.vote_user_id = u.user_id
			ORDER BY u.username_clean ASC, pv.vote_user_id ASC';
Unfortunately, POLL_VOTES_TABLE contains only:

Code: Select all

topic_id 	poll_option_id 	vote_user_id 	vote_user_ip
so there isn't any vote_id or vote_time which can you order chronologically.
phpBB3 fan! ;)
tunoverde
Registered User
Posts: 5
Joined: Sat Jan 12, 2008 10:02 am

Re: [Beta] Advanced Show Poll Voters 0.0.1

Post by tunoverde »

I put an index (id) on that table. And could not order by index?
The only thing I've tried and I do not know how to do it.
Another thing I do not speak English and I'm using a translator, I speak from my vocabulary.
Locked

Return to “[3.0.x] Abandoned MODs”