Littlepicpoll [Polls And Voting]

Questions? Need Help? Want to share? » PHP Forum
 
Script Name:
Littlepicpoll

Download:
littlepicpoll.zip

Category:
Polls And Voting

Archive Content:

Content:

Images

Content:

Readme.html:


Amazing Little Picture Poll - Readme
    

    




    





    

little poll home




amazing little picture poll readme 


    Hi there. This readme file will give some background information on 
    The Amazing Little Picture Poll and,  most importantly,  will tell you 
    how to set it up on your site!

about 


    The Amazing Little Picture Poll v1.0 is a sweet little
    php application. It is a simple picture poll which uses
    a flat file to store voting scores. It's easy to set up
    and configure to your own needs.


    The Amazing Little Picture Poll can be freely 
    distributed,  manipulated,  stolen,  abused,
    used for any kind of activities.


    In case of any problems with the original
    code,  I'll be glad to help out. Mail
    to: littlepoll
    

    Any suggestions for improvement are also 
    always very welcome!


    I can not be held responsible or liable for 
    anything.

version history 


    v1.0: First full version with installation instructions
    to be freely distributed.
    


    v0.2: Some minor improvements.


    v0.1: First beta version,  created on request 
    based on the code of The Amazing Little Poll.

requirements


    Besides the REALLY obvious:

    A php-enabled webserver,  and access to it
    to set a file's attibutes.

installation steps

Step 1:Copying files


    Copy the following files to your home
    directory on the webserver:
    - lp_settings.php
    - 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
    - all files in the "images" subdirectory,  make sure
      they are in the same subdirectory in your server


    I would recommend SmartFTP 
    as an FTP client. It's free for personal use and works pretty good.


Step 2: Setting file attributes


    Set the attributes of the file "lppiclist.txt"
    and "lp_log.dat" so all parties (owner,  group,  public) have read and 
    write access. That's CHMOD to 666 for the techies out there.


    If you use  SmartFTP,  then select
    the file you want to change attributes of,  select Commands - 
    Properties / CHMOD. Then type 666 in the permissions box.

Step 3: Set-up


    Open lp_admin.php in your browser,  and set
    up your poll. (Initial password = 
    "elephant")


    For the pictures that you want for voting,  use full links to
    both thumbnails and the full size pictures.


Step 4: Testing


    Test your poll using the Amazing Little Poll
    Test Facility. Open lp_test.php for this
    in your browser.

Step 5: Implementing source code

    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: Implementing poll



    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: Implementating dynamic title


    You can add a 'dynamic' title for the Poll,
    which reads something like "your votes 
    please" or "thanks for your vote",  
    depending on the situation. Put the 
    following code where you want the title to 
    be:    


    <?php echo($mainstr); ?>

Step 8: Customizing general


Open the file 'lp_settings.php' 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 the graphs


    The graph is drawn using two little .gif
    files. They should be 1 pixel in width. You
    can change them to change the appearance and color of
    the graphs. 

Step 10: Customizing the vote button


    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 


Other Polls And Voting Scripts:

WebMaster Resources Home

©RingsWorld.com