Printable Version of Topic

Click here to view this topic in its original format

[splatterladder] Board _ [splatterladder] - ENGLISH - FAQ and Documentation _ ET:W - Servermonitor FAQ

Posted by: sl.Binaural Jun 14 2006, 10:13 AM


The Splatterladder gives you the possibility to run this little servermonitor on your website. Of course it is for free and without any obligation.


Features:

You have to finish following steps:

1.Upload the attached file to your webspace. This file has to be located in the same directory as the site which runs the servermonitor.

2. Paste the following code into your website and change the given ip-adress to the one of your server.
CODE
<script language="JavaScript" src="http://et.splatterladder.com/export/servermon.js.php?ip=213.239.206.82:27960"></script>


3. So now you can lean back comfortable because you are running a cool servermonitor wich updates itself automatically, lets your users connect directly http://forum.splatterladder.com/index.php?showtopic=42 and provides them with newsworthy mapinfos and downloads.

Check below how to add the server monitor to:

 sl_wrapper.php ( 216bytes ) : 5494
 

Posted by: sl.Proddi Jun 14 2006, 10:56 AM

Details of this file:

QUELLTEXT

<?php
    $url = urldecode($_REQUEST['query']);
    // Securitycheck
    $i = strpos($url,'.splatterladder.com/export/'); if ($i<7 || $i>22) exit;
    $url .= '&wrapper=sl_sm_wrapper.php';
    echo file_get_contents($url);
?>


This file is nothing else than a 'content-wrapper', a kind of proxy-script which only handles requests for Splatterladder (see security check code).
Why this file? Quite simple, your site occupies webspace, the refreshing does the sl-server (normally). These are different domains and it would be cross frame scripting, which is disallowed by every browser. With this wrapper the monitor will be updated through your webspace and there should be no problem with cross frame scripting. super.gif

Posted by: Ragnar_40k Jun 20 2006, 08:36 PM

How to add the server monitor to phpBB:

  1. Download the file [attachmentid=200] and place it in the folder where the file index.php of your phpBB installation is located.
  2. Edit the templates where you want to add the server monitor: insert the line
    QUOTE
    <script language="javascript" src="http://et.splatterladder.com/export/servermon.js.php?ip=213.202.210.55:27960"></script>
    at the appropriate place (don't forget to change the server IP zwinker2.gif). See the example below.

Example:
To add 2 servers at the top of your forum edit the file "overall_header.tpl". Its located in the subfolder "/templates/<template name>", where <template name> is the name of the template, e.g. "subSilver". The original code looks like this:

CODE
.
.
.
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">

<a name="top"></a>

<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">
    <tr>
        <td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
            <tr>
                <td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" ...
                <td align="center" width="100%" valign="middle"><span class="maintitle">{SITENAME} ...
                <table cellspacing="0" cellpadding="2" border="0">
                    <tr>
                        <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> ...
                         <a href="{U_REGISTER}" class="mainmenu"><img src="templates/ ...
                        <!-- END switch_user_logged_out -->
                        </span></td>
                    </tr>
                    <tr>
                        <td height="25" align="center" valign="top" nowrap="nowrap"><span ...
                    </tr>
                </table></td>
            </tr>
        </table>

        <br />

Add the <script> code lines where you want to place the server monitors, e.g.:

CODE
.
.
.
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">

<a name="top"></a>

<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">
    <tr>
        <td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
            <tr>
                <td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" ...
                <td align="center" width="100%" valign="middle"><span class="maintitle">{SITENAME} ...
                <table cellspacing="0" cellpadding="2" border="0">
                    <tr>
                        <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> ...
                         <a href="{U_REGISTER}" class="mainmenu"><img src="templates/ ...
                        <!-- END switch_user_logged_out -->
                        </span></td>
                    </tr>
                    <tr>
                        <td height="25" align="center" valign="top" nowrap="nowrap"><span ...
                    </tr>
                </table></td>
                <td><script language="javascript" src="http://et.splatterladder.com/export/servermon.js.php?ip=134.130.18.217:27960"></script></td>
                <td><script language="javascript" src="http://et.splatterladder.com/export/servermon.js.php?ip=134.130.13.111:27960"></script></td>
            </tr>
        </table>

        <br />

Do you see the difference in the lower part? Thats where the server monitors show. This is just an example - you can add this to any template file of your liking in a similar way.

Posted by: Ragnar_40k Jun 20 2006, 08:49 PM

How to add the server monitor to PHPNuke (thanks go to http://forum.splatterladder.com/index.php?showuser=25189 for sharing this with us):

  1. Add sl_wrapper.php to the folder where your index.php is located: [attachmentid=200]
  2. Open the "Blocks" folder of your PHPNuke installation and upload the file from the .zip-file there: [attachmentid=929] (don't forget to change the game server IP inside zwinker2.gif).
  3. Open the admin panel of your site, e.g. www.yoursite.xxx/admin.php.
  4. Go to the "Blocks" section.
  5. Create a new block which uses the "block_sl.monitor.php" file.
You can also create the file "block_sl.monitor.php" yourself. The code is:
CODE
<html>
<body>
<?php

if (eregi("block-sl.monitor", $PHP_SELF)) {
    Header("Location: index.php");
    die();
}

$content  = "<center>";
$content .= "<script language=\"JavaScript\" src=\"http://et.splatterladder.com/export/servermon.js.php?ip=83.142.85.186:28888\"></script>\n";
$content .= "</center>";

?>
</body>
</html>


 block_sl.monitor.zip ( 378bytes ) : 3091
 

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)