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 v2.02 -- Installation / Instructions...  XML
Forum Index » Support Forum
Author Message
Auron
Expert
[Avatar]

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

Hi people!

Just to answer a few questions it does work! I got it to in about 15 minutes due to a few technical hitches (Not quite as easy as their readme file suggests!). I'm using the text file version on Apache 2.0.45 and PHP 4.3.1 on my PC - NOT a real live web server! Here's some hints on how to get it to work -

0) Whatever you do don't edit any of the files through NotePad or any other equivlent!!! Edit the files ONLY through the Admin Panel. Also keep a backup of anything you think you might need to restore to later. For example make a backup of the original templates before you start customizing them.

1.1) Add this code to a *.PHP file in the <BODY>..</BODY> tags. Put it where you want the script to appear. This will display the most recent poll you created ::

<?php
include_once "C:/Program Files/Apache Group/Apache2/html_public/textfile/booth.php";
echo $php_poll->poll_process("newest");
?>

1.2) If you want to display an old post for some reason add this the <BODY> tags. Replace the 'x' after poll_process to display the poll you want. To find the ID No. of a poll go to the Admin Panel and look under Poll List and you can find the ID No. of the poll you want to be displayed ::

<?php
include_once "C:/Program Files/Apache Group/Apache2/html_public/textfile/booth.php";
echo $php_poll->poll_process(x);
?>

1.3) Add this to the <BODY> tags to display a random poll. Nothing more can be said really. ::

<?php
include_once "C:/Program Files/Apache Group/Apache2/html_public/textfile/booth.php";
echo $php_poll->poll_process("random");
?>

*NOTE* For 1.1, 1.2 and 1.3 :: Replace the C:/Program Files... up to /textfile to the actual location of you booth.php file. I have Apache and PHP 4 installed on my PC to test this kind of stuff.

2) To get the cookie feature to work add this code Before the opening <HTML> tag. On the page your using to view the poll on must have the extentsion *.PHP !!! The solution to this problem comes with it. In FAQ.txt with the follders DB and textfile. So I'll quote from there ::

FAQ:

- After voting I get the following error:
Warning: Cannot add header information - headers already sent by (output started at ...) in ..poll_cookie.php on line ...

Make sure that the page your poll is embedded in has the ::
<?php
require "poll_cookie.php";
?>
tag before anything else. You may have to put in some path information before so... DO IT!

Another way of doing it is this ::
<?php
include_once "poll_cookie.php";
?>

*NOTE*If anyone has tried both these methods can you e-mail me saying which one works or if both of them work, so I can update it here.

3) For those of you with problems with the table width after some fiddling around the solution is SO VERY SIMPLE!!! Go to the Admin Panel and then Genral Settings. The scroll down to - "Table, Font And Color Options" from there you can change the width of the table and loads of other stuff!

If that doesn't work here's a link to a thread where I came up with some other idea for why the problem occured ::

http://proxy2.de/forum/viewtopic.php?t=2022

4.1) I've noticed quite a lot of people having trouble logging in. Well to start with if you got any major problems delete all the files associated with Adv. Poll v2.02 and download a fresh version of it. The first time you log in you have to use the default, preset username and password ::

Username: admin
Password: poll

Once in change the username and password!

4.2) One last thing I'm gonna add here is - if you put any code into a page that is between these tags :: <?php ?/> :: is PHP code. If that page has the extentsion *.htm or *.html or anything else it MUST be changed to *.php other wise the script won't work and your browser will just output the code as plain text in a htm or html page!

5) Now I'm gonna how to explain how to stop people voting more than once. First get into admin panel and change the dropdown box to "logging on" then click "Save changes" (***NOTICE*** I've manged to get the IP logging working by just doing the next step here - General Settings... ect. and without the code at the top of the file). Next go to "General Settings" and down to "Miscellaneous" and then change the dropdown box next to check to IP table. This will check anyones IP, if its in the table they can't vote. Another point I would like to make it worked just by linking to booth.php as in 1.1 and I didn't need to put any code before everything else like it says in 2, so if this doesn't or does work then you might need to add or remove the code from 3 from your *.PHP page where you included the poll.

And 6) I can't think of any other problems. If you have any leave me a message in this thread or send me an e-mail. I'll say this ONCE - I'll only help you if I can!

Good Luck!
Auron
[Email] [WWW]
Auron
Expert
[Avatar]

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

Test_Poll.php :: Notice the .PHP extentsion!!!

:: Another notice when creating a *.PHP file the first line must NOT have ANY white space before it!

<!-- This first bit of PHP includes and executes the file poll_cookie.php so that people can only vote once -->
<?php
include_once "C:/Program Files/Apache Group/Apache2/html_public/textfile/poll_cookie.php";
?>

<HTML>
<HEAD>
Random Stuff that goes in the head tags...
</HEAD>

