Quote:
Originally Posted by alkatraz
Just discovered that my members can see who voted, I'd love an option for it to be visable to admins only.
|
It looks like you're going to have to modify the code as the table rows/cells that make up the "Who voted" row isn't template-ized.
Any way, here's one way to do this if you only want Administrators (usergroupid = 6) to see the stats:
Replace:
Code:
$Options .= "<tr>
<td width='80%' class='alt2'>{$opt['q']}</td>
<td width='20%' class='alt1' align='center'>This has had {$opt['votes']} vote(s)</td>
</tr>
<tr>
<td width='100%' class='alt1' colspan='2'><b>Who Voted:</b> {$thisVoted}</td>
</tr>
\n";
with:
Code:
$Options .= "<tr>
<td width='80%' class='alt2'>{$opt['q']}</td>
<td width='20%' class='alt1' align='center'>This has had {$opt['votes']} vote(s)</td>
</tr>";
if ($bbuserinfo[usergroupid] == 6) {
$Options .="<tr>
<td width='100%' class='alt1' colspan='2'><b>Who Voted:</b> {$thisVoted}</td>
</tr>
\n";
}
You can modify the "if" confitional to include more usergroupids (eg "if ($bbuserinfo[usergroupid] == 6 || $bbuserinfo[usergroupid] == 7)") if you want other usergroups to see the stats...
Hope that helps!