Code Monkey home page Code Monkey logo

authorrequirements's People

Contributors

ewhanson avatar kant avatar marlara avatar mpbraendle avatar natewr avatar withanage avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

authorrequirements's Issues

PHP fatal error

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

Code review

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. ๐Ÿ‘

Plugin prevents display of volume editors

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.