Place scroller.txt (writeable for you’re webserver)
and scroller.php in a directory, adjust HTML code
and you’re set to go
Include in the file where you want the scroller to
appear the following IFRAME:
Â
File: Scroller.txt (9 lines)
——————
klik op de scroller om jouw tekst toe te voegen
1
2
3
4
5
6
7
8
File: Scroller.php
——————
Â
#
# Scroller.php
# Copyright (c) 2003 by CoMPa Technology
#Â Â Â Â Â Â http://www.compa.nl
#
# Designed for http://www.wilhelmina.org
# and all others who like the functionality
## Start session (for keeping track and not letting
# users fill up the string
session_start();# Get variables
$act=$_GET[‘act’];
$info=$_POST[‘info’];# What file to keep the text’s in
$file=”./scroller.txt”;
# What seperator to use (can be html text)
$sep=”“;if ( $act == “” )
{
if (is_file($file)) {
$content=file($file);
$arraycount=count($content);
while ( $arraycount != 0 ) {
$scroller = $scroller2;
$arraycount–;
$line=preg_replace(“/(<.+?>)/”, “”, $content[$arraycount]);
$scroller2 = “$line $sep $scroller”;
}
$scroller = “$sep $line $sep $scroller $line $sep”;?>
Â
}
exit;
}if ( $act == “edit” && $_SESSION[‘scroller_post’] != “true” )
{
?>} elseif ( $_SESSION[‘scroller_post’] == “true” ) {
?>
}Â
if ( $act == “add” )
{
$_SESSION[‘scroller_post’]=”true”;if ($content=file($file)) {
# Leave first two intact, reroute all others
$i=1;
while ($i<8) { $content[$i]=$content[$i+1]; $i++; }
# add new one
$content[8]=$info.”\n”;
$file=fopen($file,’w’);
$i=0; $contentsize=9;
while ($i<=$contentsize) {
$content[$i]=preg_replace(“/(<.+?>)/”, “”, $content[$i]);
$content[$i]=stripslashes($content[$i]);
fputs($file,$content[$i]);
$i++;
}
fclose($file);
}
?>
}
exit;
?>