chronological means: sorting the articles by the date of publishing? (Articles also have several dates stored in the database; besides publishing date there's also "date_submitted", "last_modified", "date_status_modified" and a date when the files belonging to an article have been uploaded or modified.)
Actually, there is an internal function in OJS that retrieves all published articles of a journal in chronological order, using the publication date. The function can sort in ascending and descending order. It is located in /classes/article/PublishedArticleDAO.inc.php - the function's called "getPublishedArticlesByJournalId".
If you want to display the chronological list of articles on the home page of a journal, you could call this function from /pages/index/IndexHandler.inc.php, in the part starting in line 41 with "if($journal)".
- Code: Select all
$publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
$publishedArticles =& $publishedArticleDao->getPublishedArticlesByJournalId($journal->getId());
With those lines, your template /templates/index/journal.tpl will know about the articles in chronological order. You can use the variable $publishedArticles to iterate over them and prepare them for display.
I haven't tested this suggestion though, so there might be some caveats that I haven't thought through. You might also want to prepare the $publishedArticles with a VirtualArrayIterator or use some other way to limit the output, if the article list would get too long. However, maybe with those ideas you'll find a way towards the solution you're looking for.