rboelter / mostviewed Goto Github PK
View Code? Open in Web Editor NEWMost Viewed Articles Plugin for OJS 3.x: Show the most-viewed and downloaded articles on the journal's homepage
License: GNU General Public License v3.0
Most Viewed Articles Plugin for OJS 3.x: Show the most-viewed and downloaded articles on the journal's homepage
License: GNU General Public License v3.0
This throws an error in v3.2, because we've removed the PublishedSubmissionDAO
and PublishedSubmission
classes. You can read about this in teh release notes: https://docs.pkp.sfu.ca/dev/release-notebooks/en/3.2-release-notebook#publishedarticle-and-publishedmonograph-removed
We've also introduced a service class for usage stats which should be used if possible. In particular, this part: https://docs.pkp.sfu.ca/dev/documentation/en/statistics-reader#get-a-list-of-objects-ordered-by-their-total-stats
Very nice plugin, and generally working as expected. Thank you!
However, at the moment, the title field seems to be hard-coded so if the user chooses to enter a custom title this is used regardless of language. It would be nice if the title varies according to the language chosen by the user.
Looks good! Here are some thoughts on an initial code review and test with 3.1.2.
mostReadArticles
setting doesn't exist in the database yet?<style>
just above the content will ensure that the user never sees a flash of unstyled content: https://github.com/RBoelter/mostViewed/blob/master/templates/mostViewed.tpl#L24.
<style>
tag will be harder to overwrite from a third-party theme.{ldelim}
and {rdelim}
instead of {
and }
to prevent smarty from interpreting it.I notice that it's not yet working with 3.2. I'll make a separate issue about that.
Welcome
We ask you to make a copy in Arabic
What code snippet I need to use if I want to place it in template manually? I dont want the position you have specified, i want to call the most viewed articles at certain area of the page.. any code to use? thanks
Describe the problem you would like to solve
The plugin needs some updates to work properly under OJS 3.4.
I'll be working on it, so I'm planning to come back with a PR shortly.
I get failed Ajax request or invalid JSON format
error when opening setting of the plugin.
I am using OJS version 3.3.0-11 and PHP 8
Describe the bug
The plugin is not using the configured settings at the scheduled task.
To Reproduce
What application are you using?
OJS 3.3.x
Hi @RBoelter,
My OJS 33014 has the latest version from Most Viewed plugin, running on a linux server with 7.4 php, doesn't update the list from plugin on frontend. If I update any plugin config from panel the list on frontend is updated.
Do you have any idea of what can be happening?
Thanks for the new release of mostViewed! However, is it supposed to be backwards compatible? On our system with OJS 3.1.2.4, the upgrade let to a "Failed AJAX request or invalid JSON returned" and complete outage. The fatal error in the php-log is obviously related to the change in the get-method from
$request = Application::getRequest();
to
$request = Application::get()->getRequest();
Below is the complete error log:
Sep 3 00:52:28 web08 php73-user: PHP Fatal error: Uncaught Error: Call to undefined method Application::get() in /www/user/htdocs_ojs/plugins/generic/mostViewed/MostViewedPlugin.inc.php:35
Sep 3 00:52:28 web08 php73-user: Stack trace:
Sep 3 00:52:28 web08 php73-user: #0 /www/user/htdocs_ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php(69): MostViewedPlugin->register('generic', 'plugins/generic...', NULL)
Sep 3 00:52:28 web08 php73-user: #1 /www/user/htdocs_ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php(143): PluginRegistry::register('generic', Object(MostViewedPlugin), 'plugins/generic...', NULL)
Sep 3 00:52:28 web08 php73-user: #2 /www/user/htdocs_ojs/lib/pkp/classes/core/Dispatcher.inc.php(132): PluginRegistry::loadCategory('generic', true)
Sep 3 00:52:28 web08 php73-user: #3 /www/user/htdocs_ojs/lib/pkp/classes/core/PKPApplication.inc.php(252): Dispatcher->dispatch(Object(Request))
Sep 3 00:52:28 web08 php73-user: #4 /www/user/htdocs_ojs/index.php(68): PKPApplication->execute()
Sep 3 00:52:28 web08 php73-user: #5 {main}
Sep 3 00:52:28 web08 php73-user: thrown in /www/user/htdocs_ojs/plugins/generic/mostViewed/MostViewedPlugin.inc.php on line 35
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.