forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: nickelas on June 22, 2011, 10:51:44 am
-
I want to use a different theme when the user has logged in.
I found this old link that describes how to change the theme if the user is on a wii (http://forum.coppermine-gallery.net/index.php/topic,41279.0.html)
So I guess you can check if (USER_ID) and then set $USER['theme']? Is it possible to do that in theme.php?
http://uppsalafoto.se/galleri/
-
Is it possible to do that in theme.php?
Might be possible, but then the theme will not change immediately after login, but one page load later. Don't forget the else block so the theme will be switched back to your default theme after logout.
-
Thanks,
I put the code in the section theme_html_picture
and it works, but only after visiting an intermediate page. So better to put it on the index-page since that is where you go after logging in. I tried it in theme_display_album_list
but then nothing happens. Any hint on what can go wrong?
if (USER_ID){
$USER['theme'] = 'customtheme';
}
-
I suggest to put it 'directly' into your theme.php file (i.e. in no function). I haven't tested that, but it should work.
-
Thanks, appears to be working