[Scripts] M2 - Manialink Motor (1.4.5)

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
Kimi3
Posts: 510
Joined: 15 Jun 2010, 11:56
Location: France - Seine-et-marne (77)
Contact:

[Scripts] M2 - Manialink Motor (1.4.5)

Post by Kimi3 »

Image


The Manialink Motor, or M2 is a PHP script which is the base of a manialink. What's the use of this motor ? I used a lot of times this motor to spend less time by developing the base of the manialinks, like variables, connections, links betweens pages... So in this motor are included players informations variables, functions, main manialink tags... Thanks to the motor I just have to put images and texts, the rest is managed by the motor.

Le passage à la version 1.4.2 de ce moteur s'accompagne de la compatibilité à la fois de Maniaplanet et Forever. C'est à dire qu'en changeant ne serait-ce qu'un paramètre, adapter le moteur à ManiaPlanet, ou Forever !

One of the advantages of this motor is that you just have to register one page on the playerpage.
    • Features
-> The motor is the manialink, it allows the change of pages and keep the same domain name.
-> Identification with Maniaconnect integrated.
-> Variables usefull pre-integrated and usable on each page of your manialink !
-> 5 plugins pre-integrated
-> SDK Maniaplanet Web Services 1.2 preinstalled
-> Anyone can create his own plugin for everybody.
-> Adding extra plugins very easy. As the updating of the motor.
    • Installation
The M2 zip contain :
- manialink.motor.php : The main file of the motor.
- config.php : Configuration file required for the motor.
- m2_infos.php : Online manager of the motor
- files/ : Folder that contains necessaries files for the motor.
- maniaplanet-ws-sdk/ : SDK files
- plugins/ : Plugins folder
- YourManialink/ : Folder containing your files of your future manialink

The only file you need to modify :
- config.php : Configuration file of the motor

The motor installation is quite simple, unzip the file m2-1.4.4.zip. When it's done, create a folder on your FTP name of your future manialink (as you want). Then, upload in this folder :
- manialink.motor.php
- config.php
- m2_infos.php
- maniaplanet-ws-sdk/
- files/
- plugins/
- YourManialink/

Get the link of the file manialink.motor.php of your FTP. Save on your Playerpage your manialink as URL link : http://uourftp.com/manialinkname/manialink.motor.php

  • Motor configuration
[/color]
Open the file config.php. You have to define some variables :

Code: Select all

<?php 
// DataBase Config :
$db_host = ""; // Put between quotation marks your Hosting link
$db_user = ""; // Put the login of your Database
$db_pass = ""; // Put the password of your Database
$db_nom = ""; // Put the Name of your database

//Manialink Informations :
$manialink=""; // Put your manialink link
$game=""; // Put 0 if it's a Tm United Forever Manialink, or 1 if it's a maniaplanet Manialink !

//Pages :
$pages=array();

//Maniaplanet informations
$version=""; // Put 1 between quotation marks if you want your manialink in 16:9, and 0 in 4:3
$ml_background=""; // Put 1 between quotation marks if you don't want the default grey background, and 0 if you want it.
?>
At first, we'll configure the variables which will be necessary to the connection on your database :
- $db_host : Put between quotation marks, the domain name of your database hosting
- $db_user : Put between quotation marks, the login of your database account
- $db_pass : Put between quotation marks, the password of your database account
- $db_nom : Put between quotation marks, the name of your database

Then, the manialinks informations :
- manialink : Put the domain name (PlayerPage) of your Manialink
- game : Put between quotation marks 0 or 1. 0 if the manialink is for United Forever, 1 if the manialink is for Maniaplanet.

If the motor is for Maniaplanet :
- version : Put between quotation marks 0 or 1. 0 in order to your the manialink's size is 4:3, 1 for 16:9.
- ml_background : Put between quotation marks 0 or 1. 1 for none grey background, 0 for the grey background

Finally, save the config file, and upload it in the same folder of the manialink.motor.php.
Enfin, sauvegardez votre fichier config, et uploadez-le dans le même dossier que le moteur.

  • Complete the installation
[/color]


In order to complete the installation, with your browser, open the file m2_infos.php. The file will create a table in your database. The table will be called the name of your manialink.

The installation is complete ! :D You just have to read the tutorial at the page m2_infos.php.
All the informations are there, if you have more questions, ask me !
    • More
To develop a manialink with the M2 you must have a basic knowledge of PHP and know how develop a Manialink with XML. Read my tutorial (french, English translation coming soon) : [Tuto] Création d'un Manialink

This motor is an open source code, you can modify it as you want, but dont broadcast your modified version.

Some update are regularly proposed. You can check if there are updates of the motor just by clicking Check if there are updates in the M2Infos.

Project for the M2-1.4.5 or 1.5 version :
  • - Correction of likely bugs
    - Plugin Creation
    - ...
Sorry for my english, if you want to correct errors, send me a MP

If you have questions, ask, I'm here to answer.
Last edited by Kimi3 on 26 Mar 2012, 17:18, edited 2 times in total.
Image
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: [Scripts] M2 - Manialink Motor (1.4.4)

Post by magnetik »

As of version 1.4.4, there are multiple security issues in M2.

I've contacted Kimi3 today, but I would recommand not to use it on your web hosting (your whole database could be dumped).
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Yrp360
Posts: 771
Joined: 15 Jun 2010, 11:15
Location: Right behind you
Contact:

Re: [Scripts] M2 - Manialink Motor (1.4.4)

Post by Yrp360 »

This will be very usefull !
User avatar
Kimi3
Posts: 510
Joined: 15 Jun 2010, 11:56
Location: France - Seine-et-marne (77)
Contact:

M2 - Fix - 1.4.5

Post by Kimi3 »

magnetik wrote:As of version 1.4.4, there are multiple security issues in M2.

I've contacted Kimi3 today, but I would recommand not to use it on your web hosting (your whole database could be dumped).
Image

Fix available for security issues outlined by magnetik. The were important but difficult to find for a bad guy.
You have to unzip the fix in the same folder of manialink.motor.php. And after re-upload these file on your FTP :
- m2_infos.php
- header.php in the folder files/
- functions.php in the folder files/
- plugin_h_downloads.php in the folder plugins/

If you have questions, I'm here to answer. If you want an example of a manialink working with the M2, go on kimi-prod (manialink under-construction).
Image
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 4 guests