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 
Adv Poll subdirectory issue  XML
Forum Index » Support Forum
Author Message
kledirob
Newbie

Joined: 03/10/2007 21:06:07
Messages: 1
Offline

Hi experts,

I have Advanced poll 2.08 installed in [some_dirs]/cms/poll . I want to embed this poll in a page generated from a Content Management System (CMS). As content page of that CMS I have a page called 'Polls' which includes the code

require_once "[some_dirs]/cms/poll/booth.php";
echo $php_poll->poll_process(4); // x = Poll ID

When calling that page the poll is displayed as expected. But if I click on 'vote' or 'results' I'm routed to a wrong index.php page because the path is not correct: e.g. the vote button references [some_dirs]/index.php and the result-button references [some_dirs]/index.php?action=results&poll_ident=4 .

Both references/links miss (I think) the subdirectories cms/poll in order to find the right index.php. (There is a index.php but it belongs to the CMS so the vote button behaves like a link to the HOME page of the CMS)

In the general settings tab the is a setting 'URL to poll directory' - it is set to /cms/poll/ what looks ok. But the Adv poll code doesn't seem to pick it up. I changed it, even to settings that don't make any sense at all (e.g. /cms/pool/nonsense). Advanced Poll is not 'impressed' by that - I can change it however I want, the above described behaviour stays as it is and I don't see any results nor can I vote...

This is my first day with PHP in general and I'm no expert - can anybody point me into the right direction to solve this ? Advanced Poll looks quite nice and I want to use it...

Many thanks

Robert
megan
Newbie

Joined: 11/10/2007 15:11:30
Messages: 2
Offline

I had the same problem and solved it with the following code:



I pulled this from the examples that come with advanced poll. If you look at those you can see there are different ways to pull the poll into a page - I really don't know why this is. The code provided by the admin panel never worked for me.
joecomputerdude
Newbie

Joined: 24/04/2009 22:55:46
Messages: 2
Offline

I have the same problem. CMS seems to be interfering with the poll and whenever i hit submit, it dumps me into the index of the director where the poll is.

Using the above code didn't help.
joecomputerdude
Newbie

Joined: 24/04/2009 22:55:46
Messages: 2
Offline

I just threw the thing into an <Iframe> and changed all the links to open in the parent window instead of the frame.

That resolved my problem.
macsyk
Newbie

Joined: 05/09/2009 16:07:39
Messages: 1
Offline

I have pretty good and simple solution
Just open class_poll.php, find

basename($_SERVER['PHP_SELF']);

and replace this to

$_SERVER['REQUEST_URI'];

Thats all. Enjoy!
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum