Page ManiaLink
Un article de TM Wiki.
à compléter... Translation to French
Introduction
This page is intended as an overview for the ManiaLink tags, which you need to be aware of to set up proper ManiaLink pages on your own.
The tags are derived from XML and are in fact pretty limited, but sufficient to make interesting looking pages.
Some tags take attributes to further define what and how the page's content is displayed.
The Tags
='*' means the attribute takes a number, integer or floating point. Try to experiment until you get a feeling for the right size. ='2' is huge.
='RGBA' means a RedGreenBlue code with additional alpha code for the blending. FFFF is opaque white while FFF5 is transparent white with the background visible. FFF0 is invisible white, because it is fully transparent.
XML Header
-
<?xml version="1.0" encoding="UTF-8"?>
Every ManiaLink page needs to begin with this header.
XML Comment
-
<!-- Your comment about this page or code here -->
The optional comment where you can put in info about author, contents etc.
You can put comments anywhere in the page documenting the code, links or other contents etc.
Basic Tags
-
<manialink> ... </manialink>
The main tag which needs to surround everything except the XML header. Start and end your ManiaLink page with this tag.
In the closed beta test this tag had been called <manianet> .
-
<type> default </type>
The type of the page to follow. The standard here is default .
-
<format> ... </format>-
textsize='*' -
textfilter='*'
-
With this tag you can set some defaults for the page such that you don't have to repeat it later with every tag.
-
<background> ... </background>-
bgcolor='RGBA' -
bgborderx='*' -
bgbordery='*'
-
You have guessed it already. This tag defines the background of the page.
Formatting Tags
-
<line> ... </line>-
height='*' -
bgcolor='RGBA'
-
With the line and cell tags you define a grid on your page, where into you place the page's content.
A page must contain one or more lines.
Lines will adapt to the height of their content if no specific height is given as attribute.
-
<cell> ... </cell>-
width='*' -
bgcolor='RGBA'
-
With the line and cell tags you define a grid on your page, where into you place the page's content.
Any line must contain one or more cells. Cells are being placed one by one in a row in their according line.
Cells will adapt to the width of their content if no specific width is given as attribute.
The most simple page you can do is a page with one line, which contains one cell.
Content Tags
-
<text> ... </text>-
textsize='*' -
textcolor='RGBA' -
halign='top|center|bottom' -
valign='left|center|right'
-
The tag to contain text.
For line breaks do line breaks in the text. There is no markup for it.
-
<icon> http://my.web.space/Trackmania/my_little_picture.jpg </icon>-
width='*' -
height='*' -
halign='top|center|bottom' -
valign='left|center|right'
-
The tag to contain graphics. The *.jpg format is known to work with it.
-
<video> http://my.web.space/Trackmania/my_little_video.bik </video>-
width='*' -
height='*' -
halign='top|center|bottom' -
valign='left|center|right' -
play='0|1'
-
The tag to contain video. The *.bik format is known to work with it.
-
<audio> http://my.web.space/Trackmania/my_little_song.ogg </audio>-
width='*' -
height='*' -
halign='top|center|bottom' -
valign='left|center|right' -
play='0|1'
-
The tag to contain audio. The *.ogg, *.wav and *.mux formats are known to work with it.
Other Codes
- Hyperlinks
Hyperlinks are formatted with text tags.
To link internally to another ManiaLink page use $h. This will open the page in-game.
$h[http://127.0.0.1/Trackmania/links.xml]Links$h
To link externally use $l. This will open the page in your standard web browser.
$l[http://en.tm-wiki.org/Stunt_Mode]TM Wiki: Stunt Mode$l
- Trackmania Text Formatting Codes
You can use Trackmania text codes to overwrite the XML setting for text. These codes you would normally use for track names or online nickname work in ManiaLink pages as well. See the Nickname Formatting page for all the formatting and color codes.
Example Page
Here is an example of a complete page. A screenshot of the page resulting from this code is shown below.
<?xml version="1.0" encoding="utf-8" ?>
<!-- tmx ohei2 is the author of this page -->
<manialink>
<type>default</type>
<format textsize='1' textcolor='FFFF'></format>
<background bgcolor='FFFF' bgborderx='1' bgbordery='1'></background>
<line>
<cell bgcolor='8585' width='2.1'>
<text halign='center' valign='center' textsize='6'>Stunts: Alley Oop</text>
</cell>
</line>
<line height='0.05'>
<cell bgcolor='8585' width='0.05'>5
<text halign='center' valign='center' textsize='1'>$h[http://127.0.0.1/Trackmania/stunts.xml]<<$h</text>
</cell>
<cell bgcolor='0000' width='1.96'></cell>
</line>
<!-- Dummy line to keep the headline on the top -->
<line height='0.125'>
<cell bgcolor='0000' width='2'></cell>
</line>
<line>
<cell bgcolor='ffff' width='1.8'>
<text halign='center' valign='center' textsize='8' textcolor='000'>$wAlley Oop</text>
</cell>
</line>
<line height='0.1'>
<cell bgcolor='fc08' width='1.8'>
<text halign='center' valign='center' textsize='3' textcolor='000'>A vertical jump with the car spinning against the direction of the jump.</text>
</cell>
</line>
<!-- Dummy line -->
<line height='0.09'>
<cell bgcolor='0000' width='2'></cell>
</line>
<line>
<cell bgcolor='8585'>
<video halign='center' height='0.45' play='0' width='0.6'>http://127.0.0.1/Trackmania/Straight%20Alley%20Oop%201260.bik</video>
</cell>
</line>
<line>
<cell bgcolor='ffff'>
<text halign='center' valign='center' textsize='1' textcolor='000'>A Straight Alley Oop 1260
performed by Marius 89 on Nadeo's GiantPinball. (=>$h[http://united.tm-exchange.com/main.aspx?action=trackshow&id=36924]TM$f00X$h$z)</text>
</cell>
</line>
<!-- Dummy line -->
<line height='0.09'>
<cell bgcolor='0000' width='2'></cell>
</line>
<line>
<cell bgcolor='ffff'>
<text halign='center' valign='center' textsize='3' textcolor='000'>Related stunts: $h[http://127.0.0.1/Trackmania/aerial.xml]Aerial$h</text>
</cell>
</line>
<!-- Dummy line to keep the quick links menu on the bottom -->
<line height='0.14'>
<cell bgcolor='0000' width='2'></cell>
</line>
<line height='0.04'>
<cell bgcolor='0000' width='1.96'></cell>
<cell bgcolor='8585' width='0.05'>
<text halign='center' valign='center' textsize='1'>$h[http://127.0.0.1/Trackmania/next.xml]>>$h</text>
</cell>
</line>
<line height='0.095'>
<cell bgcolor='8585' width='1'></cell>
<cell bgcolor='8585'>
<text halign='center' valign='center' textsize='6'>$h[http://127.0.0.1/Trackmania/tips.xml]Tips$h</text>
</cell>
<cell bgcolor='8585'>
<text halign='center' valign='center' textsize='6'> $s-$z </text>
</cell>
<cell bgcolor='8585'>
<text halign='center' valign='center' textsize='6'>$h[http://127.0.0.1/Trackmania/links.xml]Links$h</text>
</cell>
<cell bgcolor='8585'>
<text halign='center' valign='center' textsize='6'> $s-$z </text>
</cell>
<cell bgcolor='8585'>
<text halign='center' valign='center' textsize='6'>$h[http://127.0.0.1/Trackmania/mytracks.xml]Tracks$h</text>
</cell>
<cell bgcolor='8585'>
<text halign='center' valign='center' textsize='6'> $s-$z </text>
</cell>
<cell bgcolor='8585'>
<text halign='center' valign='center' textsize='6'>$h[http://127.0.0.1/Trackmania/myskins.xml]Skins$h</text>
</cell>
<cell bgcolor='8585' width='1'></cell>
</line>
</manialink>
... and the resulting page


