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 
Problems with Poll voting on eg: page.php?article=13  XML
Forum Index » Support Forum
Author Message
Anonymous



Hi all!
to start with, I love Advanced Poll on my pages!
unfortunately I have a problem with it...
I use the poll on all of my pages, and for example on my php page : "page.php?article=13" I add a parameter (article=13) to read a certain article. Now when someone on that page uses the poll to vote, they return to "page.php" afterwards withouth the "article=13" with it.

this is a problem for me because when people vote, they don't return to the same article... do you know how I can fix this easily? Or can't it be done?

thanks a lot in advance!!
Anonymous



this post can be closed...
i solved it as follows:

if (isset($_SERVER['QUERY_STRING']))
{
$fullURL = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?{$_SERVER['QUERY_STRING']}";
$this->form_forward = $fullURL;
}
else
{
//print $fullURL;
$this->form_forward = basename($HTTP_SERVER_VARS['PHP_SELF']);
//JORRE
}
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Good work
I was looking on how to solve this for some1 else.

One prob. You need to make it a bit more intuitive and understandable for people to read and use.

Thanks.

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]
Leggman
Newbie

Joined: 23/02/2006 22:51:16
Messages: 2
Location: here
Offline

which file did you add this script to? booth.php?

This is my signature. There are many others like it, but this one is mine.
[WWW] [Yahoo!] aim icon
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Do a search in all the poll files for: $this->form_forward.
Then post the code of that section before modifying it.

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]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Just off the top of my head you could just use

$querystring = (isset($_SERVER['QUERY_STRING'])) ? '?' . $_SERVER['QUERY_STRING'] : '';
$this->form_forward = $_SERVER['PHP_SELF'] . $querystring;

of course for the sake of those poor saps still using a prehistoric version of PHP we should use $HTTP_SERVER_VARS and not $_SERVER

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
caminator
Newbie

Joined: 05/03/2006 04:34:57
Messages: 2
Offline

I posted soemthing similar to this (I think) last night. Can someone who is good at this stuff be more specific as to how you make the change? My site forwards me to the actual page (footer.php) instead of staying on the page it came from (index.php) so it loses all of its design and formatting. Any additional help would be appreciated because the instructions in this thread are way to vague for a beginner like me. Thank you so much!
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum