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 
Does advanced poll work in .html?  XML
Forum Index » Support Forum
Author Message
Anonymous



I would like my poll to work in .html extension, is that possible? thx.
Anonymous



Im having the same issue here. What is the tag to use to post the poll in a html document?
Carbonize
Master
[Avatar]

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

Only if your HOST has .htm extensions set up to be passed to PHP otherwise, and this is the normal setup, you need to use the .php extension.

Carbonize
I am not the maker of the Advanced Guestbook

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



I found a way to have your advanced poll in your HTML document and leave it as a HTML document.

1) Create a php page with just you poll. it should look something like this..

<? place the php coookie that is required for the poll here ?>

<table>
put your php code for the poll here

</table>

Notice you dont need the opening and closing tags for <html> and <body>.
All you need is just the snippet of php/HTML code for the actuall poll.
Save the php page as a .php...lets use test.php for this example.

2) Then in your HTML document, wherever you want your poll, put:



Ofcourse you will have to play around with the width and height till you get it right.

If you want to see my implementation, you can check it here - www.uwi-iob.org

Shivan Jaikaran
Lyric
Beginner
[Avatar]

Joined: 25/09/2004 23:27:40
Messages: 22
Offline

in the admin section it says to embed a poll into your html to do this:



but when i do that its ends up showing
poll_process(6);
?>
instead of the poll.


the iframe is a great idea, but i am chaging my site over from using iframes due to the fact they are not that compatible with other web browsers. so does anyone else have any more ideas on how to fix this embedded problem?
[WWW] [Yahoo!] [MSN]
Carbonize
Master
[Avatar]

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

Yes use the .php extension :p or speak to your host to see if you can't have the .htm and .html extensions passed to PHP.

Carbonize
I am not the maker of the Advanced Guestbook

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

Joined: 21/04/2005 20:29:40
Messages: 13
Location: SoCal
Offline

You can use .htaccess to have your page extension(ie .html ) to be handled as another like php. You pretty much customize how your page is served. I use it to handle my .htm and.html files as .shtml I assume it will work with other file extensions though. As I did below. The server parsed thing might have to be different make it work for php

AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
AddHandler server-parsed .htm

Late
[Email] [WWW]
los5o7
Newbie

Joined: 26/04/2005 03:05:19
Messages: 1
Offline

any idea how it'd be done for .php?
Auron
Expert
[Avatar]

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

you don't need to add .php to htaccess. it is already parsed since it has the php extension.
if a page has php in it should have the php extension.

php pages can contain html, its just pointless setting a server to pass .php
and .html/htm files as most of the .html/htm files will have just html and not php.
I mean, the server has to parse an entire file and it turns out it contains no php!
What a waste of time and resources.

I mean if your host has PHP, why do you need to give your page a .htm/html extension?
You can use a .php extension and save yourself a lot of time.

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]
Skorch
Beginner

Joined: 21/04/2005 20:29:40
Messages: 13
Location: SoCal
Offline

I tried that way because i have a 109 page site and making it php compatible will take awhile. I would replace .shtml with .php and see how it went from there.

Late
[Email] [WWW]
Anonymous



I added the following line to my htaccess file:
and my pages worked fine, the poll worked fine but it would not work on the index page which where I wanted it. I got a huge error which took the place of my index page:

I have mod_rewrite on so perhaps that's why it won't work on the front page. It does seem to work on an inside page though.

Instead, I ended up using a pop up. All my pages are PHP using .html extensions and I would lose far too much traffic if I had to switch over to PHP extensions. Using a pop up window works for now until I can find another solution to include it (I don't want to use an iframe).

Good luck.
Hope
Carbonize
Master
[Avatar]

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

No that message means you forgot to fill in your MySQL details in the config file of the script.

Carbonize
I am not the maker of the Advanced Guestbook

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



That's intestesting because it works when opening the poll in a PHP file (as a popup) just fine and I believe I filled out everything properly in the config file. I'm thinking it could be because I added the include PHP code to part of an HTML template when I should be doing something else, like creating the PHP page and calling that within the template. Obviously, I don't know PHP (but will learn asap!) though I will experiment a bit and see what happens. Thank you Carbonize.
Hope
Carbonize wrote:No that message means you forgot to fill in your MySQL details in the config file of the script.
Anonymous



I have been searching this forum for a way to make it work in html files instead of php. Why ?

Because if you have a nice page that ranks highly in a search engine with an html or htm extension, and suddenly change it to php .. the engine won't be able to find the page. It will think that the page won't exist anymore!

That is a very easy way to lose traffic!

So, I can only use php extension for new pages or pages that does not rank well . I believe there;s a way to make it work in html docs...still looking for it in this forum

Sad that a nice software ended up having super-poor documentation
Carbonize
Master
[Avatar]

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

The search engine found your page once, it would find it again. Your other options are to set up a 302 page moved header for the htm extension and point it to the new page or simply .htaccess file to send anyone requesting the .html extension to the .php extension.

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