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 |
21/11/2004 22:32:27
|
Anonymous
|
I must say this Advance Polls is a great script. I was able to create the layout so that its poll on top, poll list in the middle (3 poll questions) and comments on the bottom. Though I was having a little problem in the comment part. I was able to list the comment where i want it, but I wanted it so that when ppl post a comment, the post will be newest on top, not seperated by polls ID, ya know what I mean? this is what I have:
<?php
/* path */
$poll_path = "/home/______/public_html/polls";
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 pollcomment();
$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("m/d/Y");
echo $php_poll->view_poll_list();
echo $php_poll->get_list_pages();
/* poll comments */
$php_poll->set_template("poll_comment");
$php_poll->set_comments_per_page(5);
$php_poll->set_date_format("Y.m.d");
$php_poll->data_order_by("date","desc");
echo $php_poll->view_poll_comments(1);
echo $php_poll->view_poll_comments(2);
echo $php_poll->view_poll_comments(3);
echo $php_poll->get_comment_pages(3);
?>
Now, I'm sure this is possible without having to create a new page. I wanted it so that the comments are in one page, just as the poll list is in one page. If it's impossible, that's ok too.. I might keep the polls in there and probably add a guestbook underneath as a comment area... Any bit of info helps... Thanks for your time
|
|
|
|
|
|
Based on the open source JForum
|