TheBulk Posted July 6, 2010 Report Share Posted July 6, 2010 Hi all, Sorry if I put this in the wrong place. I wanted to know if it is possible to have a default skin for phpvms to load and then in each users profile section of the site under the profile options heading have a drop down box so they can select a skin and save it so that it becomes their fav skin and loads when ever they log in without affecting the skin other users see. An example of what I am trying to say is they user theme selection many forums use. Any thoughts on the idea would be great Cheers Jonny 1 Quote Link to comment Share on other sites More sharing options...
RogerB Posted July 6, 2010 Report Share Posted July 6, 2010 I inquired about this and was told it would be difficult. Quote Link to comment Share on other sites More sharing options...
TheBulk Posted July 7, 2010 Author Report Share Posted July 7, 2010 That's a shame because I think that would be a cool feature to have. Quote Link to comment Share on other sites More sharing options...
Tom Posted July 7, 2010 Report Share Posted July 7, 2010 Both simpilot and this Lorenzo fellow have done it.. I'm sure they could kindly share their wisdom? Quote Link to comment Share on other sites More sharing options...
monkeypaw201 Posted July 7, 2010 Report Share Posted July 7, 2010 Haha, I am most willing to share, The system I used doesn't work 100% because any core redirects reset the template, but I'll go ahead and share anyways; My Way: In /core/codon.config.php I added to the top (before anything, but within the PHP tags): if(isset($_GET['template']) && $_GET['template'] != '') { define('CURRENT_SKIN',$_GET['template']); } The Ideal Way: The Ideal way to do this for pilots would be to tweak that code to read a cookie that would have to be set elsewhere, but if you set it (Excellent Tutorial: http://www.w3schools.com/php/func_http_setcookie.asp) you could then call it with: $_COOKIE['template'] instead of $_GET['template'] If you guys want, I can try and play around with this and see if I can get an easy way to get this to work.. problem is when you update it'll get overwritten. Quote Link to comment Share on other sites More sharing options...
TheBulk Posted July 7, 2010 Author Report Share Posted July 7, 2010 Thanks for sharing it with us Lorenzo, I will try to integrate it to our site. Maybe we could develop it and get a fully working solution and then present it on here so that it might be adde into future releases of phpvms. I would love you to have a go at trying to create something Lorenzo if you are happy to do so. Thanks again Lorenzo and thanks Tom for your post. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 7, 2010 Moderators Report Share Posted July 7, 2010 We need cookies, and drop down menu for pilots to chose what skin. it shouldn't be too hard. Quote Link to comment Share on other sites More sharing options...
monkeypaw201 Posted July 7, 2010 Report Share Posted July 7, 2010 I'll see what I can cook up Quote Link to comment Share on other sites More sharing options...
TheBulk Posted July 7, 2010 Author Report Share Posted July 7, 2010 Thanks Lorenzo that would be great. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 7, 2010 Moderators Report Share Posted July 7, 2010 Yeah thanks! Quote Link to comment Share on other sites More sharing options...
monkeypaw201 Posted July 7, 2010 Report Share Posted July 7, 2010 Alrighty! I've got it, was actually easier than I thought: In /core/codeon.config.php add the following to the top (inside the PHP tags): session_start(); if(isset($_GET['template']) && $_GET['template'] != ''){ $_SESSION['template'] = $_GET['template']; define('CURRENT_SKIN',$_GET['template']); } if(isset($_SESSION['template']) && $_SESSION['template'] != '') { define('CURRENT_SKIN',$_SESSION['template']); } Now, the only thing YOU have to do is add a dropdown or links to change the skin. To change the skin, just link it to something like this: http://www.yourwebsite.com/?template=crystal -or- http://www.yourwebsite.com/index.php/schedules/?template=crystal Any page, just append ?template=TEMPLATEFOLDERNAME and it will set the skin. Note however that if someone tries to become a smartypants, and put in a skin that doesn't exist, they'll get a blank page. 3 Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 8, 2010 Moderators Report Share Posted July 8, 2010 i'll give this a try to see if this works. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 8, 2010 Moderators Report Share Posted July 8, 2010 I-T--W-O-R-K-E-D-!!!!!! Thanks! Now i have to create a drop down menu, type of thing. Quote Link to comment Share on other sites More sharing options...
monkeypaw201 Posted July 8, 2010 Report Share Posted July 8, 2010 Yeah, but that's not too difficult Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted July 8, 2010 Administrators Report Share Posted July 8, 2010 Nice Work Lorenzo! Nice to see you contributing to phpVMS Quote Link to comment Share on other sites More sharing options...
monkeypaw201 Posted July 8, 2010 Report Share Posted July 8, 2010 Thanks simpilot Quote Link to comment Share on other sites More sharing options...
TheBulk Posted July 8, 2010 Author Report Share Posted July 8, 2010 Thanks Lorenzo for working that out. I am really pleased that it has been worke out after being told at the beginning of this thread that it was not possible. Hopefully this idea could be integrate into future releases of phpvms Quote Link to comment Share on other sites More sharing options...
Artjom Posted August 31, 2010 Report Share Posted August 31, 2010 Nice work Thank you! Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 26, 2010 Administrators Report Share Posted October 26, 2010 I'd put that code in the local.config.php so it's not overwritten in updates, but cool Quote Link to comment Share on other sites More sharing options...
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.