Welcome to Geeklog, Anonymous Sunday, November 24 2024 @ 02:41 pm EST
Geeklog Forums
Change themes only avaliable to certain users?
Status: offline
timatlee
Forum User
Newbie
Registered: 06/06/04
Posts: 14
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
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
11
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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:
bye, Dirk
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
12
25
Quote
Status: offline
timatlee
Forum User
Newbie
Registered: 06/06/04
Posts: 14
Thanks, works like a charm!
Kinda did it backwards to what you suggested:
so that a regular user will not be able to select any other theme but the default.
Thanks for your help!
Kinda did it backwards to what you suggested:
Text Formatted Code
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!
10
11
Quote
All times are EST. The time is now 02:41 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content