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: RalphW
Forum Index » Profile for RalphW » Messages posted by RalphW
Author Message
Here's the current code for the poll results & comments; a separate page for each poll -

<?php
/* Include this before your html code */
include "./poll_cookie.php";
?>
<html>
<body bgcolor="#800000" background="Les_Mis_Bkgd.jpg" bgproperties="fixed">
<center>
<?php

/* path */
$poll_path = "poll_path";

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";
$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();

$php_poll = new pollcomment();

/* question */
/* echo $php_poll->get_poll_question(4); */


/* poll */
$php_poll->set_template_set("plain");
$php_poll->set_max_bar_length(125);
$php_poll->set_max_bar_height(10);
echo $php_poll->poll_process(4);


/* 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."
));
$html_form = $php_poll->comment_process(4);


/* 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(4);
echo $php_poll->get_comment_pages(4);

/* form */
/* echo $html_form; */

?>

<p>
<div align="center">
<?php
include "poll_path/LesMisFooter.php";
?>
</div>
</center>
</body>

</html>
I've been trying everything I can find to show comments to the public . . .

I think my code is okay, but I'm not sure about the $poll_path = "/Polls";

I don't understand the absolute definition of the $poll_path

Can someone please post a link to an operating poll so that I can examine the code?

You can see my latest attempt to show comments at
http://planet-hughes.net/Polls/your_comments.php

which are currently:

<?php
include "./poll_cookie.php";
?>
<html>
<body bgcolor="#800000" background="http://planet-hughes.net/Polls/Les_Mis_Bkgd.jpg" bgproperties="fixed">

<?php

/* path */
$poll_path = "/Polls";

require $poll_path."/include/config.inc.php";
require $poll_path."/include/class_poll.php";
require $poll_path."/include/class_pollcomment.php";

$php_poll = new pollcomment();

/* poll */
$php_poll->set_template_set("graphic");
echo $php_poll->view_poll_result(4);
echo $php_poll->view_poll_result(5);
echo $php_poll->view_poll_result(6);
echo $php_poll->view_poll_result(7);
echo $php_poll->view_poll_result(8);
echo $php_poll->view_poll_result(9);
echo $php_poll->view_poll_result(10);

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

?>
</body>

</html>

Thanks for your interest and suggestions.
 
Forum Index » Profile for RalphW » Messages posted by RalphW
Go to:   
Based on the open source JForum