Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 02:06 am EST
Geeklog Forums
Theme Swapper
Status: offline
Tony
Site Admin
Admin
Registered: 12/17/01
Posts: 405
Location:Urbandale, Iowa
If haven't noticed, we've added a handy little theme swapper inside of a block here. This is handy for testing or for giving your users an easier alternative to changing themes. Get the code for it here
The reason people blame things on previous generations is that there's only one other choice.
The reason people blame things on previous generations is that there's only one other choice.
18
17
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
It seems you forgot to mention that you also need a bit of code that goes into lib-common.php to makt this work:
if (!empty($usetheme) AND is_dir($_CONF['path_themes'] . $usetheme)) {
$_CONF['theme'] = $usetheme;
$_CONF['path_layout'] = $_CONF['path_themes'] . $_CONF['theme'] . '/';
$_CONF['layout_url'] = $_CONF['site_url'] . '/layout/' . $_CONF['theme'];
}
else if ($_CONF['allow_user_themes'] == 1) {
Only that last line (minus the "else") is already there ... Add this and then it will work.
bye, Dirk
14
15
Quote
Status: offline
squatty
Forum User
Full Member
Registered: 01/21/02
Posts: 269
Theme swapper appears to be ignoring my default theme ($_CONF['theme'] = 'clean'.
When I set the allow_user_themes = 1 and enable the theme swapper block, users are directed to the DotCom theme instead of the Clean theme?
Any ideas on what's going on?
Thnx!
In a world without walls and fences, who needs Windows and Gates?
In a world without walls and fences, who needs Windows and Gates?
18
15
Quote
Anonymous
Anonymous
can you specific, where there are put this codec? or how is install, this?
33
16
Quote
Status: offline
Tony
Site Admin
Admin
Registered: 12/17/01
Posts: 405
Location:Urbandale, Iowa
You put this in lib-common.php. It'll be at the top. You notice some of the existing code in the snippet above. If you can read PHP code, it should be really obvious.
The reason people blame things on previous generations is that there's only one other choice.
The reason people blame things on previous generations is that there's only one other choice.
16
20
Quote
Status: offline
saltlakejohn
Forum User
Newbie
Registered: 12/17/01
Posts: 9
Location:Utah, USA
1) take the code snippet from
http://www.geeklog.net/article.php?story=20020506133826910 and put it
into lib-common.php. All that code replaces the single line of code:
if ($_CONF['allow_user_themes'] == 1) {
(Watch out for the curly braces, don't get them wrong.)
2) Then take the cleaned up code from
http://www.geeklog.net/phpblocks/themetester.phps and put it into
lib-custom.php
3) Login as admin and make a php block for homeonly. Read there that
when you call a phpblock function that you do NOT use the parentheses.
----- John
-- John
-- John
16
18
Quote
All times are EST. The time is now 02:06 am.
- 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