Hi i was just on your online demo and saw Switch template.
I would like to know how to do it for index.html,i think be a cool feature to have for users.
![]()
Hi i was just on your online demo and saw Switch template.
I would like to know how to do it for index.html,i think be a cool feature to have for users.
![]()
The way it's done is not a good way to do it, plus it doesn't work for all browsers. There is no code available so you would need to figure out how it's done, I have ideas as to how it can be done, but have no code for it.
I jsut did a quick test, seems its pretty simple to do with a little hack to application.php - this is in no way a workign example, just a concept that seems to work. You need to make a template switcher that sets a cookie, and then change the code here to a cookie checking code. I did this quick-and-dirty to see if it worked.
If your interested in this, i could probably write an article on my site, but its going to be a few weeks i got tons of stuff lined up now!
Okay so check it out :
http://indexu.co.uk/demoSVN/index.php?usertheme=momo
and
http://indexu.co.uk/demoSVN/index.php?usertheme=kosmos
notice i can overwrite the default theme easily. In application.php the code i have is :
and thats it ... i would need to replace the application.php code to check for a cookie instead ( $_COOKIE['usertheme'] instead of $_REQUEST ) and i would need to build a theme changer that set the cookieCode://theme checker. $usertheme = $_REQUEST['usertheme']; if ($usertheme !='') { $active_theme = $usertheme; } else { $active_theme = 'kosmos'; } // end theme checker.
I havent had time to see whats messed up with the momo theme, i jsut dont think its completed... i havent uploaded any other alternative themes so i jsut used that as it was already available
okay hope that sparks some ideas.
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
okay, probably need to add the cookie checking code in a couple more php files, but doesnt look too difficult.. dont have time to check further though.
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
OK il give this thread sometime since i am a total noob in this lol.
Il just keep checking every so often.
But thanks to look into it.![]()
Well, I dont think this will be useful for most users.
But if you're selling templates, then this is a must have mods.
I have this kind of mods, but it is not free mods.
I'm not sure that if mods will for work all browsers, but I have test it on IE, FF, Opera and no problem so far.
Let me know if you interested.