Manialink Convertor : 4:3/16:9
â–º Presentation
As you know, with Maniaplanet, Manialinks sizes are possible in 16:9 now. The 16:9 is the most format used for Computers now, and will become the most use in Manialinks.
For those who decided to do a new manialink on TrackMania², no matter for them, they'll pass in 16:9 at the start. But for those who had already a manialink on United in 4:3 and wanted to put it in 16:9, there are a lot of solutions.
The first one, change by hand X and Y values in attributes posn and sizen of each xml tag

Good luck

I did at the beginning, and i stopped quickly, too long, so I created a script to do it in my place (Coder's laziness

).
I put all of this on a web hosted on my FTP, here's the link :
http://www.boss-bravo.fr/scripts/Maniap ... alinks.php
Be careful, the web design is completely in CSS3, all the users on Internet Explorer won't be able to read the page properly, even with the last update.
â–º Website utilisation Tutorial
In order to use the page, you have to respecte some rules.
[/color]
You have to insert your code on this box. As well, not all and anything, the script rox, ok (:mrgreen:), but the target is to run it not tu bug it !

(Even if it's rare).
- In your text editor, Open the file to convert in 16:9
- Put the codage in UTF-8 (in order to fix compatibily problems)
- copy your code, but not anything, the code with less php script as possible, you can do it in several times, no matter. Here are some examples :
Code: Select all
<?php $go_count_messages = mysql_query("SELECT COUNT(*) AS nb FROM maniaplanet_boss_chat_object WHERE object='post_box_tm2_" . $type_chat . "' AND id_object='" . $id_object_chat . "'");
$count_messages = mysql_fetch_array($go_count_messages);
if ($count_messages) { $success16='Counting_Posts_box'; } else { $error_code=20; $error_message='Le comptage des messages a echoue'; }
$scroll=0; $go_messages = mysql_query("SELECT * FROM maniaplanet_boss_chat_object WHERE object='post_box_tm2_" . $type_chat . "' AND id_object='" . $id_object_chat . "' ORDER BY id DESC LIMIT " . $start_ent . "," . $lignes_chat . "");
if ($go_messages) { $success17='Reading_Box_Posts'; } else { $error_code=21; $error_message='La lecture des messages a echoue'; }
while ($messages=mysql_fetch_array($go_messages)) {
$message1=str_replace(':)', 'ï½¼', $messages['value']);
$message2=str_replace(':D', 'ツ', $message1);
$message3=str_replace('=D', 'ツ', $message2);
$message4=str_replace('=)', 'ï½¼', $message3);
$message5=str_replace(':p', ':Þ', $message4);
$message6=str_replace(':P', ':Þ', $message5);?>
- It's useless to put this code, only PHP and no XML, nothing to change. The script won't convert it anyway.
INCORRECT CODE
Code: Select all
<quad style="Icons128x128_1" substyle="Vehicles" posn="0 41.25 5.000" sizen="25 18.75" align="center" valign="center"/>
<quad style="Bgs1InRace" substyle="NavButtonBlink" posn="100 -19.6875 5.000" sizen="102.5 105" halign="center" valign="center"/>
<quad style="Bgs1InRace" substyle="NavButtonBlink" posn="26.875 15.9375 5.000" sizen="42.5 15" halign="center" valign="center"/>
<quad style="BgRaceScore2" substyle="ScoreLink" posn="3.75 20.15625 6.000" sizen="12.5 9.375" align="center" valign="center"/>
<quad style="Bgs1InRace" substyle="NavButtonBlink" posn="26.875 -7.03125 5.000" sizen="42.5 27.1875" halign="center" valign="center"/>
<quad style="Icons128x128_1" substyle="ChallengeAuthor" posn="3.75 3.75 6.000" sizen="12.5 9.375" align="center" valign="center"/>
<quad style="Bgs1InRace" substyle="NavButtonBlink" posn="26.875 -30.46875 5.000" sizen="42.5 15" halign="center" valign="center"/>
<quad style="Icons128x128_1" substyle="United" posn="4.375 -25.3125 6.000" sizen="11.25 8.4375" align="center" valign="center"/>
<quad style="Bgs1InRace" substyle="NavButtonBlink" posn="26.875 -48.28125 5.000" sizen="42.5 15" halign="center" valign="center"/>
<quad style="Icons128x128_1" substyle="Coppers" posn="4.375 -43.125 6.000" sizen="12.5 9.375" align="center" valign="center"/>
<quad style="Bgs1InRace" substyle="NavButtonBlink" posn="26.875 -64.6875 5.000" sizen="42.5 15" halign="center" valign="center"/>
<quad image="<?php echo $absolute ;?>Images/stripe.png" sizen="50 1.875" posn="31.25 35.625 5.000" halign="center" valign="center"/>
<quad image="<?php echo $absolute ;?>Images/stripe.png" sizen="37.5 1.875" posn="25 25.3125 5.000" halign="center" valign="center"/>
<quad image="<?php echo $absolute ;?>Images/pouce_vert.png" posn="4.375 -60 6.000" sizen="8.75 6.5625" align="center" valign="center"/>
- Here, the script will modify, and return it to 16:9 format (in that case, I'm already in 16:9
) There has, with the echo $absolute but the script will see it and ignore it. The PHP will be there after the convertion.
CODE ACCEPTABLE
Code: Select all
<label posn="-27.5 <? echo -8+2.25*$scroll;?> 2" sizen="15 2" textsize="2" style="TextButtonSmall" text="<? echo $messages['nickname'];?>$z$o$fff :" halign="left" valign="center"/>
<label posn="-10 <? echo -8+2.25*$scroll;?> 2" textsize="2" sizen="36 2" text="<? echo $message6;?>" halign="left" valign="center"/>
- Here, the script will detect XML, but it will see in the posn, there's no just numbers, but also PHP code, It will adapt and get numbers inside the PHP code and convert it in 16:9.
CODE ACCEPTABLE
Here are the commons example.
- After this done, you can clik on the button submit, the script will load a bit, et resend you the same page.
- Scroll down a little, and look at the box under, you'll see this :

As well it's full, but all the code you put will be in this box and convert in 16:9. You can Copy/paste in your script at the same place of the old one.
[/color]
- If you scroll down on the page, you'll see an other tool :

- Here you'll be able to enter manually the coordonates X and Y of a attribute, you'll also be able to put an X value, or the Y value, it depends of what you want.
- After clik on transform, the page will load and you'll have your X and Y values converted in 16:9 on Results box.
â–º Recommandations
So this is the end of the tuto, but some recommandations
- Recall : for put your manialink in 16:9, you'll have to put the attribute "version" in your manialink tag. And put 1 between quotations marks for 16:9 or 0 for 4:3.
Example for 16:9 :
- If you have a bug (it can happen, none script is perfect
) please contact me on the section contact of my website ( http://www.boss-bravo.fr/contact ), and give me the code you tried, if possible the error and the date that it appeared.
As well if it's possible, it will help, because logs files are created during the utilisation of this page, i'll be able to find the problem faster. Thanks 
- I'm not responsible of your errors, conserve a copy of your script, I recommand you to make to folders, one for 4:3 manialink, and the other for 16:9, so if there is a bug, you have your old script.
If you have question, Ask me !
All donations is warmly welcome by Bo$$ Bravo ! login : boss-bravo
Translation : Kimi, thanks to him 