Page name: Elftown technology [Logged in view] [RSS]
2009-12-05 15:46:59
Last author: windowframe
Owner: Hedda
# of watchers: 17
Fans: 0
D20: 12
Bookmark and Share


Elftown is built as a Roxen-module (See ) and is therefore programmed in Pike (See ). As a database backend, MySQL (See ) is used. The hardware has its own Elftown membership. See [Elftron].


How it's built

You can stop reading here if this sounds strange to you: HTTP, HTML, function, SQL-tables

Elftown is not a set of HTML-pages, as you might think. Instead the pages are built by the Roxen-module called Heddate from a set of datafiles describing the HTML-pages. On them it can say something like "<.VIEWMEMBER>" which means that a member should be viewed (and which one, depends on the HTTP-arguments that is given to the page.

The functions are a part of the module, and are therefore fast to call and there is no startup-time. No need for CGI-script or similar things.

One big problem is all the database-queries. For every click you make on Elftown, Elftown has to know if you have a new message, if you have unread postings, if someone wants to be your friend, how many people there are logged in, and so on. Even very simple SQL-queries take some time, so the Heddate caches the mostly used data and keeps it in variables, and can send the information straight from the memory instead of asking MySQL to parse a SQL-query and look in its cache.


Strange pages, .do

Some pages are not HTML-pages, but end with ".do". They are pages that only return a redirect (a type of HTTP-response). It can be "" for example. In these cases, Heddate directly calls that function and returns its return-value (which is a redirect or an error-message).

These pages are fast because they don't need to do all that stuff with checking for new messages, new postings and so on.

Then they send a redirect to a page that shows what you have done (for example your sent message). The thing here is that you can reload this page without resending the message. Therefore the redirect is needed.


Attributes, public forums and so on?

Attributes (like "age", "height" and "description") and public forums and their descriptions are stored in a configuration-file. The good thing about this is that it's very simple to add another forum or a new attribute like "Number of owned cats". The bad thing is that it's pretty hard to make some special feature for only one attribute (if you want to make it possible to search for age>15, but disable the search for height<100 for example) or some special feature in only one forum.


Linking to your Elftown-page

In HTML-code on webpages you can write a link to your Elftown-page in this way:
<a href="">My Elftown page</a>
If you have a complicated username, it's easier to use the member number and write:
<a href="">Nita's Elftown page</a>

You should replace 'sondevil' with your userID. Don't link to "" because that will work, but only for you!

If the one clicking on the link is not logged into Elftown, the clicker will be prompted for a password first.

If you want to use a nice image, you may use one of the existing Elftown Logos... or make your own :)


Building & Customising Elftown

Tired of the green colour? Here you can read about how to make your own stylesheet for Elftown, so that you can choose the colours & fonts yourself.

Guide to the Pseudo HTML on Elftown
Information about how to make text bold, italic etc, write links and inline images in any text you write on Elftown.

Elftown - Contribution
On Elftown - Contribution you can find links to pages where you can contribute to Elftown..



Flags to use in Elftown
These flags can be be used here in the wiki, in your presentation and so on.

Elftown Logos
Logos you can use to link to Elftown etc.

Elftown Graphics
A large collection of graphics that can be used in your presentation or wiki-pages.


Go or return to:
-Elftown - Technical Information
-The wiki-index
-The advanced help page
-The help index

Username (or number or email):


Elftown - Wiki, forums, community and friendship.