I found another one

When i start to develop title pack OpenLink in maniascript doesn't exist.
I think it's much simpler.
1. Include this custom menu xml file (for example home.xml in Media\Manialinks folder) in your title pack.
This call a php page with the client version of title pack.
You have to change the version variable each time you update the title pack.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<manialink id="home" background=0 version=1>
<timeout>0</timeout>
<type>default</type>
<frame id="generalFrame" posn="0 0 0">
</frame>
<script><!--
main () {
yield;
OpenLink("http://www.yoururl.zzz/menu.php?version=2013.03.25", ::LinkType::Goto);
}
--></script>
</manialink>
2. in menu.php script
Code: Select all
$currentVersion = "2013.03.29";
$clientVersion = $_GET['version'];
if ($currentVersion != $clientVersion)
{
// Manialink to propose title pack update
}
else
[
// Display title pack menu
}
I hope this help you
Edit : you can also use this one :
Code: Select all
OpenLink("http://xxx.yoururl.zz/?enviro=" ^ LoadedTitle.BaseTitleId ^ "&login=" ^ LocalUser.Login ^ "&version=whatyouwant", ::LinkType::Goto);
To have user login and title pack environement.
Then when you work on your php script you can do :
Code: Select all
if ($_GET['login'] == 'spaii')
{
// Work on new features in title pack menu
}