Customizing "How to cite" in article view

Is there a way to hide some of the formats as we do not need all of them, I have checked in the plugin area but all format seems pre-checked and cannot be unchecked as they are gray (enabled permanently).

Hi @vebaev,

Those plugins can’t be disabled – but you can remove them entirely from their subdirectories in plugins/citationFormats.

Alec Smecher
Public Knowledge Project Team

And how to make the APA one that is shown there by default?

I have the same question. Some of those formats are not used anymore (like Refman and Procite). Some should go first. Some might be added by users.

Hi all,

To order the citation formats, you’ll need a small code change. See pages/article/ in the view function:

// Citation formats
$citationPlugins = PluginRegistry::loadCategory('citationFormats');
uasort($citationPlugins, create_function('$a, $b', 'return strcmp($a->getDisplayName(), $b->getDisplayName());'));
$templateMgr->assign('citationPlugins', $citationPlugins);

Those three lines of code load the plugins, sort the alphabetically, then assign them to the template. To change the order, you’ll need to alter the behavior of the second line, which currently uses uasort to sort alphabetically.

Alec Smecher
Public Knowledge Project Team

1 Like


Is there a way to change the citation format of the article shown under the “How to cite”?

The default format may not meet every journal’s needs.



@asmecher, is it possible to change which one is shown by default without modifying sources? I don’t want to modify sources as it generates problems in future updates.

As an admin, you can just delete those styles (plugins) you do not want to be displayed.

I don’t want to delete them - it’s ok to offer diversity for readers. However, I’d like the most useful one in this case to be shown by default instead of alphabetically based (top most).

There is no such option now. AFAIK, the developers are going to rewrite the whole module.

P.S. Some of those plugins can really be deleted without any doubt, like e.g. ProCite.

Hello @szmigieldesign,
I have adapted an existing citation plugin for my journal. It has also got a new name (contribEntomol…). In the list of citation formats it was not in the first place.
Therefore I changed in the file locale.xml (in every language) the value of the key
<message key="plugins.citationFormats.contribEntomol.displayName">contribEntomol …</message> into <message key="plugins.citationFormats.contribEntomol.displayName">*contribEntomol …</message>. It is working! My plugin is shown first. Maybe you can do this little change (* in front of the name) in your preferred plugin.

But if we delete one Citation Format Plugins, does not affect the rest of programme code?

There is no point in doing this now, since in OJS 3.1 (due by October 23) the whole plugin should be rewritten from scratch…