Posted on: 02/11/06 02:56pm
By: timatlee
Hello
Not sure that this can be done with a plug-in, but I'm not really certain either ..
I'm trying to make the theme changing ability avaliable only to certain users (say of a certain group). I'm trying to develop a theme, but don't want to murder my entire site while I'm working on it!
Any thoughts on how I could approach this? It's a short-term thing while I work on the theme, and would even be OK with with forcing a certain user ID or group members to HAVE to use the development theme, and not having a choice ...
Any help or direction would be great
Change themes only avaliable to certain users?
Posted on: 02/11/06 03:13pm
By: Dirk
You could hack it into the theme selector in usersettings.php.
Search for 'allow_user_themes' there. It loops over the directories in the layout directory. Simply hard-code a test for your new theme's name and only add it to the list if the user is in a certain group:
if (SEC_inGroup ('Theme Testers')) { ...
bye, Dirk
Change themes only avaliable to certain users?
Posted on: 02/11/06 03:57pm
By: timatlee
Thanks, works like a charm!
Kinda did it backwards to what you suggested:
if ($theme == $_CONF['theme'] || SEC_inGroup('Theme Testers')) {
so that a regular user will not be able to select any other theme but the default.
Thanks for your help!