Jump to content

Recommended Posts

Posted (edited)

Hi All,

Ok, I managed to write a few elegant lines so that the user can select the skin. Write the following in your core/codon.config.php

$user_skin=$_GET['user_skin'];
if (isset($user_skin))
	SessionManager::Set('user_skin',$user_skin);
	
$user_skin=SessionManager::Get('user_skin');

if (!empty($user_skin))
	define('CURRENT_SKIN',$user_skin);
	
include CORE_PATH.DS.'bootstrap.inc.php'; // paste the above just before this line

Then, if you write www.yourairline.com/index.php?user_skin=crystal it will change the skin to crystal, or whatever you write there. Note that when the user just goes to the index.php, they get the default skin that you specified in the admin panel. You do not have to retain the ?user_skin= in the url: once it's set to the session, it will remain for the rest of the session! 

How could this be useful? 

1) if you are working on a new skin for your VA and you don't want others to see whats going on

2) if you created a new skin and want to give your pilots the opportunity to go back to the old one temporarily - maybe they discover some bugs for example

3) If you have multiple airlines on one site and you want a different design for each airline

4) For the very few who create their own skins and want to demonstrate them, all you need is a link to the new skin, and the whole page changes to that skin. 

Hope you enjoy!

Edited by mischka
fixed the issue

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...