Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: how would i use  (Read 2289 times)

0 Members and 1 Guest are viewing this topic.

bit bit spears

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 240
    • TangibleBrit.com
how would i use
« 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..
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: how would i use
« Reply #1 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.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

bit bit spears

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 240
    • TangibleBrit.com
Re: how would i use
« Reply #2 on: May 01, 2004, 08:30:39 pm »

ok, so would i change

Code: [Select]
// 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?

Code: [Select]
// 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']);
}
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: how would i use
« Reply #3 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
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.