Skip to content Skip to sidebar Skip to footer

How to Display DOI on the OJS Home Page 3

Have you ever visited a journal in OJS by seeing that some journals do not display DOI on the front page or on their OJS Table of contents, and those that display it.
How to Display DOI on the OJS Home Page 3

Of course if managers see things like that, they will certainly wonder why they differ from one journal to another on each case using the same version of the OJS, of course the answer lies with each journal manager.

This happens because the default OJS does not directly display the DOI on the front page, but this is one of the creativity of each journal manager or admin.

Therefore, if the journal management friends are happy and it is good to see it if the DOI performs as I mean above, then it must be made in advance in the OJS friends.

Ok, just go ahead if you want to see what it looks like, for example, you can click HERE before you install it. And for this method I use OJS 3.xxx using the theme "Manuscript (Default child theme)". The steps are as follows.
1. Make sure you have an account to access your cPanel or OJS hoting, if you don't have a cPanel account or don't understand about cPanel it's better to ask the admin for help.
2. The first step is to log in to cPanel using each account then enter the OJS folder -> Pages -> Issue and open the file called IssueHandler.inc.php then paste the following code in line 285:
        // to display DOI
        $ pubIdPlugins = PluginRegistry :: loadCategory ('pubIds', true);
        $ templateMgr-> assign ('pubIdPlugins', $ pubIdPlugins);
Like the following picture

3. Then save the file changes
4. The second step please open the OJS folder -> templates -> frontend -> objects then open the file called article_summary.tpl and paste the following code on line 69:
{foreach from = $ pubIdPlugins item = pubIdPlugin}
        {if $ issue-> getPublished ()}
        {assign var = pubId value = $ article-> getStoredPubId ($ pubIdPlugin-> getPubIdType ())}
            {else}
            {assign var = pubId value = $ pubIdPlugin-> getPubId ($ article)} {* Preview pubId *}
        {/ if}
        {if $ pubId}
            {assign var = "doiUrl" value = $ pubIdPlugin-> getResolvingURL ($ currentJournal-> getId (), $ pubId) | escape}
            <img src = "https://ia-education.com/journal/public/site/icon-doi.png"> {translate key = "plugins.pubIds.doi.readerDisplayName"}:
            <a href="{$doiUrl}">
            {$ doiUrl}
            <br> </a>
        {/ if}
{/ foreach}

Like the following picture

Keep in mind that the url "https://ia-education.com/journal/public/site/icon-doi.png" is the url of the DOI logo that will appear on the OJS page so the link can be changed according to the location of friends' logos owned by each.
5. When finished, please click "Save" or save it, if it is finished up to this stage it means you have successfully installed it, please try opening and refreshing it first in your respective browser.

Thus this article is about how to install DOI on the OJS page, hopefully it will be useful especially for OJS management friends and see you in the next OJS guide. Wassalam