PDA

View Full Version : All polls are public polls- for admin?


Caiman
01-05-2005, 01:29 AM
How about this, I know there is an option to make a poll public so everyone can see who voted, but I'd like to be able to make it so all polls act like this if an admin is viewing them, instead of having to go into admin cp>posts>who voted and so on...

Can I do this with conditional work?

Xenon
01-05-2005, 01:39 PM
not tested, but it should work i think

open showthread.php

find // get poll info
$pollinfo = $DB_site->query_first("
SELECT *
FROM " . TABLE_PREFIX . "poll
WHERE pollid = $pollid
");


and below add:

if ($bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL)
{
$pollinfo['public'] = 1;
}

Caiman
01-23-2005, 07:20 AM
Hey thanks, been a while since I've checked into here. It kinda works, the poll result numbers become links like they would for a public poll and I am taken for instance to

poll.php?do=showresults&pollid=7

everything works and I see the results page, except I dont see any usernames of who voted (like I would in a normal public poll)... any ideas?

Thanks again!

Xenon
01-23-2005, 02:45 PM
when the results are shown on showthread, it works

if you go to poll.php you have to apply the canges to poll.php as well :)

Haiko
01-24-2005, 12:49 AM
Stefan,

Long time fan and lurker, first time poster ... will this also obfuscate who voted to all members who are not Admins by default?

Caiman
01-24-2005, 11:28 AM
Thanks Xenon! :)

Xenon
01-24-2005, 03:56 PM
@Caiman: your welcome :)

@Haiko: i have no idea what "obfuscate" means, but from what i understood, the answer is no. The hack just changes Admins fetures, normal users won't see any difference

Marco van Herwaarden
01-24-2005, 08:19 PM
obfuscate = hide (i know the second is spelled correct ;))