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?
The list of authors is fetched in classes/article/AuthorDAO.inc.php in the getAuthorsAlphabetizedByJournal function. The current sorting is specified in the SQL query there:
ORDER BY aa.last_name, aa.first_name
Regards,
Alec Smecher
Public Knowledge Project Team
The function that’s used for this is AuthorDAO::getPublishedArticlesForAuthor, in classes/article/AuthorDAO.inc.php. 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
Regards,
Alec Smecher
Public Knowledge Project Team
thanks for the reply 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)?
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 Thank you for your help so far!
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
Language English=en de
Relation Supp. Files
Coverage Geo-spatial location, chronological period, research sample (gender, age, etc.)
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:
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.
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.
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
Daniela
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:
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.
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}
{else}
{* No issue publication date info *}
{math|assign:"minYear" equation="x-25" x=$currentYear}
{math|assign:"maxYear" equation="x+2" x=$currentYear}
{/if}
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.