1
vlatko
Can polls be made readable and votable by unregistered users?
  • 2004/9/20 17:59

  • vlatko

  • Just popping in

  • Posts: 8

  • Since: 2004/9/15


I am unable to make my polls appear on the top page for unregistered visitors. Is this possible?

2
Stewdio
Re: Can polls be made readable and votable by unregistered users?
  • 2004/9/20 18:04

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Go to System Admin>Groups>Anonymous and enable the module from there for anonymous users.

3
vlatko
Re: Can polls be made readable and votable by unregistered users?
  • 2004/9/20 19:16

  • vlatko

  • Just popping in

  • Posts: 8

  • Since: 2004/9/15


Got it! Thanks. Any way to make the poll read only for unregistered users?

4
Stewdio
Re: Can polls be made readable and votable by unregistered users?
  • 2004/9/20 19:22

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


I havn't used polls for a while, so honestly couldn't tell you

I think if it's viewable, people can vote on it, but don't quote me on that.

5
tzvook
polls need to made readable but not votable by unregistered users
  • 2004/11/4 7:23

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Quote:

Stewdio wrote:
I havn't used polls for a while, so honestly couldn't tell you

I think if it's viewable, people can vote on it, but don't quote me on that.


Hello Stewdio
I do quote you on that (you are right) and it's kinda funny that wasn't implemented as a poll feature yet.
I want the polls to be viewable to unregistered users in the main module page, I want them to be able to click on the polls to see results, but I don't want them to vite.

I tried to search the forum for an answere, but for now, nothing
I might try to do it myself as a quick dirty hardcoded hack If I won't find something else....

If someone did this b4, please comment and save me a few work hours

6
tzvook
Re: Can polls be made readable and votable by unregistered users?
  • 2004/11/4 8:37

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Actually I found an easy answere to that, needed to be hard coded in the templates files, good enough for me.

You can use the "if $xoops_isuser == true" thing.

I used it in 3 place in xoopspoll/templates/ directory:
wherever there's anoption for users to vote, simply surround it with this IF statement

<{if $xoops_isuser == true}>

<{/if}>


Don't forget to do it in new lines, orelse it will generate templates mistakes and white areas

here is a sample of one area with changes:

In xoopspoll/templates/xoopspoll_results.html:
<td class="foot" colspan="2" align="center">
<{
$poll.totalVotes}><br />
<{
$poll.totalVoters}>
<{if 
$xoops_isuser == true}>
<
br /><{$poll.vote}>
<{/if}>


I hope the polls developers will make an option for that in the module's admin, since it's a system module and this option is kinda "must" for a decent polls module.
especially if you use XOOPS without it's classic "portal" look (blocks on the right & left of the pages).

Login

Who's Online

199 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 199


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits