Welcome to Geeklog, Anonymous Sunday, September 24 2023 @ 03:33 pm EDT
Geeklog Forums
Poll Registration
Success
Anonymous
How can i do to make that only logged users could vote in the poll?
Sorry for my bad english
Success
Sorry for my bad english
Success

5
4
Quote
Success
Anonymous
Yes, i have:
$_CONF['loginrequired'] = 1; // all of them, if set to 1 will override all else
$_CONF['submitloginrequired'] = 1;
$_CONF['commentsloginrequired'] = 1;
$_CONF['pollsloginrequired'] = 1;
But non-logged users could still vote in the poll.
If anyone can helpme...
Thanks LWC
Success
$_CONF['loginrequired'] = 1; // all of them, if set to 1 will override all else
$_CONF['submitloginrequired'] = 1;
$_CONF['commentsloginrequired'] = 1;
$_CONF['pollsloginrequired'] = 1;
But non-logged users could still vote in the poll.
If anyone can helpme...
Thanks LWC
Success

9
5
Quote
Success
Anonymous
Ohhhh Perfect
Thanks for all
Suck
Thanks for all
Suck
5
5
Quote
Status: offline
knuff
Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
Ok, I did a search, trust me
I couldn't find it, and I know there is a thread somewhere outhere, that covers my question, but maybe not the answer.
Anyway, anyome made a mod so that a vote would be linked to the member and not just storing the IP for a certain time ?
I would like to use the poll so that our members can vote just once, just like in a democracy
Vanrillaer.com - our Family Portal

I couldn't find it, and I know there is a thread somewhere outhere, that covers my question, but maybe not the answer.
Anyway, anyome made a mod so that a vote would be linked to the member and not just storing the IP for a certain time ?
I would like to use the poll so that our members can vote just once, just like in a democracy

Vanrillaer.com - our Family Portal
5
6
Quote
Status: offline
jmucchiello
Forum User
Full Member
Registered: 08/29/05
Posts: 985
I probably wouldn't take much to fix this. Just need to swap these ifs (sorta) in public_htmlpolls/index.php (in v1.4):
$display .= COM_siteHeader ('menu', $LANG_POLLS['pollstitle']);
if (empty ($_USER['username']) && (($_CONF['loginrequired'] == 1) ||
($_PO_CONF['pollsloginrequired'] == 1))) {
...
else { ...}
}
Like this:
($_PO_CONF['pollsloginrequired'] == 1)))
{ ...
} else if (empty($qid) { ...
} else ....
There are probably a few cases where some testing would be needed. Also some attention to the COM_siteHeader calls would be required.
Text Formatted Code
if (empty($qid)) {$display .= COM_siteHeader ('menu', $LANG_POLLS['pollstitle']);
if (empty ($_USER['username']) && (($_CONF['loginrequired'] == 1) ||
($_PO_CONF['pollsloginrequired'] == 1))) {
...
else { ...}
}
Text Formatted Code
if (empty ($_USER['username']) && (($_CONF['loginrequired'] == 1) ||($_PO_CONF['pollsloginrequired'] == 1)))
{ ...
} else if (empty($qid) { ...
} else ....
7
3
Quote
All times are EDT. The time is now 03:33 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content