mischka Posted October 17, 2017 Report Posted October 17, 2017 (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 October 19, 2017 by mischka fixed the issue Quote
Capri Posted October 17, 2017 Report Posted October 17, 2017 the skin is controlled via the database. Quote
mischka Posted October 19, 2017 Author Report Posted October 19, 2017 yes, I know.. in the meantime I figured it out, the solution is in the opening post check also http://www.virtualairlines.eu/index.php/Blog for more phpvms snippets Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.