******************************************************************** _ \ / _/ , / / , | \ / _/ , / / / / \ _/ / _ | / _/ _/ ___/ _/ __| _/ ___/ _/ _| _/ _/ _\ PHP-Displayer 2.0 (c)2002 Peter Kerl ******************************************************************** Display tips, quotes, banners or pictures on your pages. As sequence, random or periodical (one per hour, day or week). Automatic exclusion of repeats/doubles. No database (MySQL etc.) needed. Easy to handle. A file with hundreds of citations is included. Examples and continuously supplemented quote-files you can find at: http://passepartout.peterkerl.de Requirement: A server supporting PHP3 or better. That's all. TO DO: Unzip your package "displayer.zip" Add the following PHP-Tags to the HTML-Files you want to supply with displayed tags/messages: - [the program-file] - [the PHP-Tags creating your messages (tags) where ever you want, as many as you want, $display2 and so on for further displays.] - [this PHP-Tag must follow your link-adresses immediately. It containes the data that must be transmitted to the next page. Look at "dispdemo.php" for the concrete procedure. This tag is not necessary for "periodical"-mode!] Change the File-Extension from "htm" ("html") to "php". Load up the Files into one directory: - displayer.php (the program-file) - quotes.txt (quotes you can use) - tags.txt (Messages you want to show) - dispdemo.php (your own HTML-File, "dipsdemo" is only an example) [be shure to use lower case for the filenames, because some servers are case sensitiv.] Configuration: Open "displayer.php" with an editor and go to the settings- paragraph. $displayNo sets the number of displays you want to use. $file1 is the file which containes your tags or quotes for "$display1". Every Setting-Variable has got a number as tail, so that each of the displays can get its own setting. Otherwise, setting No. 1 (the variables with a 1 as tail) will be used for all the following displays. $mode1 - choose "random", "sequence" or "periodical" mode. Sequence means, that your tags are called one after another, starting with the "$startNo". If you choose "random" you can exclude repeats/doubles which otherwise could randomly appear. "$deleteRepeats" is the number of tags without repeats (doubles). "periodical" finally means, that your tags are changed periodically, one per day or hour, according to your "$period1" - measure. In this mode for example you could display one tip per day of the week. $period1 - is the measure for changes in "periodical"-mode. $weekstart1 - determines the day of change. (only in "weeks"-period) Here are some general settings (without number as tail): $sep - The signs used to separate the tags in your tags-file. I used "%%", but you can change this with $sep = "what ever you want to use". $lineBreak - this variable set to 1 will cause automatic linebreak for text-displays. This means, that the original linebreaks of your text will be translated to HTML. Setting this variable to 0 will deactivate automatic linebreak. $startNo - this only works for sequence-mode, and it's just the tag in your file, you want to start with. Normally No. 1 $deleteRepeats - is the number of tags without repeats (doubles). Don't make this number to big, 20 in most cases is enough. You can "overrule" the Default-Settings in the displayer-file by putting "o_variables" to your HTML-Files. For Example: $o_mode2 = "random" will overrule $mode2 in the Settings-Paragraph in "displayer.php". To take effect, these overrule- variables must be inserted above the include-command [include("displayer.php")], or be transmitted with a link: href="a_file.php?o_mode1=periodical&o_period1=hours" You will find further informations in the files you have to work with ("dispdemo.php", "displayer.php", "tags.txt")! See also CITAGEN - Quotegenerator on http://passepartout.peterkerl.de, which is even more easy to handle and contains more quotes. enjoy your cyber-life , / _/ _ _/ _/ _/ _/ / _/ _/ _/ _/ _/ Peter Kerl, Braunschweig 2002-02-20 www.peterkerl.de