2005-10-09, 06:23 PM
Well Okey. My Plugin is giving nasty warnings =P hehe. Okey. Here's the code.
It gives out these warnings ->
Well as I said I'm a newbie. Can someone help?
PHP Code:
<?php
/**
* Copyright © 2005 CraKteR, crakter [at] gmail [dot] com
*/
function serverstats_info()
{
return array(
"name" => "Server Stats",
"description" => "A little plugin",
"website" => "http://nordicfilegalaxee.com/mcdc/forum/",
"author" => "CraKteR",
"authorsite" => "http://nordicfilegalaxee.com/mcdc/forum/",
"version" => "1.0",
);
}
function serverstats_activate()
{
global $db;
// Insert all Varibles needed for Server Stats
require "./inc/adminfunctions_templates.php";
find_replace_templatesets("stats", '\#$footer', "\$server_stats\n\$footer");
// Insert all Templates needed for Server Stats
$templatearray = array(
"tid" => "NULL",
"title" => "server_stats",
"template" => "<table border=\"0\" cellspacing=\"\$theme[borderwidth]\" cellpadding=\"\$theme[tablespace]\" class=\"tborder\">
<tr>
<td class=\"thead\"><strong>Server Stats</strong></td>
</tr>
<tr>
<td class=\"trow1\" valign=\"top\">Server Uptime: \$uptime</td>
</tr>
</table>
<br />",
"sid" => "-1",
);
$db->insert_query(TABLE_PREFIX."templates", $templatearray);
}
function serverstats_deactivate()
{
global $db;
// Delete all Varibles needed in Server Stats
require "./inc/adminfunctions_templates.php";
find_replace_templatesets("stats", '#\$server_stats\n# ', "", 0);
// Delete all Templates needed in Server Stats
$db->query("DELETE FROM ".TABLE_PREFIX."templates WHERE title='server_stats'");
}
?>
Code:
Warning: Delimiter must not be alphanumeric or backslash in /home/nordic/domains/nordicfilegalaxee.com/public_html/mcdc/forum/inc/adminfunctions_templates.php on line 25
Warning: Delimiter must not be alphanumeric or backslash in /home/nordic/domains/nordicfilegalaxee.com/public_html/mcdc/forum/inc/adminfunctions_templates.php on line 37
Well as I said I'm a newbie. Can someone help?