Page 1 of 2
[SUGGEST&BUG] Title Pack Menu Offline
Posted: 11 Dec 2014, 10:16
by ReDiX
Hi all,
I have a suggest for NADEO STAFF.
On the "ManiaPlanetTitle.xml" we can found this :
Code: Select all
<menu>
...
<manialink url="http://aurelien-froment.fr/TMPLUS/menu/index.php"/>
</menu>
It's a good idea for personalize the home of title pack but when the player have not internet access, he can't access to the menu (and go to the profile, locale, solo etc...)
Can you make a rule when a player is offline, the default menu is activated ?
Regards,
ReDiX
Re: [SUGGEST&BUG] Title Pack Menu Offline
Posted: 11 Dec 2014, 10:53
by Tipiizor
Indeed, can be very useful

Re: [SUGGEST&BUG] Title Pack Menu Offline
Posted: 11 Dec 2014, 11:40
by meuh21
In Raid² my menu will be offline :
Code: Select all
<menu>
(...)
<manialink url="file://Media/Manialinks/MenuRaid2.xml"/>
</menu>
(...)
<files>
<file name="Media\Manialinks\MenuRaid2.xml" public="false" internal="false"/>
</files>
Re: [SUGGEST&BUG] Title Pack Menu Offline
Posted: 11 Dec 2014, 11:47
by ReDiX
But in my title pack i have PHP & MySQL.
I can't do this !
Re: [SUGGEST&BUG] Title Pack Menu Offline
Posted: 11 Dec 2014, 11:59
by w1lla
Why not cache it? Write the data of php/mysql in .xml or any other format. Then capture it. That way its always possible to gather stuff when internet connection is gone.
Re: [SUGGEST&BUG] Title Pack Menu Offline
Posted: 11 Dec 2014, 15:01
by mangastef
Tipiizor wrote:Indeed, can be very useful

+1

Re: [SUGGEST&BUG] Title Pack Menu Offline
Posted: 11 Dec 2014, 16:58
by ReDiX
w1lla wrote:Why not cache it? Write the data of php/mysql in .xml or any other format. Then capture it. That way its always possible to gather stuff when internet connection is gone.
I can give only one link of the manialink (Local or Internet).
So, if i do a cache of the php page i cannot order at the system to load the local page instead of internet page.
And i think i cannot exec php script in a local page.
Re: [SUGGEST&BUG] Title Pack Menu Offline
Posted: 11 Dec 2014, 18:22
by steeffeen
i used to define a local script that tries to load a web resource, if successful it redirects to the actual manialink and if unsuccessful it shows an offline backup version
Re: [SUGGEST&BUG] Title Pack Menu Offline
Posted: 11 Dec 2014, 18:33
by ReDiX
steeffeen wrote:i used to define a local script that tries to load a web resource, if successful it redirects to the actual manialink and if unsuccessful it shows an offline backup version
How ?

Re: [SUGGEST&BUG] Title Pack Menu Offline
Posted: 11 Dec 2014, 18:42
by spaii
Simple example :
replace "
http://www.sitetoping.org" and "MyManiaLink" to your need
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<manialink background="stars" version="1">
<timeout>0</timeout>
<type>default</type>
<frame id="MenuFrame" posn="0 -15 0" hidden="1">
<quad posn="0 45 -1" sizen="55 35" halign="center" valign="center" bgcolor="000b" />
<quad id="Logo" posn="0 45" sizen="448 191" valign="center" halign="center" style="TitleLogos" substyle="Title" scale="0.15" />
<quad posn="0 0 -1" sizen="55 40" halign="center" valign="center" bgcolor="000b" />
<quad posn="0 24 -1" sizen="55 8" halign="center" valign="center" bgcolor="0006" />
<label posn="0 24" sizen="53" textprefix="$i$ffa" text="You are not connected." halign="center" valign="center2" translate="1" />
<label posn="0 11" text="Editors" halign="center" valign="center" translate="1" style="CardButtonMedium" action="menu_editors" />
<label posn="0 0" text="Local Play" halign="center" valign="center" translate="1" style="CardButtonMedium" action="menu_local" />
<label posn="0 -11" text="Quit" halign="center" valign="center" translate="1" style="CardButtonMedium" action="quit" />
</frame>
<script><!--
main () {
declare RequestTimeOut = Now + 15000;
declare req = Http.CreateGet("http://www.sitetoping.org", False);
while(!req.IsCompleted)
{
if (Now > RequestTimeOut) break;
yield;
}
if(req.IsCompleted && req.StatusCode == 200) OpenLink("MyManiaLink", ::LinkType::Goto);
else Page.GetFirstChild("MenuFrame").Show();
}
--></script>
</manialink>