[solved] Admin Login

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Simon66
Power Poster
Power Poster
Posts: 250
Joined: Wed Aug 29, 2007 4:36 am

[solved] Admin Login

Post 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.
Last edited by Simon66 on Mon Jun 09, 2008 12:28 pm, edited 1 time in total.
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

This must be Thursday. I never could get the hang of Thursdays.

Douglas Adams - The only sane person in the asylum.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Admin Login

Post by calguy1000 »

Set the default admin theme in the global settings, that's what controls where the login panel comes from.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Simon66
Power Poster
Power Poster
Posts: 250
Joined: Wed Aug 29, 2007 4:36 am

Re: Admin Login

Post 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.
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

This must be Thursday. I never could get the hang of Thursdays.

Douglas Adams - The only sane person in the asylum.
Post Reply

Return to “CMSMS Core”