You are on page 1of 1

There are two directories: templates and webstats.

In the webstats directory, all kind of gfx, static-html, etc. ... is stored.
The templates directory contains the html-files with tags/placeholders.

The Webserver is looking for tags like:

<--USERCOUNT--> //current amount of users in the hub


<--SHARESIZE--> //Sharesize in GB
<--ACTIP--> //actual hub-adress
<--SHARELIMIT--> // Set sharelimit in the hubsoftware
<--SHARELUNIT--> //unit of the set limit
<--MINSLOTS--> //minimum open slots set in Hubsoftware
<--MAXHUBS--> //max. number of simultaneous hubs
<--MAXNOCLIENTS--> //max. Number of allowed Users on the hu
<--CHATLINE0--> //most recent chat-line
... //former chat-lines
.. //former chat-lines
<--CHATLINE14--> //oldest chat-line

In common html-editors its enough to insert a text/tag like <--USERCOUNT-->. But


its important, that in the real souce of the page, the < is replaced by &lt; and >
is replaced by &gt;

If a request of a client occurs, the webserver parses all html-files in the


templates directory and puts the result in webstats. Therefore it would be possible
to use the stuff in webstats as cache.

One possible - and maybe common - scenario:

You run a regular webserver on port 80. And you want to include some statistics
into the existing page. The most simple way is to build on a frameset. That means:
Only a Frame of the regular Webserver redirects to the Hub-Webserver. Realized by
doing (if hub-webserver runs on port 8080:

<FRAME ...src="127.0.0.1:8080" ....>

This will insert the page index.html (in the webstats directory) into your common
Homepage. Inside the frame the user can navigate in the known way.

But take care: every file, that shall contain Live-Statistics, needs to be placed
in the templates-directory. The Hub-webserver copies them on client-browser-request
to the webstats directory. So a link must go there.

If this explanation isnt enough, just have a look at the provided example - and
never mind to ask the dev-team of ptokax.

You might also like