Welcome to Geeklog, Anonymous Sunday, November 24 2024 @ 11:41 am EST
Geeklog Forums
Quick Hack for Polls
amckay
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 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
damental
kkiely (AT) aol.com
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
kevinolean
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?
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
kreative
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!
- 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