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 
Messages posted by: ollexus
Forum Index » Profile for ollexus » Messages posted by ollexus
Author Message
Iskandar wrote:I have been reading this forum for a few hours and there are ideas scattered evrywhere. I have been searching this forum for a way to make it work in *.htm/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... How do you add it in normal html pages?

1) Add this to your .htaccess file

AddType application/x-httpd-php .php .html
or
AddType application/x-httpd-php .php .htm
(if you use htm extension)


2)Add this code as in the documentation


<?php
// Important! You have to include it before your html code
include_once "poll/poll_cookie.php";
?>


3)In the place where you want it to appear (in the body of course) put this code

<?php
include_once "poll/booth.php";
echo $php_poll->poll_process(1);
?>


4) Of course the poll process number should be the poll number. That's just an example. I dunno if it will take a lot of bandwith or if it works for you. It works for me on my test pages. I am still looking if there's error because of it.

I just want to help people who have been wandering here for so long looking for this info.

If it helps, good. If not, I apologise

= edit ===
I have checked and it appears to be good.

You can an example of how i integrate the polls at http://oohoi.com/natural%20remedy/everyday_food/apple.htm

Oh! By the way. Make sure your path is correct okay?
=======

Iskandar


Please HELP!!!!!!!!!!!! I couldn't find .htaccess file in poll's folder!!! There is no .htaccess!!!! Where I can find it???!
Please, very need help.
I've installed Advanced Poll to web and configured as I needed - it's ok.
According to the readme.txt I have been trying to put it html - nothing.
As far as I understand, there is should be script under <html> tag:
<?php
include_once "poll/poll_cookie.php";
?>

and in <body> </body> there should be:
<?php include_once "poll/booth.php"; echo $php_poll->poll_process(6);?>
(for example)... But when I upload html to web I see text "poll_process(6);?>".
Please, what the way I could solve this problem?! (I've tryed to put the whole direction: <?php include_once "http://www.mysite.com/poll/booth.php"; echo $php_poll->poll_process(6);?> - but it doesn't work).

Please, I really need your help!!!!

P.S. Sorry, I guess, it's stupid question, but I'm not pro in php!
 
Forum Index » Profile for ollexus » Messages posted by ollexus
Go to:   
Based on the open source JForum