Chi Kien Uong
Geranienstraße 30
71034 Böblingen
Deutschland / Germany
|
If you are not registered or logged in, you may still use these forums but with limited features.
Show recent topics
|
|
|
Author |
Message |
07/03/2003 22:12:28
|
micky2k2
Newbie
Joined: 05/12/2002 06:32:52
Messages: 2
Location: Newcastle upon Tyne, UK
Offline
|
Hi
Is there any way of combining the output of the script so I can have random polls with links to other polls under them as well as comments such as in the Demo 2.
The code I'm using is this:
<?php
/* path */
$poll_path = "d:/htdocs/poll";
require $poll_path."/include/config.inc.php";
require $poll_path."/include/$POLLDB[class]";
require $poll_path."/include/class_poll.php";
require $poll_path."/include/class_pollcomment.php";
require $poll_path."/include/class_plist.php";
$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();
$php_poll = new plist();
/* poll */
$php_poll->set_template_set("plain");
$php_poll->set_max_bar_length(125);
$php_poll->set_max_bar_height(10);
if (isset($HTTP_GET_VARS['poll_id'])) {
echo $php_poll->poll_process($HTTP_GET_VARS['poll_id']);
} else {
echo $php_poll->poll_process("random");
}
/* poll list */
$php_poll->set_template("poll_list");
$php_poll->set_date_format("d/m/Y");
echo $php_poll->view_poll_list();
echo $php_poll->get_list_pages();
?>
The comments from demo 2 are:
* poll comments */
$php_poll->set_template("poll_comment");
$php_poll->set_comments_per_page(5);
$php_poll->set_date_format("d/m/Y H:i");
$php_poll->data_order_by("time","desc");
echo $php_poll->view_poll_comments(1);
echo $php_poll->get_comment_pages(1);
Anyone know a way to show the correct comments for the right poll?
Thanks
Micky
|
|
|
|
|
|
Based on the open source JForum
|