How to sort with "Browse by author" in OJS?

Hi there,

I would like to change the sorting order when using “browse by author”. I’ve taken a look into our database and so far all entries in “authors” seem to be sorted by the author_id. Can it be changed? And how would I do that?

Kind regards

Hi @UBWolf,

The list of authors is fetched in classes/article/ in the getAuthorsAlphabetizedByJournal function. The current sorting is specified in the SQL query there:

ORDER BY aa.last_name, aa.first_name

Alec Smecher
Public Knowledge Project Team

Hi Alec,

thanks for the reply :slight_smile: Unfortunately there is a misunderstanding. My question didn’t refer to the sorting of the authors, but the sorting of titles one author has published (example: It would be great if the titles could be sorted by publishing date.
Do you have an idea how to manage that?

Kind regards

Hi @UBWolf,

Ah – sorry, I misread your original post.

The function that’s used for this is AuthorDAO::getPublishedArticlesForAuthor, in classes/article/ There’s currently no sort order specified, so to add one, you’ll need to add a join to the query to fetch the issue:

LEFT JOIN published_articles pa ON (a.article_id = pa.article_id)
LEFT JOIN issues i ON (pa.issue_id = i.issue_id)

…then add the sorting to the end of the query…

ORDER BY i.date_published

Alec Smecher
Public Knowledge Project Team

Hi Alec,

thanks for the reply :slight_smile: It worked! However, we have some issues which where published in OJS recently, but their original publication date (of the print version) is much older. Is it possible to sort it after the original publication date (the one in brackets after the volume)?

Kind regards

Hi @UBWolf,

Do you mean the issue year? If so, then you would use i.year.

Alec Smecher
Public Knowledge Project Team

Hi Alec,

I tried that, but the sorting remains the same, so I assume it’s still not what I look for. I’ll give a small example: We have a printed journal issue, which was published in 1998. We make a digital version of it in 2015 and upload it in 2015. The system will sort it as if it has been published in 2015 and not, like we want it to do, in 1998. so basically we want to sort it with the textfield “year”, which can be filled in when we use the form to create an issue (in the “identification”-part).

I hope that explanation is a bit clearer :slight_smile: Thank you for your help so far!

Kind regards

My advice would be to tidy up your meta data. I had a quick look at a random article from said issue of your journal and got the following data:


  1. Title Title of document Inhalt
  1. Creator Author’s name, affiliation, country Die Redaktion
  1. Subject Discipline(s)
  1. Subject Keyword(s)
  1. Description Abstract
  1. Publisher Organizing agency, location
  1. Contributor Sponsor(s)
  1. Date (YYYY-MM-DD) 2015-04-10
  1. Type Status & genre Peer-reviewed Article
  1. Type Type
  1. Format File format PDF (Deutsch)
  1. Identifier Uniform Resource Identifier
  1. Identifier Digital Object Identifier Titel anhand dieser DOI in Citavi-Projekt übernehmen
  1. Source Title; vol., no. (year) Mitteilungen der Deutschen Gesellschaft für Archäologie des Mittelalters und der Neuzeit; Vol 9 (1998): Mitteilungen der Arbeitsgemeinschaft für Archäologie des Mittelalters und der Neuzeit
  1. Language English=en de
  1. Relation Supp. Files
  1. Coverage Geo-spatial location, chronological period, research sample (gender, age, etc.)
  1. Rights Copyright and permissions Copyright (c) 2015 Mitteilungen der Deutschen Gesellschaft für Archäologie des Mittelalters und der Neuzeit

As you can see the dates are set to the wrong year basically. This also leads to false citation for some formats:

Redaktion, D. (2015). Inhalt. Mitteilungen Der Deutschen Gesellschaft FüR ArchäOlogie Des Mittelalters Und Der Neuzeit, 9, 3-6. doi:

Your best bet would be to set the ‘correct’ publication dates for your issues and then reset the dates of the articles according to the issue they have been published in.

This problem has also been addressed in the now retired german support forum: Sortierung bei Anzeige der Artikel beim Browsen von Autoren

Thank you for your suggestion. But I think the problem runs deeper than that. Most of these journals are old issues which were recently digitized, so it isn’t unusual that the publication date is in 1998, but the uploading date is 2015.
If it would solve the problem, we might change the uploading date to the publication date, but the drop-down-menu provides only the years until 2009.

Kind regards

It solves the problem… just have a look at or more specifically ZJapanR: Author Details; Baum, Harald. As you can see the issues go back until the year 1996.

Für weitere Fragen stehe ich auch gerne direkt zur Verfügung!

Beste Grüße

First of all I want to thank you for your constant help! It is very appreciated.
I tried to understand how to insert an old publication date, but I still don’t see it. There is a dropdown menu with the years from 2004 till 2017. I cannot write anything else into it. So the question is: Do I have to change the content of the dropdown menu first? If so, how can I do it? Or do I have to change the publication date in the database? But then I would have to change it every time someone uploads an older journal, which would be a serious problem.

Vielen herzlichen Dank noch mal!
Viele Grüße

To make a long story short the dropdown menu functions in the following way: The ‘oldest’ year, that you can choose, is the current date minus 10 years while it also gives you the possibility to change the date two years into the future. There are two ways to bypass this problem:

  1. Set the date to for example 2005 and save the issue.

    Then edit the issue again and you will be able to set the date to 1995 now and so on…
    When you’ve reached the aspired date check the control box below to reset the publication date (for the copyright and so on). Click save and you should be good.
  2. If you would like to have a more comfortable approach then change the code of the rows 96 to 104 in \templates\editor\issues\issueData.tpl according to your wishes (to fit the release year of the oldest issue you have).

Here is an example with an offset of 25 years instead of 10:

{if $datePublished}
				{assign var=publishedYear value=$datePublished|date_format:"%Y"}
				{math|assign:"minYear" equation="min(x,y)-25" x=$publishedYear y=$currentYear}
				{math|assign:"maxYear" equation="max(x,y)+2" x=$publishedYear y=$currentYear}
				{* No issue publication date info *}
				{math|assign:"minYear" equation="x-25" x=$currentYear}
				{math|assign:"maxYear" equation="x+2" x=$currentYear}

Here is the result of that change:

If the change of that template doesn’t seem to have any effect please delete any files in /cache/t_compile/ and reload the page.

Viele Grüße aus Hamburg


Again, thank you very much! It worked great :smile:

Viele Grüße