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: hityr5yr
Forum Index » Profile for hityr5yr » Messages posted by hityr5yr
Author Message
I see that another user has asked same question, but so far there is no answer.

I tried to resolve the issue tough I'm not familiar in PHP at all. I got some success but only partial. Meaning that I added the Poll List to Demo 4 Poll version (the code is below). When I load another poll from the list everything is OK - it loads with its comments and submission form. The problem is that when I try to post a comment under that poll nothing happens. Except that the initial poll page loads.

I believe many people would want to combine the list and the comments option, that is why I raise the question again.

Anybody help?

Here is the code:

<?php

require_once $poll_path."pollphp/include/config.inc.php";
require_once $poll_path."pollphp/include/$POLLDB[class]";
require_once $poll_path."pollphp/include/class_poll.php";
require_once $poll_path."pollphp/include/class_pollcomment.php";
require_once $poll_path."pollphp/include/class_captchatest.php";
require_once $poll_path."pollphp/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($_GET['poll_id'])) {
echo $php_poll->poll_process($_GET['poll_id']);
} else {
echo $php_poll->poll_process("1");
}

/* poll list */
$php_poll->set_template("poll_list");
$php_poll->set_date_format("m/d/Y");
echo $php_poll->view_poll_list();
echo $php_poll->get_list_pages();

$php_poll = new pollcomment();

/* construct the form */
$php_poll->set_template("poll_form");
$php_poll->set_form_error(array("name" => "Please enter your name.", "email" => "You must specify your e-mail address.", "message" => "You must specify a message.", "captcha" => "You must specify the correct key."));

if (isset($_GET['poll_id'])) {
echo $php_poll->comment_process($_GET['poll_id']);
} else {
echo $php_poll->comment_process("1");
}

/* 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");

if (isset($_GET['poll_id'])) {
echo $php_poll->view_poll_comments($_GET['poll_id']);
} else {
echo $php_poll->view_poll_comments("1");
}

if (isset($_GET['poll_id'])) {
echo $php_poll->get_comment_pages($_GET['poll_id']);
} else {
echo $php_poll->get_comment_pages("1");
}

/* form */
echo $html_form;
?>
 
Forum Index » Profile for hityr5yr » Messages posted by hityr5yr
Go to:   
Based on the open source JForum