Page 1 of 1

[solved] Admin Login

Posted: Sun Jun 08, 2008 11:59 am
by Simon66
Hi Guys,
I'm using v.1.3 and I have uploaded a few admin templates to check them out. But if I log out of them I always have to log back in via the 'default' template login.

I checked out /admin/login.php and /admin/loginstyle.php and found both used the variable $theme (that is created by $theme=get_site_preference('logintheme', 'default'); in /admin/login.php).

I'm guessing the $theme variable is probably empty because it defaults to 'default' (bottom line).

Code: Select all

if (file_exists(dirname(__FILE__)."/themes/$theme/login.php")) {
	include(dirname(__FILE__)."/themes/Infusion/login.php");
} else {
	include(dirname(__FILE__)."/themes/default/login.php");
}
I can swap that 'default' for the name of another admin template and it works fine, but with my limited hunt-n-peck coding knowledge, the trail ran dry here and I can't figure out why the $theme variable would be empty!

Any Ideas?
Simon66

PS Still the best CMS there is, great work, everyone involved should be very proud of it.

Re: Admin Login

Posted: Sun Jun 08, 2008 2:22 pm
by calguy1000
Set the default admin theme in the global settings, that's what controls where the login panel comes from.

Re: Admin Login

Posted: Sun Jun 08, 2008 11:12 pm
by Simon66
Thanks very much. Maybe if I stopped tinkering around in the code and just figured out how to use CMSMS properly I could save myself a lot of time!

Simon66

Thanks again for your time.