coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: bit bit spears on May 01, 2004, 07:16:00 PM

Title: how would i use
Post by: bit bit spears on May 01, 2004, 07:16:00 PM
how would i use "if user is not logged in" to then use a different theme?

This is because i have certain navigation for thumbnail and album display if a user is not logged in..
Title: Re: how would i use
Post by: Casper on May 01, 2004, 07:26:51 PM
Have a look at this thread. http://forum.coppermine-gallery.net/index.php?topic=5473.0

It's not exactly what you're asking, but may work for what you want.
Title: Re: how would i use
Post by: bit bit spears on May 01, 2004, 08:30:39 PM
ok, so would i change

// Process theme selection if present in URI or in user profile
if (!empty($HTTP_GET_VARS['theme'])) {
   $USER['theme'] = $HTTP_GET_VARS['theme'];
}
// Load theme file
if (isset($USER['theme']) && !strstr($USER['theme'], '/') && is_dir('themes/' . $USER['theme'])) {
   $CONFIG['theme'] = strtr($USER['theme'], '$/\\:*?"\'<>|`', '____________');
} else {
   unset($USER['theme']);
}


to something like this?

// Process theme selection if present in URI or in user profile
if if (USER_ID){
   $USER['theme'] = $HTTP_GET_VARS['theme'];
}
// Load theme file
if (isset($USER['theme']) && !strstr($USER['theme'], '/') && is_dir('themes/' . $USER['theme'])) {
   $CONFIG['theme'] = strtr($USER['theme'], '$/\\:*?"\'<>|`', '____________');
} else {
   unset($USER['theme']);
}
Title: Re: how would i use
Post by: Casper on May 01, 2004, 08:43:08 PM
Don't know if it would work, but why not try.

You could also look at this thread I remembered, which does it for different albums, so may work for the 'IF (USER_ID)'.
http://forum.coppermine-gallery.net/index.php?topic=3138.msg15653