Following this block plugin as an example I was able to retrieve a list of most view articles:
However, my requirements include displaying the author’s name instead of the journalName. This is where my difficulty starts.
The array $resultMetrics returned by the block component only contains [journalPath, journalName, articleId, articleTitle, metric].
I’m aware that I can use the articleId to find the authorId and name by searching through the DB, but I’m not clear on how to do so. I’m still very new to the OJS system.
Thanks. I was stuck at attempting to get the author string and was using getAuthors(): $articles[$resultRow['submission_id']]['articleAuthors'] = $article->getAuthors();
instead of getAuthorString().
I’m able to display the journal author now.