Si4 Install manual

Requirements. 1

Installation. 1

HTML Installation: 1

PNG Installation: 2

XML Installation: 2

Configuring. 2

Modifying. 3

Modifying the script 3

License. 3

Contact 4

 

Requirements

  • Web host with PHP support
  • UDP socket connections allowed for PHP
  • MySQL database [optional]
  • PHP allowed to write files [optional]

Installation

Unzip your download if you have not done so already.

Upload the entire Si4 folder to your web host, which must meet the first two requirements specified above.

HTML Installation:

To integrate Si4 into your existing website, you will have to edit your web page, which in this example will be a php file.

An example of how you could integrate Si4 into your php file:

<html>

<body>

 

Anything HTML or code can go here.

 

<?php /* Notice how this block is below  the body-tag */

// The string in this define should be set to the

// relative path to the Si4 folder on your web host.

// In this case the Si4 folder was placed in the root.

define (DIR_BASE,"si4/");

include(DIR_BASE."config.php"); // Do not touch

include(DIR_HTML."html.php"); // Do not touch

?>

 

Anything HTML or code can go here.

 

<?php /* This is where the HTML table will appear */

html("130.89.160.46:27015","small"); // Small HTML

html("130.89.160.46:27015","medium"); // Medium HTML

html("130.89.160.46:27025","large"); // Large HTML

?>

 

Anything HTML or code can go here.

 

</body>

</html>

The example seems pretty self-explanatory, and is included in the download. The two includes listed above should be below the body-tag, or the Javascript hover elements will not display properly.

PNG Installation:

If your web host is running Apache and allows you to use the RewriteRules in .htaccess files, then you can display any server information PNG by linking to:
http://yourwebhost.com/path_to/si4/gdlib/small_ip_port.png or
http://yourwebhost.com/path_to/si4/gdlib/large_ip_port.png

 

If your web host does not meet the above requirements, you can try linking to:
http://yourwebhost.com/path_to/si4/gdlib/gdlib.php?host= ip:port&type=small or

http://yourwebhost.com/path_to/si4/gdlib/gdlib.php?host= ip:port&type=large

 

Mind you this will only work if your web host allows you to use the gdlib libraries for PHP.

XML Installation:

If your web host is running Apache and allows you to use the RewriteRules in .htaccess files, then you can display any server information XML by linking to:
http://yourwebhost.com/path_to/si4/xml/ip_port.xml or
http://yourwebhost.com/path_to/si4/xml/ip_port.xml

 

If your web host does not meet the above requirements, you can try linking to:

http://yourwebhost.com/path_to/si4/xml/xml.php?host=ip:port

Configuring

To configure your Si4 installation, open the “config.phpfile with a text editor, and change the variables there to the correct values. The comments in that file should give you a clue as to what each setting does, if the name is not already self-explanatory.

Modifying

Modifying the script

Here’s a very brief description of how to handle a few of the basic modifications:

  • Add new colorschemes:
    For HTML: Open folder “html/css/” and look at the examples there, and try to make your own based on those examples.
    For PNG: Open folder “gdlib/style/” and look at the examples there, and try to make your own based on those examples.
  • Add new map images:
    New map images for a certain game can be added by opening the corresponding “images/[game name]” folder and placing the images in there. The following formats are supported: BMP, JPG, GIF, PNG.
  • Add new game:
    A new game for a already installed protocol can be added by placing a 16 by 16 pixel PNG image icon for the game in the “images/icons/” folder. Map pictures for a new game should be places in the folder “images/maps/[gamename]” in which the gamename is the name returned by the protocol, in which the following characters have been removed:
    |, :, ., ?, *, <, >, /, \, ", ', \n, \t

License

This script is released under the GNU General Public License.

 

Si4 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or

(at your option) any later version.

 

Si4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

 

You should have received a copy of the GNU General Public License

along with Si4; if not, write to the
Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor,
Boston, MA  02110-1301  USA

 

Copyright 2006 Tim te Beek

Contact

If you feel the need to contact me you can do so by sending an email to: timtebeek@gmail.com