[SUGGEST&BUG] Title Pack Menu Offline

Moderators: w1lla, NADEO

User avatar
ReDiX
Posts: 162
Joined: 15 Jul 2011, 13:38
Location: OISE
Contact:

[SUGGEST&BUG] Title Pack Menu Offline

Post 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
TMPLUS !
Tipiizor
Posts: 560
Joined: 17 Aug 2011, 01:19

Re: [SUGGEST&BUG] Title Pack Menu Offline

Post by Tipiizor »

Indeed, can be very useful ;)
OS: Windows 7 Ultimate x64
CPU: QuadCore Intel Core i5-2500K@3.4GHz
RAM: 2x G Skill F3-12800CL9-4GBXL
GPU: Geforce GTX 970 EXOC
Motherboard: Asus P8P67-M
HDD(s): Sandisk ultra Pro II (240 Go) / WDC WD10EACS-14ZJB0 (931 Go)
Sound: Realtek ALC887
User avatar
meuh21
Posts: 1266
Joined: 15 Jun 2010, 17:00
Location: Dans mon champ...
Contact:

Re: [SUGGEST&BUG] Title Pack Menu Offline

Post 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>
User avatar
ReDiX
Posts: 162
Joined: 15 Jul 2011, 13:38
Location: OISE
Contact:

Re: [SUGGEST&BUG] Title Pack Menu Offline

Post by ReDiX »

But in my title pack i have PHP & MySQL.
I can't do this !
TMPLUS !
User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: [SUGGEST&BUG] Title Pack Menu Offline

Post 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.
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
mangastef
Posts: 704
Joined: 15 Jun 2010, 22:46
Location: Chez moi
Contact:

Re: [SUGGEST&BUG] Title Pack Menu Offline

Post by mangastef »

Tipiizor wrote:Indeed, can be very useful ;)
+1 :D
ImageImage
Image
User avatar
ReDiX
Posts: 162
Joined: 15 Jul 2011, 13:38
Location: OISE
Contact:

Re: [SUGGEST&BUG] Title Pack Menu Offline

Post 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.
TMPLUS !
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: [SUGGEST&BUG] Title Pack Menu Offline

Post 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
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    User avatar
    ReDiX
    Posts: 162
    Joined: 15 Jul 2011, 13:38
    Location: OISE
    Contact:

    Re: [SUGGEST&BUG] Title Pack Menu Offline

    Post 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 ? :D
    TMPLUS !
    User avatar
    spaii
    Posts: 1075
    Joined: 19 Jun 2010, 00:04
    Location: Rémy - France
    Contact:

    Re: [SUGGEST&BUG] Title Pack Menu Offline

    Post 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>
    Post Reply

    Return to “Maniaplanet Reports”

    Who is online

    Users browsing this forum: No registered users and 1 guest