pkp / authorrequirements Goto Github PK
View Code? Open in Web Editor NEWA plugin for OJS
License: GNU General Public License v3.0
A plugin for OJS
License: GNU General Public License v3.0
The email field is still compulsory when adding contributors through the quicksubmit plugin in ojs 3.4.0.3.
Hi,
I get this error when trying to configure the plugin:
PHP Fatal error: Declaration of AuthorRequirementsSettingsForm::fetch($request) must be compatible with Form::fetch($request, $template = null, $display = false) in /var/www/ojs/plugins/generic/authorRequirements/AuthorRequirementsSettingsForm.inc.php on line 63
I have
OJS versione: 3.3.0.11
PHP version: 8.0.21
Hi @ewhanson! I did a quick code review of what's here. It looks really good! I don't see any areas where we can limit the code customization here. It looks about as discrete as we can get it.
Unfortunately, overriding those user form templates are probably going ito require a bit of maintenance over time. But hopefully before too long we'll get them converted to the new forms system and that will be easier.
Some small things I noticed. In the template, instead of:
{if !$emailNotRequired}
{assign var="emailRequired" value=true}
{else}
{assign var="emailRequired" value=false}
{/if}
You can do this to save a few lines:
{fbvElement required=!$emailNotRequired ...}
As a general rule, with the form classes you should always call the parent methods to ensure that hooks get fired. This ensures someone else could modify your form from a plugin. Noticed at https://github.com/ewhanson/authorRequirements/blob/master/AuthorRequirementsSettingsForm.inc.php#L48 and https://github.com/ewhanson/authorRequirements/blob/master/AuthorRequirementsSettingsForm.inc.php#L56 and https://github.com/ewhanson/authorRequirements/blob/master/AuthorRequirementsSettingsForm.inc.php#L78.
There's a typo in authorRequrementsSettingsFormSubmit
at https://github.com/ewhanson/authorRequirements/blob/master/templates/settingsForm.tpl#L31.
And there were some places where white-space and indentation are not quite right. You may want to pass it through a formatter. Here are some of the places I noticed:
Great work! Solid, clean code. ๐
Hi ewhansen,
thank you for your plugin, I would like to use it. I found one bug:
When I activate it, I can't see the volume editors on the landing page.
I think it's because you have to consider templates/controllers/grid/users/author/form/authorForm.tpl, which adds the checkbox
"Identify this contributor as the editor of this volume." to the contributor form. This checkbox is missing if the plugin is enabled.
I inserted the few lines in your authorForm.tpl, maybe this is already the solution.
Regards,
ohilbig01
The README for v.1.0.0-1 removes reference to 3.1.2, but the diff doesn't suggest breaking changes. Is the intent for v1.0.0-1 still to be compatible with 3.1.2?
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.