Admin Login Screen Style Change

If I wanted to make the admin login screen match the general theme and style of the rest of our public site, what files would I need to update or change? It looks like it uses a default.css file, which is different from the screen.css file that applies to the public site. Can I copy some of these files to a folder in my theme?
Thanks.

The login screen is part of the admin interface, so you can't alter it with files in your public theme.

The admin theme lives in admin/themes/default, and has the same basic structure as the public theme, which should make it easy for you to find the CSS and PHP views you're looking for.

While there's nothing in the interface that does this, you can make a copy of that whole "default" directory under a different name, and change the "admin_theme" option in the options table (so you don't have to modify the stock admin theme in place).

Thanks for pointing me in the right direction. Just to clarify, I'd copy the default directory to admin/themes/, and then change the admin_theme in the options table to my copied and edited folder. How do you access this table? This sounds like something I'll have to contact our server administrator about.

Additionally I want to add some extra text to the login screen. Currently I've edited the login.php file found in omeka/application/views/scripts/users. I am usually hesitant to edit files outside of my theme (for upgrading purposes), but this seems to be the only way to make these changes.

If you are using a hosting service like Bluehost or Dreamhost, the cPanel administrative screen usually has a link to something called phpMyAdmin. From that, you can directly edit the tables. If you are not working from a hosting company, yeah, you'll likely need to talk to your friendly neighborhood server admin.

On the login screens, there are two slightly different directions at work, since there is also a (little-known or used) public login screen. The usual one, which directs you to the admin dashboard, has a URL path like http://yoursite.org/admin/users/login . To alter that, you would need to do as John suggests above.

However, the file you mention at omeka/application/views/scripts/users is a default public screen at http://yoursite.org/users/login, and can be more easily overridden in your theme. You would just create a 'users' folder in your theme, copy login.php from omeka/application/views/scripts/users into that folder and edit away.

The drawback there is that when someone logs in on that public login page, they are redirected back to the front public page, not the backend dashboard.

Awesome. I think the public login screen is what I'm looking for. I've been working with Omeka for a while now, and I had no idea about that feature. Very cool.
Thanks,
Andy

I’ve got the public login page on my site, customized to my theme. I’ve added a link to the header of my site to this login page (And if you’re logged in, the link switches to a log out link). However, when you sign in, it takes you back to the site’s home page. I’d like it to go back to whatever page a user was looking at, before they decided to log in. So for example, if a user is looking at http://mysite.org/items/show/1000, and then decides to log in, I want them to return to this page after logging in. I noticed that if you type in https:/mysite.org/omeka/admin/items/show/1000, you get redirected to the admin log in, and then when you log in, it goes to this item’s admin record. So it seems like this should be possible.

A follow up to my last post. We are trying to reroute from the error message for items that are private to the login screen. Currently I’ve changed the text of the error message to:

“Sorry, either this page doesn't exist, or you must Login (linked to our login page) to view it.”

However, it would be great if it would automatically go to the login screen for private items, when a user is logged out. And then after the user has logged in, they would be brought to the private item they were trying to view.

After reading this post I now understand the logic of not having private items display a 403 error. However, that would make this functionality easier to implement, since I could replace the 403.php file with one that automatically goes to our login screen.

Since you get a 404 error regardless of whether the item exists (omeka/items/show/193 and omeka/ioshjasgdlkjsdljkgssljkasgslj both would generate a 404 error) I was wondering if there would be a way to check if a user is not logged in, and if the item exists but is private in the 404.php file. I think I figured out how to check if the user is not logged in, but I’m not sure how to check if an item is private. Something like:

<?php
if (is_null(current_user())){
if item is private {
Somehow redirect to login page;
}
}
else{
echo "<h2>Oops!</h2>	<p>Sorry, this page doesn't exist.</p>"
}
?>

Also I’m not sure if there is a way to redirect to the login page using header() in the 404.php file.

There might be a better way at this, but my first stab would be to dig up the Request object, and use the info there to query the state of the item:

$request = Zend_Controller_Front::getInstance()->getRequest();

$controller = $request->getParam('controller');
//check if it is the 'items' controller
$action = $request->getParam('action');
//in case you need to branch around whether someone is trying to get to a 'show' or 'browse' page
$id = $request->getParam('id');
//query database for that Item id, and see if it is public
//redirect if not

I'm even fuzzier about the redirect, but it looks like the way to get the redirect going is to add it to a Zend_Session. Here's what's in the UserController::loginAction()

$session = new Zend_Session_Namespace;
        if ($session->redirect) {
            $this->redirect->gotoUrl($session->redirect);
        } else {
            $this->redirect->gotoUrl('/');
        }

I'm not sure where that session redirect property gets set, though. But I think that's the right track.

HTH

Thanks for the post, I'll see what I can figure out.