Eve Support Community
Forums
Eve Community
Customization Ideas
PHP simple poll help for a custom board|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Groupee Newbie |
Hi, I have customized my board by inputting custom html. I have a php script for a simple poll that I want to include down the side of the board - which is in a table, so it should be no problem.
Problem is though, the script for the poll requires me to do things that I don't see how to do!! This is where I got the script - http://www.mr-corner.com/LittlePoll/ And the installation is really simple but I guess I can't see how to flip that over to put into my custom html. Notice that the first step (after uploading the php files) is to insert an "include" statement BEFORE the <html>. And of course, how do I get the script to find all of the files it needs? Is it possible to have this kind of poll - or if this is not the best script to use for this, does anyone have ideas or examples of easier polls that they've installed in Custom HTML? Thanks for the help! ******************** ***** Step 1: Files *********************** Copy the following files to your home directory on the webserver: - lp_settings.inc - lp_source.php - lp_admin.php - lp_test.php - lp_silly.php - lp_recookie.php - lplist.txt - lp_log.dat - lp_0.gif - lp_1.gif ***** Step 2: Attributes ****************** Set the attributes of the file "lplist.txt" and "lp_log.dat" to 666 - meaning read and write access for all parties. ***** Step 3: Set-up ********************** Open lp_admin.php in your browser, and set up your poll. (Initial password = "elephant") ***** Step 4: Testing ********************* Test your poll using the Amazing Little Poll Test Facility. ***** Step 5: Implementation 1 ************ Now that the poll itself is working, it's time to implement it into your site. Paste the following code above the <html> tag in your site (so really above everything else): <?php include("lp_source.php"); ?> (if you get an error message like "cannot add header information, headers already sent by...", then please make sure that the <?php tag is really at the beginning of the file) ***** Step 6: Implementation 2 ************ Where you want the poll to be in your page, add the following lines of code: <?php if($votingstep==1) { echo($step1str); } if($votingstep==2) { echo($step2str); } if($votingstep==3) { echo($step3str); } ?> Where you want the question to be in the page, add the following line of code: <?php echo($question); ?> If you want to show the total number of votes, add the following line: <?php echo($totalvotes); ?> ***** Step 7: Implementation 3 ************ You can add a 'dynamic' title for the Poll, which reads something like "your votes please" or "thanks for your vote", according to the situation. Put the following code where you want the title to be: <?php echo($mainstr); ?> ***** Step 8: Customizing 1 *************** Open the file 'lp_settings.inc' in a text editor and set it up according to your wishes. IMPORTANT: make sure you set the filename of your page (for example, index.php) correctly! IMPORTANT: change the initial admincenter password for better security! ***** Step 9: Customizing 2 *************** The graph is drawn using two little .gif files. They should be 1 pixel in width. You can change them to change the appearance of the graphs. ***** Step 10: Customizing 3 ************** You can change the style of the vote button to fit the style of your page. To do this, enter the CSS code in the $buttonstyle variable in lp_settings.inc. For example, to get a black button with a white border and white text: $buttonstyle="border:1px solid white; background:black;color:white;"; For more information on CSS (cascading style sheets), visit www.webmonkey.com ***** Step 11: Logging ******************** Open lp_log.dat to get an overview of events of the poll, when a new one was created, hack attempts, votings, etc. ******************************************* |
||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Eve Support Community
Forums
Eve Community
Customization Ideas
PHP simple poll help for a custom board
