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 
Here's My Problem/Bug with DEMO 3  XML
Forum Index » Support Forum
Author Message
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
Auron
Expert
[Avatar]

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)
[Email] [WWW]
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
Anonymous



????? HELP ?????
Anonymous



I'm guessing that nobody has an answer for this problem?
Anonymous



seems that eveyone here is stumped or just can't answer the question...
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.
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");
}
Anonymous



could this have something to with the problem?

Anonymous



My poll is within a table and all the coding is not together. Could this be causing this problem?

Anonymous



Nope, being in a table is not the problem. What could it be then ?
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum