As the developers of Open Journal Systems, Open Conference Systems, Open Harvester Systems, and Open Monograph Press, the PKP team are experts in helping journal managers and conference organizers make the most of their online publishing projects. PKP Publishing Services offers support for:

As a customer of PKP Publishing Services, you will not only receive direct, personalized support from the PKP Development Team, but will be contributing to the ongoing development of the PKP applications. All funds raised by PKP Publishing Services go directly toward enhancing our free, open source software. For more information, please contact us.

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

I would like to send a different CSS file depending on whether or not a user is logged in.

I see the template manager simply keeps and array of all of them in $styleSheets (and $stylesheets), which is iterated over in header.tpl.

What is the best place to build in a bit of logic? Is there a variable I can check (i.e. $userLoggedIn) in the Smarty template and do a hardcoded if/then include on a special CSS file in the TPL file, or should I modify the templateManager to add my special stylesheet if a user is logged in?

I want to do this because I've turned off a few items (display: none) in our journal customized CSS file, but want them on again when a user logs in.. In particular, I turned off the breadcrumbs, but need them for access to editorial/review/etc. pages when someone is logged in.

The classes/core/TemplateManager.inc.php file would be a logical place to add this, particularly in the same bit of code where the isUserLoggedIn variable is assigned (around line 85). I'd suggest using the $this->addStyleSheet(...) function, which is used elsewhere in TemplateManager.

I looked at the assignment location, but decided to assign after the 'issset($journal)', where the custom journal style sheet is picked up. Though now that I think about it, perhaps it would be better to put it outside that block so that it would be picked up when there are no journals and an administrative user is logged into OJS itself, and not necessarily associated with a site. Actually, I can imagine two of these files, one for OJS and another per site. I don't need anything that advanced at the moment.

A CSS file applied when a user is logged in makes it quick to do things such as change colours to remind people they are logged in (and need to log out), or change layout, etc.

Although perhaps these changes should be done in the generated HTML (i.e. not even sending the elements to the browser in the first place). Only purely cosmetic changes should be in the stylesheet obviously.

Is it worth me cleaning this up as plugin, or will the coming layout tools provide this type of functionality? (I pick up the file from the journal's public files section -- cutting and pasting the code from the existing stylesheet detection, so I could add a journal setting to check and avoid hardcoding a path, uploading, etc. etc.).

This would be a great candidate for a plugin. I've just added theming support to CVS, which will be released with OJS 2.2, and you can even include these sorts of customizations as parts of a theme. I don't think we're likely to ship support for per-user CSS files, because it's a bit too specific for the average user -- however, if you do clean it up as a plugin, we'd be happy to post it as a contributed plugin.