[OJS 3.1.1.-4] Journal accessible but not visible in overview

Hi
I want one of our journals to be accessible but not visible in the overview. I see no way to do it. When the journal is not visible it requires login credentials. OJS 3.1.1.-4 . That was possible in Version 2 as far I remember. Thanks.

As Site Administrator, you can uncheck "Enable this journal to appear publicly on the site " when you go to the Hosted Journals grid and select ā€œEditā€ below the journal in question.

Cheers,
Jason

Thatā€™s not my question. The problem is that the frontend of the journal is not visible for readers without having logged in first. ALT Proceedings Thanks.

Hi @trace:

There are options about that issue in main menu User & Roles ā†’ Site Access Option. Attached screenshoot.

30

Check and try change the options and tell us.

Regards,
Diego

2 Likes

Hi Diego
Thatā€™s how the settings there look like on my side. No effect. But just to repeat. I donā€™t want the journal in the overview. So, itā€™s disabled, see screenshot. But I want the journal to be readable without any login. Thanks.

2020-01-15_10-43-47

H @trace

I think I understand the problem now. If memory serves, what that checkbox on the site administration does (enable this journal to appear publicly on the site) is toggle the ā€œenabledā€ flag for the journal. If a journal is disabled, you need to be logged in to see it. It could perhaps be better named.

I think what you want to do will require a customization to the templates/frontend/pages/indexSite.tpl template in which you test if the journal in question is about to be output, and then just add a {continue} or {php}continue;{/php} depending on the OJS version. For 3.1.2 it would be the former.

Cheers,
Jason

And to confirm, the bit of code that does the test and performs the redirect to the login page is in lib/pkp/clases/core/PKPPageRouter.inc.php.

$currentContext = $request->getContext();
if ($currentContext && !$currentContext->getEnabled() && !is_a($user, 'User')) {
     if ($page != 'login') $request->redirect(null, 'login');
}

Hi @trace and @jnugent:

I agree with @jnugent. You have to modify the journal list on template for not show that journal.

For future migration purpose, is better modify the journalā€™s portal theme instead of main code.

Regards,
Diego

Thank you all. Iā€™ll try this approach the next days.

Hi @jnugent and @madileweb
To comment out the last three rows of the code Jason noted has the effect I was looking for. See below.
To implement this in a theme index sounds plausible to me but is over my php skills.
Regards
Jan

$currentContext = $request->getContext();
// if ($currentContext && !$currentContext->getEnabled() && !is_a($user, ā€˜Userā€™)) {
// if ($page != ā€˜loginā€™) $request->redirect(null, ā€˜loginā€™);
// }

1 Like