Thanks for your help, Herve....appreciate it.
Cheers,
John
<table class="outer" cellspacing="1">
<{if $block.full_view == true}>
<tr>
<th><{$block.lang_forum}></th>
<th><{$block.lang_topic}></th>
<th align="center"><{$block.lang_replies}></th>
<th align="center"><{$block.lang_views}></th>
<th align="right"><{$block.lang_lastpost}></th>
</tr>
<{foreach item=topic from=$block.topics}>
<tr class="<{cycle values="even,odd"}>">
<td><a href="<{$xoops_url}>/modules/newbb/viewforum.php?forum=<{$topic.forum_id}>"><{$topic.forum_name}></a></td>
<td><a href="<{$xoops_url}>/modules/newbb/viewtopic.php?topic_id=<{$topic.id}>&forum=<{$topic.forum_id}>&post_id=<{$topic.post_id}>#forumpost<{$topic.post_id}>"><{$topic.title}></a></td>
<td align="center"><{$topic.replies}></td>
<td align="center"><{$topic.views}></td>
<td align="right"><{$topic.time}></td>
</tr>
<{/foreach}>
<{else}>
<tr>
<td class="head"><{$block.lang_topic}></td>
<td class="head" align="center"><{$block.lang_replies}></td>
<td class="head" align="right"><{$block.lang_lastpost}></td>
</tr>
<{foreach item=topic from=$block.topics}>
<tr class="<{cycle values="even,odd"}>">
<td><a href="<{$xoops_url}>/modules/newbb/viewtopic.php?topic_id=<{$topic.id}>&forum=<{$topic.forum_id}>"><{$topic.title}></a></td>
<td align="center"><{$topic.replies}></td>
<td align="right"><{$topic.time}></td>
</tr>
<{/foreach}>
<{/if}>
</table>
<div style="text-align:right; padding: 5px;">
<a href="<{$xoops_url}>/modules/newbb/"><{$block.lang_visitforums}></a>
</div>
Oh and how do I remove this from the special section which I renamed Columns:
<SCRIPT LANGUAGE="JavaScript" SRC="http://share1.serverspy.net/cgi-bin/monitor.js?mid=32285">
</SCRIPT>
<?php
$smonXML = 'http://www.serverspy.net/bin/smonXml.mpl?mid=32285';
$smon = Array();
global $smon;
$smon['PLAYERS'] = Array();
$smon['DETAILS'] = Array();
$smon['RULES'] = Array();
$smon['SERVERSPY'] = Array();
function startElement($parser, $tagName, $attrs) {
global $smon;
if ($tagName == 'PLAYERS'){
$smon['PLAYERS'][$attrs['NAME']] = Array();
$smon['PLAYERS'][$attrs['NAME']]['CONNECTED'] = $attrs['CONNECTED'];
$smon['PLAYERS'][$attrs['NAME']]['KILLS'] = $attrs['KILLS'];
} elseif ($tagName == 'SERVERSPY'){
$smon['SERVERSPY'][$attrs['NAME']] = $attrs['VALUE'];
} elseif ($tagName == 'RULES'){
$smon['RULES'][$attrs['NAME']] = $attrs['VALUE'];
} elseif ($tagName == 'DETAILS'){
$smon['DETAILS'][$attrs['NAME']] = $attrs['VALUE'];
}
// while (list ($key, $val) = each ($attrs)) {
// } // end while
}
function characterData($parser, $data) {
// no wrapped data used
}
function endElement($parser, $tagName) {
// no wrapped data used
}
// Create an XML parser
$xml_parser = xml_parser_create();
// Set the functions to handle opening and closing tags
xml_set_element_handler($xml_parser, "startElement", "endElement");
// Set the function to handle blocks of character data
xml_set_character_data_handler($xml_parser, "characterData");
// Open the XML file for reading
$fp = fopen($smonXML,"r") or die("Error reading ServerSpy.net XML feed. Either the URL is invalid or the XML feed has been updated.");
// Read the XML file 4KB at a time
while ($data = fread($fp, 4096))
// Parse each 4KB chunk with the XML parser created above
xml_parse($xml_parser, $data, feof($fp))
or die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
// Close the XML filef
fclose($fp);
// Free up memory used by the XML parser
xml_parser_free($xml_parser);
// Details
print "<b>".$smon['DETAILS']['name']." Server Details</b><br>n";
while (list ($key, $val) = each ($smon['DETAILS'])){
print "$key = $val<br>n";
}
print "<br><br>";
// Players
print "<b>Server Rules</b><br>n";
while (list ($key, $val) = each ($smon['RULES'])){
print "$key = $val<br>n";
}
print "<br><br>";
// Rules
print "<b>Players</b> (player-kills-connected/ping)<br>n";
while (list ($key, $val) = each ($smon['PLAYERS'])){
print "$key - ".$smon['PLAYERS'][$key]['KILLS']." - ".$smon['PLAYERS'][$key]['CONNECTED']."<br>n";
}
// end of file
?>