Location: PHPKode > scripts > Flash-Ticker > flash-ticker/codetopaste.php
<?php

/************************************************************************/
//
//  FLASH-TICKER
//
// module created by HI-Lab
// Copyright (c) 2003 by cooperativa sociale l'Utopia a r.l.
// released under GPL licence
//
// www.hi-lab.net
//
/***************************************************************************/

/****************************************************/
// TICKER-FLASH by HI-Lab: copy from here...
//
// Paste this code where you want in layout
// of php-nuke: for example in function themeheader
// in themes/yourtheme/theme.php
/****************************************************/

// swf file movie
$swfmovie="modules/Ticker/news.swf";

// Language defines
define("_READTEXT","Leggi Ticker in formato testo.");

// This IF try to find browser name and return proper html output
	$browser=getenv("HTTP_USER_AGENT");
	if ((strstr($browser,"MSIE"))&&(!(strstr($browser,"Opera"))))
		{
		echo "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n"
		."codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\"\n"
		."WIDTH=\"250\" HEIGHT=\"20\" id=\"Ticker-Flash\">\n"
		."<PARAM NAME=movie VALUE=\"$swfmovie\">\n"
		."<PARAM NAME=quality VALUE=high>\n"
		."<PARAM NAME=bgcolor VALUE=#FFFFFF>\n"
		."</OBJECT>\n";

		}
	elseif ((strstr($browser,"Mozilla/4"))||(strstr($browser,"Mozilla/5"))||(strstr($browser,"Opera")))
		{
		echo "<embed src=\"$swfmovie\" quality=\"high\"\n"
		."width=\"250\" height=\"20\" type=\"application/x-shockwave-flash\"\n"
		."pluginspage=\"http://www.macromedia.com/go/getflashplayer\">\n";
		}
	else
		{
		echo "<a href=\"modules.php?op=modload&name=Ticker_text&file=index&verifica=1\">"._READTEXT."</a>\n";
		}

// End of Ticker code!

?>
Return current item: Flash-Ticker