BreakingLight Posted April 3, 2009 Posted April 3, 2009 Well its really simple this is why it is free.I know each year i come out with a new design for my game.Well using this this allows you to let your users select what they want their theme to be.Basically all about making the users happy. (I know this is not the easiest way to do it, but hey it works so i really dont care) First add this to your MySQL database alter table users add`header` varchar(255) NOT NULL default 'header.php' Now go open Your Preferences and add the fallowing You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then int he same file add this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. NOTE:To add a new header edit this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Just rename the value to match what header file you want it to correspond to. Now this part is the most time consuming(like i said im sure there is an easy way but i had to redo all my files to add a security fix to it so i weant ahead and did this. In each file you have this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Change to this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now you have a working Theme Selector Quote
DELETE ME NOW! Posted April 3, 2009 Posted April 3, 2009 Re: [mccodes] Simple Theme Selector Yeah nice but you might want to add in array :P $headers = array("header.php", "header1.php", "header2.php"); if(!in_array($_POST['header'], $headers)) { echo 'Invalid Header!'; $h->endpage(); exit; } Also no need for the .php with the bit u added here You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You can do You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. :p Quote
mrmaxey Posted April 4, 2009 Posted April 4, 2009 Re: [mccodes] Simple Theme Selector Also no need for the .php with the bit u added here You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You can do You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. spelling error :P You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
DELETE ME NOW! Posted April 4, 2009 Posted April 4, 2009 Re: [mccodes] Simple Theme Selector Wo0o0ops lol Quote
Dave Posted April 4, 2009 Posted April 4, 2009 Re: [mccodes] Simple Theme Selector So you've gotta change every file in your game (Preety much) if you wanna use this? Thats kinda why i like V2 more then V1 and LITE. Quote
BreakingLight Posted April 4, 2009 Author Posted April 4, 2009 Re: [mccodes] Simple Theme Selector Yeah v2 would be better for this as you only have one file to edit. Quote
DELETE ME NOW! Posted April 5, 2009 Posted April 5, 2009 Re: [mccodes] Simple Theme Selector Yeah it would, but you can just with [v1]elite and [v1], you can just edit the files and do it like v2.. then just include page like include_once("general_page.php"); :P Quote
MyGunWars Posted April 9, 2009 Posted April 9, 2009 Re: [mccodes] Simple Theme Selector Where Do I Add This If I Have V2? You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
redsnake420 Posted April 9, 2009 Posted April 9, 2009 Re: [mccodes] Simple Theme Selector this is not for v2 its for v1 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.