If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Messages posted by: micky2k2
Forum Index » Profile for micky2k2 » Messages posted by micky2k2
Author Message
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
You do need to change the extension from .html to .php if you are using php in the page.
 
Forum Index » Profile for micky2k2 » Messages posted by micky2k2
Go to:   
Based on the open source JForum