I'm looking to have different themes for registered users and guests (non-registered users). My Coppermine is integrated with phpBB and uses that memberlist and usergroups, I've removed the facility for guests to register.
I want guests to come from a another site I have and only have limited viewing and a different banner graphic.
I've tried using this in include/init.inc.php:
http://forum.coppermine-gallery.net/index.php?topic=8449.0
if (USER_ID) {
$theme='subsilver';
require "themes/subsilver/theme.php";
$THEME_DIR = "themes/subsilver/";
} else {
if (!file_exists("themes/{$CONFIG['theme']}/theme.php")) $CONFIG['theme'] = 'guests';
require "themes/{$CONFIG['theme']}/theme.php";
$THEME_DIR = "themes/{$CONFIG['theme']}/";
// Process language selection if present in URI or in user profile or try
// autodetection if default charset is utf-8
if (!empty($HTTP_GET_VARS['lang'])) {
$USER['lang'] = $HTTP_GET_VARS['lang'];
}
}
I've created a new theme called guests, which is a copy of subsilver but with a different banner graphic and the links don't go back to index.php but to my user gallery. The files amended are theme.php and template.html.
Any help would be appreciated, thanks, Alf.
I think I have it working now.
if (USER_ID) {
$theme='subsilver';
require "themes/subsilver/theme.php";
$THEME_DIR = "themes/subsilver/";
} else {
$theme='guests';
require "themes/guests/theme.php";
$THEME_DIR = "themes/guests/";
// Process language selection if present in URI or in user profile or try
// autodetection if default charset is utf-8
if (!empty($HTTP_GET_VARS['lang'])) {
$USER['lang'] = $HTTP_GET_VARS['lang'];
}
}
Cheers, Alf.