Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 08:37 am 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 Smile
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
[QUOTE config.php]
$_CONF['pollsloginrequired'] = 1;
[/QUOTE]
 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 Razz
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Make sure the Poll block is not visible for anonymous visitors, ie. uncheck the "Anonymous R" checkbox for that block.

bye, Dirk
 Quote

Success

Anonymous
Ohhhh Perfect

Thanks for all

Suck
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
Wait a minute Dirk, how is it possible his specific poll's permissions bypassed config.php?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The $_CONF['pollsloginrequired'] setting actually only refers to the list of past polls. Sort of silly, now that I think about it, but that's how it's implemented at the moment.

bye, Dirk
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
Don't you actually mean "The $_CONF['pollsloginrequired'] setting actually only refers to the list of future polls" (that is, every poll that is created in a moment when $_CONF['pollsloginrequired']=1)?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC: Don't you actually mean [...]

No.

bye, Dirk
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818

Quote by: LWC] Don't you actually mean [...]
No.


Then I don't get it...
 Quote

Status: offline

ronack

Forum User
Full Member
Registered: 05/27/03
Posts: 612
It affects the Poll list, not the Poll Blocks. You have to specify that the Block is not seen by anonymous too.
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
I see, so that setting doesn't affect the frontpage's polls, but just pollbooth.php itself?
 Quote

Status: offline

knuff

Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
Ok, I did a search, trust me Mr. Green

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 Mr. Green
Vanrillaer.com - our Family Portal
 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):
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 { ...}
}

 
Like this:
Text Formatted Code
if (empty ($_USER['username']) && (($_CONF['loginrequired'] == 1) ||
        ($_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.
 Quote

All times are EDT. The time is now 08:37 am.

  • 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