<BODY>

<!-- This PHP code includes the poll in your page (So you can SEE it). Place this where you want the poll to be displayed -->
<?php
include_once "C:/Program Files/Apache Group/Apache2/html_public/textfile/booth.php";
echo $php_poll->poll_process("newest");
?>

</BODY>
</HTML>

Just change the path names to what yours are. Keep the end file the same though. The path names must be the full/real ones like these ones. I could of put "/textfile/booth.php" BUT from what I understand that doesn't work. So you'll have to input the whole path name like I have above.

*********

For the benefit of people with problems installing Advanced Poll and using it here is an example that proves it can be done. This server won't be available all the time and may be a bit slow as I use it for just testing. This setup uses the textfile version (said to be quicker than the MySQL version).

Good Luck!
Auron
[Email] [WWW]
Auron
Expert
[Avatar]

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

BUMP!

Auron

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]
Anonymous



please visit my site http://www.miperwanida.com/poll2.html and give me your great sugestion for me thank for everythink
Auron
Expert
[Avatar]

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

mida wrote: please visit my site http://www.miperwanida.com/poll2.html and give me your great sugestion for me thank for everythink


Change to .php

- Auron

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]
Anonymous



After voting I get the following error:
Warning: Cannot add header information - headers already sent by (output started at ...) in ..poll_cookie.php on line ...

Make sure that the page your poll is embedded in has the ::
<?php
require "poll_cookie.php";
?>
tag before anything else. You may have to put in some path information before so... DO IT!

Another way of doing it is this ::
<?php
include_once "poll_cookie.php";
?>


I've done this - and it doens't make any difference. I've got the path which it supplies me with also.
Auron
Expert
[Avatar]

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

Do a search on it.

http://proxy2.de/forum/viewtopic.php?p=9905&highlight=cannot+add+header+information#9905

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

Joined: 22/08/2004 19:16:54
Messages: 1
Offline

I've got <?php include_once ".../poll_cookie.php"; ?> above the html code in the page, have turned logging on for the poll, and am checking the IP Table. The poll works great. IP checking works. But cookie checking doesn't.

After the IP check expires (I've got it set to .01 hours for debugging), users can vote multiple times. In fact, they can re-vote by reloading the page that shows their results. When I do this, the number of votes increments and whatever item I voted for gets another vote.

You can see the poll on the following test page:

http://coastsider.com/index2.php
amber222
Graduate

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

barryparr wrote:I've got <?php include_once ".../poll_cookie.php"; ?> above the html code in the page, have turned logging on for the poll, and am checking the IP Table. The poll works great. IP checking works. But cookie checking doesn't.

I don't know about anybody else, but when I don't put the php code on separate lines, I get an error. This is how I have to do it:



After the IP check expires (I've got it set to .01 hours for debugging), users can vote multiple times. In fact, they can re-vote by reloading the page that shows their results. When I do this, the number of votes increments and whatever item I voted for gets another vote.

Not sure if you can use a decimal like that.

Did you make any change to when the cookie is set to expire?

Take a look at Auron's instructions, which basically say the cookie expiration time should be the same as the lock-out time.

http://proxy2.de/forum/viewtopic.php?t=2203

You can see the poll on the following test page:

http://coastsider.com/index2.php

Nice site. What blogger program are you using?
Anonymous



HI all, trying to add a poll to my site I have the poll files installed and I'm able to get into the admin part and all that is working fine I just can't get it working on my page I get the following.

I changed the code from


to what I did for the cookie replacing the server location to the url



but it's still failing.

Any ideas?
Anonymous



I think I got it now... although I'm confused still.
amber222
Graduate

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

I voted in your poll. It appeared to work fine.

Just curious: Did you get that first code from the Admin Panel Help section?
Anonymous



what file do i got to open
i downt find file 'config.inc.php' ???
"
1. Open the configuration file 'config.inc.php' with a text editor
and set up your database settings.

$POLLDB["dbName"] = "YourDBName";
$POLLDB["host"] = "localhost";
$POLLDB["user"] = "YourUsername";
$POLLDB["pass"] = "YourPassword";
"
help
Anonymous



i font it
Anonymous



Hi do you have any experience using setting up advanced poll on IIS using PHP version 5. I'm using MySQL as the database. I've just recently installed the latest version of PHP and MySQL but I know they are working fine, so I'm wondering if it is something in the install.php code of Advanced poll 2.3

I get a message

PHP Notice: Undefined variable: HTTP_SERVER_VARS in C:\inetpub\wwwroot\polls\install.php on line 10

I think all the HTTP_*_VARS got depricated in PHP version 5. Even when I change them to things like $_SERVER['hhhhhh'] it still doesn't seem to work. Any ideas?

thanks
Michael Randall
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum