.php extension.
<?php
include_once "/home/jenadmin/jennifersando.com/polls/poll_cookie.php";
?>
<?php
include_once "/home/jenadmin/jennifersando.com/polls/booth.php";
echo $php_poll->poll_process(ID#);
?>
That will display the poll specified by ID# with the "default" template set, and handle everything for you.. it looks like this:
| Advanced Poll | ||||||||||||||||||
|
poll_process line:
# set the max width for the bar graphs in the results page.
# set the max height for the bar graphs in the results page.
# use a different template (e.g. "simple" "plain" "popup")... you can make your own in the admin area!
$php_poll->set_template_set("graphic");
$php_poll->set_max_bar_length(80);
$php_poll->set_max_bar_height(10);
You could also use these commands instead of (or in addition to) the poll_process one if you want:
# just show the poll question text.
# just print the results.
echo $php_poll->view_poll_result(ID#);
echo $php_poll->get_poll_question(ID#);
<?php
include_once "/home/jenadmin/jennifersando.com/polls/booth.php"; # don't use this again if you already have it on the page somewhere.
$php_poll->set_template("poll_list"); # required to switch to poll list mode!
$php_poll->set_polls_per_page(5); # maximum polls to show per page.
$php_poll->set_date_format("m/d/Y"); # how to display the time stamp on polls.
echo $php_poll->view_poll_list(); # displays the poll list.
echo $php_poll->get_list_pages(); # displays the "next page","last page" thing when you have lots of polls.
?>
Here's what all that will actualy look like (with polls_per_page set to 2):
| 06/28/2008 | What is your favourite scripting language? |
| 06/28/2008 | Which database engine do you prefer? |
Note, these links just link to the current page with poll_id set to something!
If you want it to actually show the poll, you're going to have to put this code like this in the same page:
<?php
if ($poll_id) { # only show the poll after we've clicked a link!
include_once "/home/jenadmin/jennifersando.com/polls/booth.php"; # don't use this again if you already have it on the page somewhere.
echo $php_poll->poll_process($poll_id); # Actually do use "$poll_id" there..
}
?>
You can also edit the "poll_list" template in the admin area to point to a different page with that code.
Here's an example of what that code will show (please click a poll in the list above):
process_poll command. However, the comments will not be displayed
anywhere (besides in the admin area), unless you add some more PHP code:
<?php
include_once "/home/jenadmin/jennifersando.com/polls/booth.php"; # don't use this again if you already have it on the page somewhere.
$php_poll->set_template("poll_comment"); # required to switch to comment mode!
$php_poll->set_comments_per_page(5); # maximum comments to show per page.
$php_poll->set_date_format("d/m/Y H:i"); # how to display the time stamp on comments.
$php_poll->data_order_by("time","desc"); # how to sort the comments. (show oldest first with ("time","asc"))
echo $php_poll->view_poll_comments(ID#); # displays the comments for poll ID#.
echo $php_poll->get_comment_pages(ID#); # displays "next page","last page" thing when you have lots of comments.
?>
Here's what all that will actualy look like (with comments_per_page set to 2):
| Rkymcuup
nlbkkbze@opudhyzt.com
- 27/08/2008 16:39 200.63.42.77 - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) |
| comment3, <a href="http://www.mikeyuhas.org/2000/ pic/8/blog.php?p=8876#">mildred s. dresselhaus</a>, http://www.mikeyuhas.org/2000/pic/8/ blog.php?p=8876# mildred s. dresselhaus, ecbjr, <a href="http://www.mikeyuhas.org/2000/ pic/8/blog.php?p=8977#">shekou china map</a>, http://www.mikeyuhas.org/2000/pic/8/ blog.php?p=8977# shekou china map, wwin, <a href="http://www.daybydayinc.com/men us/menu/7/blog.php?p=3104#">herms pedestrian crosswalk study</a>, http://www.daybydayinc.com/menus/men u/7/blog.php?p=3104# herms pedestrian crosswalk study, 73840, <a href="http://www.mikeyuhas.org/2000/ pic/7/blog.php?p=8438#">locating an earthquake epicenter</a>, http://www.mikeyuhas.org/2000/pic/7/ blog.php?p=8438# locating an earthquake epicenter, luwbm, <a href="http://www.bordercollie.tv/day 11/faq/5/blog.php?p=22204#">tata infotech placement papers</a>, http://www.bordercollie.tv/day11/faq /5/blog.php?p=22204# tata infotech placement papers, myjd, <a href="http://www.mikeyuhas.org/2000/ pic/10/blog.php?p=9625#">the maids jean genet</a>, http://www.mikeyuhas.org/2000/pic/10 /blog.php?p=9625# the maids jean genet, 367, <a href="http://www.neverknow.com/sss02 /blog/2/blog.php?p=10598#">aarp andrus</a>, http://www.neverknow.com/sss02/blog/ 2/blog.php?p=10598# aarp andrus, oxss, <a href="http://brunostuckpointing.com/ test/samples/click/5/blog.php?p=1723 6#">playmate cara zavaleta</a>, http://brunostuckpointing.com/test/s amples/click/5/blog.php?p=17236# playmate cara zavaleta, kfly, |
| Apvupjae
alniqsen@hxltxowm.com
- 27/08/2008 16:38 200.63.42.111 - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) |
| <a href= http://www.nonoba.com/penicillin >Buy Penicillin</a> [url=http://www.nonoba.com/penicilli n]Buy Penicillin[/url] <a href= http://www.nonoba.com/percocet >Buy Percocet</a> [url=http://www.nonoba.com/percocet] Buy Percocet[/url] <a href= http://www.nonoba.com/phentermine >Buy Phentermine</a> [url=http://www.nonoba.com/phentermi ne]Buy Phentermine[/url] <a href= http://www.nonoba.com/plan B >Buy Plan+B</a> [url=http://www.nonoba.com/plan B]Buy Plan+B[/url] <a href= http://www.nonoba.com/plavix >Buy Plavix</a> [url=http://www.nonoba.com/plavix]Bu y Plavix[/url] <a href= http://www.nonoba.com/potassium >Buy Potassium</a> [url=http://www.nonoba.com/potassium ]Buy Potassium[/url] <a href= http://www.nonoba.com/prednisone >Buy Prednisone</a> [url=http://www.nonoba.com/prednison e]Buy Prednisone[/url] <a href= http://www.nonoba.com/prevacid >Buy Prevacid</a> [url=http://www.nonoba.com/prevacid] Buy Prevacid[/url] <a href= http://www.nonoba.com/prilosec >Buy Prilosec</a> [url=http://www.nonoba.com/prilosec] Buy Prilosec[/url] <a href= http://www.nonoba.com/propecia >Buy Propecia</a> [url=http://www.nonoba.com/propecia] Buy Propecia[/url] <a href= http://www.nonoba.com/protonix >Buy Protonix</a> [url=http://www.nonoba.com/protonix] Buy Protonix[/url] <a href= http://www.nonoba.com/provigil >Buy Provigil</a> [url=http://www.nonoba.com/provigil] Buy Provigil[/url] <a href= http://www.nonoba.com/prozac >Buy Prozac</a> [url=http://www.nonoba.com/prozac]Bu y Prozac[/url] <a href= http://www.nonoba.com/pseudovent >Buy Pseudovent</a> [url=http://www.nonoba.com/pseudoven t]Buy Pseudovent[/url] <a href= http://www.nonoba.com/ritalin >Buy Ritalin</a> [url=http://www.nonoba.com/ritalin]B uy Ritalin[/url] <a href= http://www.nonoba.com/seroquel >Buy Seroquel</a> [url=http://www.nonoba.com/seroquel] Buy Seroquel[/url] <a href= http://www.nonoba.com/soma >Buy Soma</a> [url=http://www.nonoba.com/soma]Buy Soma[/url] <a href= http://www.nonoba.com/suboxone >Buy Suboxone</a> [url=http://www.nonoba.com/suboxone] Buy Suboxone[/url] <a href= http://www.nonoba.com/strattera >Buy Strattera</a> [url=http://www.nonoba.com/strattera ]Buy Strattera[/url] <a href= http://www.nonoba.com/synthroid >Buy Synthroid</a> [url=http://www.nonoba.com/synthroid ]Buy Synthroid[/url] |
<?php
include_once "/home/jenadmin/jennifersando.com/polls/booth.php"; # don't use this again if you already have it on the page somewhere.
$php_poll->set_template("poll_form"); # required to switch to comment form mode!
$php_poll->set_form_error(array( # set which fields are required and what errors to give if blank.
"name" => "Please enter your name.",
// "email" => "You must specify your e-mail address.", # uncomment this to require an email address.
"message" => "You must specify a message."
));
echo $php_poll->comment_process(ID#); #displays the form.
?>
Here's what all that will actually look like: