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: Anonymous
Forum Index » Profile for Anonymous » Messages posted by Anonymous
Author Message
Auron wrote:isn't that a quote from my post above?...


yes it is

i was trying to show how the #'s represent the poll ID.. am i correct? this is great but i wanted it so that the comments are dispayed together. so far what i have is this:

<?php

/* path */
$poll_path = "/home/xxxxx/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 plist();
$php_poll = new pollcomment();


/* 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("d/m/Y H:i");
$php_poll->data_order_by("time","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);


?>

say if there was already a comment from poll #1, and if someone were to post from poll #2, the new post will be somewhere below comment post #1... grrr... hard to explain but i do hope you understand.

what i did was drop the poll comments and included the advanced guestbook instead... and it works great!!!
Hayabusa...

I totally understand what you're looking to do. I had the same dilema... wanted the comments to be displayed together from newest being on top right?



$php_poll->set_template("poll_comment");
$php_poll->set_comments_per_page(5); --- no of comments per page
$php_poll->set_date_format("d/m/Y H:i");
$php_poll->data_order_by("time","desc");
echo $php_poll->view_poll_comments(2); --- poll id, newest or random
echo $php_poll->get_comment_pages(2); --- poll id, newest or random


Since the comment codes are calling the poll ID.. I figured to drop it and include a guestbook below the polls. Please respond if you're still looking to do this. I'll show you what I got
Ok, so far so good. It all works nicely.

However my website has many pages, that each need a separate poll and comments. Plus these pages are almost added daily.

I am a newbie to PHP, so I wanted to see if somebody could put me in the right direction.

When ever soembody visits the page, I want to test for the poll. Each page already is identified with an ID number, so I could use this number to check for the ID. I guess I would have to change the database from autonumber to number, yes?

If the poll does not exist, I want create it on the fly, since it is always the same questions, color, and options, with the known ID.

Finally display this poll, this I already know how to do

Any help is highly appreciated, thanks!
Sorry stuppid mistake, username was case sensitive
Hmm, I just wrote a small test script trying to connect to the database, and that won't work either.
Maybe I should add that I chose the PHP/MySQL version, and all the files are in a "poll" folder, and am I correct to understand that I do NOT need to change permissions on any files?
I created a new database, and then added user to the database and give the user full persmissions.

Note that this user was already created, as the user is already a user of another database, actually a PHPBB forum.

I edited the config.inc.php as described, but I start the install I get a "Cannot connect to mysql database" after I click "Next" and "Yes".

Any ideas?
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
just figured out myself!!!
if you need to parse php to have it output in the page, you can put it in the main three files. index.php, addentry.php and comment.php.
Hi

I find that I need to parse some PHP code inside one of the templates, but although variables seem to work fine, it will consider anything within <?php ?> tags as comments, as though it had an .html extension or something. I had a look at what the actual php file looked like and I can see why it does this (because it's being stuck in during the parsing and of course the page is parsed once), but is there any way around this?

Thanks

-Oli (cyben@phreaker.net)
bump... anyone here?
Auron - I've done a few different search strings and haven't found any step-by-step instructions to incorporate the poll into an html page. Could me give me some search words to help lessen the results?
Hi, have had a (registered) guestbook working for a while, but on one day i got this message after posting a new entry:


I have never changed anything and it was woring fine always. I have deleted all the files and installed the guestbook again, but the problem remains. Can anyone help me? The guestbook is located here:

http://www.ucpzone.com/madagascar/guestbook/guestbook.html

Thanks.
I created 10 polls and a link like http://www.mysite.com/poll/poll.php?plist_start=1&plist_end=5&poll_id=1

It doesn't work. Help please.
 
Forum Index » Profile for Anonymous » Messages posted by Anonymous
Go to:   
Based on the open source JForum