:: LI-Countdown
| Documentation - Setup |
Extract the .zip file to a temporary folder and edit everything as described
below. Then upload everything to a folder on your server. Simply add a php include command on the spot where you want your
countdown timer.
This script comes with 3 files:
- countdown.php --> The main script that does all the work
- setup.php --> The setup file which you can change to suit your countdown timer layout
- readme.txt --> The readme file with the same contents as this page
- At the end you can read how to implement the countdown timer to your website
- countdown.php
- This is the main script which does all the work. You don't need to change anything to this file.
- setup.php
- In this file you can edit the layout and style of the timer. If you want another counter in a different style, copy
this file and give it another name, but keep .php at the end.
The variables you can edit:
- $utc_diff = 0; The timer will use UTC time as base time. If you want it to countdown from your timezone, enter the amount of hours that the timezone of your choice differs from utc. if you choose a time west of UTC put a minus in front of the hours
- $style = 1 There are 5 styles in which your timer can show up. The list with possibilities are listed at the end of this page
- $year(s)_text = "Year(s)"; The text you will see after the number of year(s). There is a $year_text and a $years_text so you can have a different word for a single year or multiple years
- $day(s)_text = "Day(s)"; The text you will see after the number of day(s). There is a $day_text and a $days_text so you can have a different word for a single day or multiple days
- $hour(s)_text = "Hour(s)"; The text you will see after the number of hour(s). There is a $hour_text and a $hours_text so you can have a different word for a single hour or multiple hours
- $min(s)_text = "Minute(s)"; The text you will see after the number of minutes(s). There is a $min_text and a $mins_text so you can have a different word for a single minute or multiple minutes
- $sec(s)_text = "Second(s)"; The text you will see after the number of second(s). There is a $sec_text and a $secs_text so you can have a different word for a single second or multiple seconds
- $msg_complete = "Countdown complete"; The message that will show up if the countdown is complete
- readme.txt
- This file contains the same as this page
The steps for implementing a counter into your website:
- Give the page you want a counter on a php extension
- On the spot where you want the counter enter the following:
<?php
include("countdown.php");
countdown(2009,8,6,22,29,0,"setup");
?>
- The first line calls for the countdown script
- In the second line you can enter the countdown date and name of the setup file (without .php)
- You should enter the date as follows: year,month,day,hour(s),minute(s),second(s)
- If the number of the month or day is below 10 don't enter a 0 in front of it, or you'll get a wrong countdown. E.G. for may 8 enter 5,8 instead of 05,08
- If you made a different setup file for another countdown timer, you change "setup" in the filename of the other setup file
This are all the styles you can choose from:
- $style = 1 You will get everything; The number of years, days, hours, minutes and seconds to your selected time.
If for example the number of years and days is 0 they won't show up you'll just get the amount of hours, minutes and seconds left
- $style = 2 The total number of days to your selected date will be displayed
- $style = 3 The total number of hours to your selected date will be displayed
- $style = 4 The total number of minutes to your selected date will be displayed
- $style = 5 The total number of seconds to your selected date will be displayed
Go back to the product page
|
|
|
|
|