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 
Advanced Poll not showing up  XML
Forum Index » Support Forum
Author Message
Anonymous



I'm using Emax which provides customers with their own web designer. I installed AP with Fantastico and it works fine.

I put



Before the <html> tag and I put



Now to the part aout the web designer. You can create a box that can hold script so I put the above code into that box. I save the file and click publish. I load the page and it doesn't show up. I don't get any errors.

http://www.simulationcity.net/ The poll should show up right below the Topsites.
amber222
Graduate

Joined: 07/05/2004 21:13:07
Messages: 586
Offline

Your page extension needs to be .php. Rename page from index.html to index.php or put the poll code on a page that ends in .php. Alternatively, here is a post with tips on how to include the poll in an .html page:

Guide on How to Add Poll to HTML page
http://proxy2.de/forum/viewtopic.php?t=4736
Anonymous



Yeah that was the problem. I never knew that you couldn't put php in an HTML page. Is there a way to get how many votes an option got?

EG: I made a poll on browsers and it says IE 40.00% how Do I get it to say 2 votes then 40.00%
amber222
Graduate

Joined: 07/05/2004 21:13:07
Messages: 586
Offline

It looks like a template issue. Demo 3 shows the number of votes in parentheses after the percentages. http://proxy2.de/poll/demo_3.php?action=results&poll_ident=4

Demo 3 uses the plain template. I looked at the result_loop for the plain template and found the following code:

So I'm guessing it is a matter of using this plain template or including the ($vote_count) code in the result_loop of any other template you use. If the template directories and files permissions were set according to the info in the readme file, you should be able to edit the result_loop from the poll's Administration Panel.

Auron, will that work?
Anonymous



So where would this go?



I have a vauge idea of what you're talking about. For the plain template the above code would go in the "Display Loop" box in the "plain" template?
Anonymous



I found the option to change it from percentages to votes in the option page.
amber222
Graduate

Joined: 07/05/2004 21:13:07
Messages: 586
Offline

simulationcity wrote:I found the option to change it from percentages to votes in the option page.


Could you please explain this for other people who might want to do this? What do you mean by "options page"? I do not have any link like that.

Thanks.
Anonymous



Go into the AdminCP and at the top there is a image link and has "Generl Settings" below it. Scroll Down to "Miscellaneous" And there are two radio buttons beside "Display result as" select Votes and click "Submit Settings"
Anonymous



Thanks.
squall5240
Newbie

Joined: 01/09/2006 09:21:39
Messages: 1
Location: Iran
Offline

hi,

first thanks for your great scripts !!!

i get the advanced poll and install it in a DB version and it works great and i don't have any problem with it. but my problems start when i want to put it in my page !
i use the MKPortal CMS for my site and it's realy good but i can't find where should i put the poll codes to work.
index.php:


tpl_main.php (this is a page that contain a pages codes and i use the FILE codes to show the pages):


by the way all of the CMS pages is PHP !


* www.MKPortal.it is a free CMS under GPL Licence !
* sorry for my bad english

plz help me i really need your poll because it's really handy and powerfull.
[Email]
stormrider2008
Beginner

Joined: 15/04/2008 11:44:46
Messages: 5
Offline

Hello all,

I've read through the install instructions and the forum replies and followed all advice put advanced poll is still not showing up on my .php page.

I have:

- added this code right before my </HEAD> tag:

<?php // Important! You have to include it before your html code
include_once "/home/ratesupe/public_html/survey/db/poll_cookie.php";
?>

- and embedded this in my HTML code on the page:

<?php include_once "/home/ratesupe/public_html/survey/db/booth.php"; echo $php_poll->poll_process(4);?>

- I've also renamed the page to .php

- added the following in the .htaccess file: AddType application/x-httpd-php .php .htm

- my doctype is the following: <!DOCTYPE HTML PUBLIC "//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

can anyone help me out?

Kind regards
stormrider2008
Beginner

Joined: 15/04/2008 11:44:46
Messages: 5
Offline

Hi there,

could anyone help me out? i've been tryiing to play with it over the past few days and still no luck!

Regards,

Kelvin
Carbonize
Master
[Avatar]

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

link?

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
stormrider2008
Beginner

Joined: 15/04/2008 11:44:46
Messages: 5
Offline

Hi Carbonize,

well, its actually on a site that hasn't gone live yet - so can't provide a link.

But all the elements that might affect it are:

- added this code right before my </HEAD> tag:

<?php // Important! You have to include it before your html code
include_once "/home/ratesupe/public_html/survey/db/poll_cookie.php";
?>

- and embedded this in my HTML code on the page:

<?php include_once "/home/ratesupe/public_html/survey/db/booth.php"; echo $php_poll->poll_process(4);?>

- I've also renamed the page to .php

- added the following in the .htaccess file: AddType application/x-httpd-php .php .htm

- my doctype is the following: <!DOCTYPE HTML PUBLIC "//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


is there any other info you would need? Please let me know and I can send through.

Thanks for this.
Carbonize
Master
[Avatar]

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

The htaccess stuff is irrelevant if you are already using a .php file. So the booth stuff is before the doctype?

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum