Posted on: 06/04/02 04:46pm
By: amckay
Here's a really quick little hack for polls. I found that polls could only be voted upon if they showed up in one of the left or right blocks. So if you want to maintain a bunch of polls active at one time, you have to take up all that real-estate.
There are two simple changes to make.
In /pathtogeeklog/public_html/layout/your-template/pollbooth/polllist.thtml
I cannot get this to come out properly within GL so check this link[*1] for details.
This of course defines how your new lines will look like in the list of polls one sees when you click the "polls" button in the top bar. All you are doing is adding something extra to the end of each line.
See that I've added my own variable definitions "vote_url" adnd "vote_text", along with assocaited HTML code. YOu can add them where you like but I put it at the end of the line before the "ending_br".
And then in /pathtogeeklog/public_html/pollbooth.php
Go to line 84 and copy it so you have two copies. This is the line with "poll_url" on it. Change your new line to
I think this comes out OK but check the same link above just in case
$pollitem->set_var('vote_url', $_CONF['site_url'].'/pollbooth.php?qid='
. $Q['qid'] );
Here you are telling the geeklog engine that you have a couple of new template variables that you want it to know about on this page.
And then after that add another line :
$pollitem->set_var('vote_text', 'Cast Your Ballot' );
Here you are adding the second variable. Yes, I should be using the languages file but I haven't figured that out yet. Once I do I'll post an update. In the meantime this will do.
That's it. You are done. Now, all of your polls are constantly active and people can vote on them, even if you do not have them in one of the left or right bars.
Let me know if you have any problems with it.
cheers,
-Alan
Re:Quick Hack for Polls
Posted on: 08/20/03 03:18am
By: Anonymous (damental)
The link you referenced is returning a 404 page. I would like to make my polls all constantly active also, or maybe make them rotate in the front page. Can you post this file again.
Quick Hack for Polls
Posted on: 05/02/04 07:29pm
By: amckay
I've put the details here now :
https://secure.quay.net/community/viewtopic.php?p=8361
Quick Hack for Polls
Posted on: 05/02/04 09:28pm
By: Anonymous (kkiely (AT) aol.com)
Could anyone follow up on this work and get it so you can have:
1. The ability to have multiple polls on 1 page (not just a list).
2. A "Show all results" link for a page with multiple polls.
This page is an example: (not my page)
http://www.wptfan.com/pollbooth.php?offset=30&show=0
Quick Hack for Polls
Posted on: 05/11/05 12:54am
By: kevinolean
Could anyone follow up on this work and get it so you can have:
1. The ability to have multiple polls on 1 page (not just a list).
2. A "Show all results" link for a page with multiple polls.
This page is an example: (not my page)
http://www.wptfan.com/pollbooth.php?offset=30&show=0
This is exactly what I am looking for as well...does anyone have a link as to how to accomplish this?
Quick Hack for Polls
Posted on: 07/16/05 04:33pm
By: lgriffin
Ok I have followed the instructions on the page:
https://secure.quay.net/community/viewtopic.php?p=8361
Works great, now I have "Vote Now" after each poll list. What tells the pollbooth.php page that a poll has been voted on or not?
I would like to put in the polllist.thtml a condition statement that tests for if poll has been taken to print already voted ELSE Vote Now (with the link as above).
Thanks
Quick Hack for Polls
Posted on: 04/20/06 02:40pm
By: kreative
Hello friends,
any news about this thread?
I'm looking for something similar, but... i checked the link I read here ( http://www.wptfan.com/pollbooth.php?offset=30&show=0 ) but I would like to have only 1 "vote" button, at the end of ALL polls.... Is is possible to make this hack?
You can read my topic here:
http://www.geeklog.net/forum/viewtopic.php?forum=3&showtopic=66380
Thanks!