ManiaTemplate is a very-lightweight CMS for ManiaLinks.
First you create or import XML templates with placeholders for the content.
Then you create pages based on templates and you fill the placeholders with a simple Manialink admin interface.
You can easilly exchange templates with simple XML files.
It can be used to quicly create a bookmarkable manialink for your server

(This template is included)
Requirements
- PHP 5.3 or newer
- MySQL 5.0
- A Web Services API username and password
- + a ManiaConnect application
The basic syntax to define a placeholder is: @@name@@
For instance :
Code: Select all
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<manialink version="1">
<label text="@@text@@" />
</manialink>
Code: Select all
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<manialink version="1">
<label text="@@text||This is the text in the middle@@" />
</manialink>
- In text attribute
- In manialink attribute
- For setting a different style
- ...
Code: Select all
<label sizen="@@labelSize@@" />
<quad sizen="10 10" style="Icons128x128_1" substyle="@@iconSubStyle@@" />
Installation
- Download zip file here.
- Configure your application, options are located in config/app.php
* You can add administrators by adding their login with this syntax :* Replace http://www.example.com with your hostname, and configure your mysql database information, your url, your manialink and your webservice API username and password.Code: Select all
$config->moderators[] = 'your_login';
- Load the file ressources/database.sql in the database named 'maniatemplate'. You can change it in the file 'librairies/ManiaTemplate/Services/AbstractServices.php'.
- (optionnal) Copy the 3 xml templates from the folder ressources/layouts/ into your Documents/ManiaPlanet/Media/Manialink
- Go to the app url within the game (on localhost it should be http://127.0.0.1/pages/)
- Upload your first layout but clicking 'Upload a layout'
- Create your first page by clicking on the layout name
List of installed layouts:

Page creation:

Placeholders edition:

Page example:

Exemple of layout
Code: Select all
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<manialink version="1">
<quad posn="-80 45 1" sizen="160 90" style="Bgs1" substyle="BgWindow" />
<quad posn="-70 44 2" sizen="140 12" style="Bgs1" substyle="BgWindow2" />
<label posn="0 40 3" halign="center" text="@@first||First line of text@@" />
<label posn="0 30 2" halign="center" text="@@textlink||Text of the center link@@" manialink="@@link||This must be a link@@"/>
<label posn="0 20 2" halign="center" text="$l[www.maniaplanet.com]Voici un lien url vers le site www.maniaplanet.com$l" />
<label posn="0 0 2" halign="center" style="@@style||Style of the last line@@" text="@@last||Text of the last line@@" />
</manialink>
As it is the very first version, any suggestions or comments are welcome !
This application is very simple and may help some people to understand how to use ManiaLib.