Hmmm - well - this isn't very fancy or anything - but here is how I did it.
I'm not sure that it works the same way in phpnuke - but here's how to do it with postnuke...
Add a block - select the Core/php option - and insert the below line - where the path is replaced with your own path.
include("http://wargamer.adsl.dk/ts2/pnticker.php?group=[GR]");
Please note that the ticker.php in my case has been changed to pnticker.php since I wanted identify the one for the postnuke block (due to colorchanges to match the theme)...
The pnticker.php code is inserted below (incl. the credit to the people who deserves it

)
I've set the refresh interval to 7200 seconds. This way it refreshes only when the user reloads the web page. If set to 60 secs. the web page will refresh with the ticker (I've not figured out how to refresh the block only) with is pretty annoying when typing - since the text you type will be deleted on refresh)
Well, I hope this helps you out - I can't really do better
Quote:
<?
/*
****************************
****************************
*Webpost2 for TeamSpeak 2 by Ryan Snook
*
*www.thzclan.com/snooknet
*(c) Copyright TeamCom Team, Ralf Ludwig, Niels Werensteijn
*
* All rights are reserved.
* Copying or other reproduction of this
*program except for archival purposes is prohibited
*without the prior written consent of TC-Team. ****************************
****************************
*/
include("pndb_inc.php");
clearinactive();
$tickermarg = 'topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"';
$tickerrefresh = '<meta http-equiv="Refresh" content="7200">';
if (isset($group)) {
$show = "WHERE server_ispname='$group'";
$link = "?showgroup=$group";
}
if (isset($name)) {
$show = "WHERE server_name='$name'";
$link = "?showgroup=";
}
$sql = query("SELECT * FROM $dbtable $show ORDER BY clients_current DESC LIMIT 1");
while ($data = mysql_fetch_row($sql)) {
if ($data[17] != '0') {
$online = 'on';
} else {
$online = 'off';
}
}
include("tpl_style.php");
?>
<table border="0" cellpadding="0" cellspacing="0" width="165" height="20">
<tr>
<td align="center" width="15"><a href="ts2/listing.php<?= $link ?>" target="_blank"><img src="ts2/images/<?= $online ?>.gif" alt="<?= $online ?>"></a></td>
<td valign="top">
<marquee direction="up" scrollAmount="1" style="width:144px; height:18px; border:0px solid white; padding:1px" onMouseover="this.scrollAmount=0" onMouseout="this.scrollAmount=1">
<table border="0" cellpadding="0" cellspacing="1" width="100%" bgcolor="<?= $bordercolor ?>" class="listfont">
<tr>
<td align="center" bgcolor="<?= $catrowcolor1 ?>" colspan="2" class="catagory" valign="middle"><b><a href="ts2/listing.php<?= $link ?>" target="spf_latest">TeamSpeak Servers</a></b></td>
</tr><?
$sql2 = query("SELECT * FROM $dbtable $show ORDER BY clients_current DESC");
while ($data2 = mysql_fetch_row($sql2)) {
if ($rowcolor == $rowcolor2) {
$rowcolor = $rowcolor1;
} else {
$rowcolor = $rowcolor2;
}
echo '
<tr>
<td align="center" bgcolor="'.$rowcolor.'" class="listing" nowrap><a href="ts2/listing.php?detail='.$data2[0].'" target="spf_latest">'.$data2[10].':'.$data2[11].'</a></td>
<td align="center" bgcolor="'.$rowcolor.'" class="listing">'.$data2[17].'</td>
</tr>';
}
?>
</table>
</marquee>
</td>
</tr>
</table>
</body>
</html>
|