Author |
Message |
24/05/2004 04:04:35
|
Anonymous
|
Hi Everyone,
I'M USING DEMO #3
I've just voted on the newest poll (Let's call it Poll #5), and the Results for Poll #5 are displayed. I then scroll down to where the dates/links are displayed for previous polls. Let's say I then click the link for Poll #2. Poll #2 comes up just fine. Now here's the problem...
When I click on "view results" for Poll #2, the Results for Poll #5 are displayed. This of course is automatically done. Why doesn't it automatically show the Results for the Correct Poll regardless of which poll it is?
<?php
/* path */
$poll_path = "/catch/db";
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("newest");
}
/* 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();
?>
Of course I have this code in the /* poll*/:
echo $php_poll->poll_process("newest");
Is it because of this that it's also displaying the current poll 'Results', even when viewing older polls?
Do I need to additionally code something else? Perhaps I missed something related to this problem here in the forum?
PLEASE HELP
|
|
24/05/2004 12:44:24
|
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
|
it should display the correct polls results.
it only displays the newest when it can't find the others.
shown by this if statement...
- Auron
|
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought) |
|
16/06/2004 22:01:19
|
Anonymous
|
I'M USING DEMO #3 TOO
The 1st poll I created worked flawlessly.
However, when I created my 2nd poll, that's where the problems began.
I've just voted on the newest poll (POLL #2), and the Results for Poll #2 are displayed. I then scroll down to where the dates/links are displayed for previous polls. I then click the link for the 1st poll (POLL #1). Poll #1 is displayed just fine. Now here are the problems...
When I cast my vote on the 1st poll, the Results for "Poll #2" are automatically displayed... NOT the results for that poll. I then have to go back to poll #1 to view the results. At that time of course, it displays the correct results and says that I've already voted.
In addition --- beginning with when I added the 2nd poll --- Myself & others can of course vote on the 1st poll, but the votes no longer register in the database and the vote count never increases anymore. It's as if it no longer functions. But --- I have no problems with POLL #2.
When you add a new poll, does it automatically kill the others ??? And why doesn't it automatically show the Results for the Correct Poll regardless of which poll it is?
<?php
/* path */
$poll_path = "/catch/db";
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("newest");
}
/* 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();
?>
Do I need to add additional code or something? Perhaps I've missed something related to this problem here in the forum?
PLEASE HELP
|
|
21/06/2004 08:42:33
|
Anonymous
|
????? HELP ?????
|
|
25/06/2004 20:08:14
|
Anonymous
|
I'm guessing that nobody has an answer for this problem?
|
|
10/07/2004 12:04:05
|
Anonymous
|
seems that eveyone here is stumped or just can't answer the question...
|
|
15/07/2004 15:23:52
|
Anonymous
|
Auron wrote:it should display the correct polls results.
it only displays the newest when it can't find the others.
shown by this if statement...
- Auron
OK... My question is...
If it finds the "newest" poll, why doesn't it find the others??? They're still there, and they haven't went anywhere.
Also, can you please explain this line bit by bit and tell me what the function is...
What is isset?
I just don't understand why it will display the correct poll when you click to view a previous poll, but 'NOT' the correct results for the poll you are viewing when you click "view results", instead of being taken to the results of the newest poll. As also stated, voting is also disabled for the older polls ONCE you create a new poll. What could be causing this?
Any help will be deeply appreciated.
|
|
15/07/2004 15:50:29
|
Anonymous
|
Should there be something like this included somehere???
if (isset($HTTP_GET_VARS['poll_id'])) {
echo $php_poll->poll_results]($HTTP_GET_VARS['poll_id']);
} else {
echo $php_poll->poll_results("newest");
}
|
|
15/07/2004 15:56:40
|
Anonymous
|
could this have something to with the problem?
|
|
15/07/2004 16:49:36
|
Anonymous
|
My poll is within a table and all the coding is not together. Could this be causing this problem?
|
|
18/07/2004 17:33:00
|
Anonymous
|
Nope, being in a table is not the problem. What could it be then ?
|
|
|