Giter VIP home page Giter VIP logo

browsebysection's Introduction

Browse By Section

A plugin for OJS 3.1.1+ which allows visitors to browse published articles by section.

Usage

Install and activate this plugin from the plugin gallery in your OJS installation. The plugin gallery can be found by logging in as an admin and going to Settings > Website > Plugins > Plugin Gallery.

Once activated, find the section you would like to browse by under Settings > Journal > Sections. Edit the section, enable the new Section Browsing option, and complete the details.

You can now link to the section from any Navigation Menu by going to the Settings > Website > Navigation Menus page and creating a Navigation Menu Item.

License

This plugin is licensed under the GNU General Public License v2.

Compatibility

Use the 3.1.1 branch when running OJS 3.1.1.x.

browsebysection's People

Contributors

ajnyga avatar amirzoian avatar asmecher avatar bolelligallevi avatar bozana avatar bsvvi avatar ckamburov avatar ctgraham avatar defstat avatar diegojmacedo avatar drugurkocak avatar eddoff avatar jirrka avatar jordilacruz avatar josekarvalho avatar klausru avatar marcbria avatar mhvezina avatar mtub avatar natewr avatar neffe avatar ppv1979 avatar primoz-svetek avatar smishanya avatar st-schulte avatar t-fildishevska avatar teismann avatar tigran54 avatar vormia avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

browsebysection's Issues

[OJS 3.1.2] Plugin fails on saving Section Browsing

OJS 3.1.2, all schemas updated after installation of plugin.
The Plugin fails after the form in a section has been completed and Save button is pressed.

Error log:
[15-Mar-2019 10:31:10 UTC] PHP Notice: Undefined offset: 2 in /usr/local/service/www/ojs/plugins/generic/browseBySection/BrowseBySectionPlugin.inc.php on line 190
[15-Mar-2019 10:31:10 UTC] PHP Fatal error: Uncaught Error: Call to a member function setData() on null in /usr/local/service/www/ojs/plugins/generic/browseBySection/BrowseBySectionPlugin.inc.php:192
Stack trace:
#0 /usr/local/service/www/ojs/lib/pkp/classes/plugins/HookRegistry.inc.php(107): BrowseBySectionPlugin->executeSectionFormFields('sectionform::ex...', Array)
#1 /usr/local/service/www/ojs/lib/pkp/classes/form/Form.inc.php(314): HookRegistry::call('sectionform::ex...', Array)
#2 /usr/local/service/www/ojs/controllers/grid/settings/sections/form/SectionForm.inc.php(164): Form->execute()
#3 /usr/local/service/www/ojs/controllers/grid/settings/sections/SectionGridHandler.inc.php(193): SectionForm->execute()
#4 /usr/local/service/www/ojs/lib/pkp/classes/core/PKPRouter.inc.php(390): SectionGridHandler->updateSection(Array, Object(Request))
#5 /usr/local/service/www/ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#6 /usr/local/service/www/ojs/lib/pkp/classes/core/D in /usr/local/service/www/ojs/plugins/generic/browseBySection/BrowseBySectionPlugin.inc.php on line 192
[15-Mar-2019 10:33:01 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /usr/local/service/www/ojs/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[15-Mar-2019 10:33:01 UTC] PHP Warning: Declaration of SectionForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /usr/local/service/www/ojs/controllers/grid/settings/sections/form/SectionForm.inc.php on line 18
[15-Mar-2019 10:33:01 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /usr/local/service/www/ojs/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0

Sitemap Page Error when browseBySection Plugin is Active

Describe the bug
Browse By Section plugin causes the sitemap page to be inaccessible (error 500) when activated. When deactivating this plugin, the sitemap page can be accessed again.

To Reproduce
Steps to reproduce the behavior:

  1. Fresh Install
  2. Download and activate the Browse By Section plugin
  3. Access the sitemap page (ex: https://your.site/journal/sitemap)
  4. HTTP Error 500

What application are you using?

  1. OJS 3.4.0.3
  2. Browse By Section 1.2.1.0
  3. PHP 8.2.11

Additional Information
restful_urls = On

Log

PHP Fatal error:  Uncaught Error: Non-static method PKP\core\PKPApplication::getRequest() cannot be called statically in /home/.../public_html/plugins/generic/browseBySection/BrowseBySectionPlugin.php:303
Stack trace:
#0 [internal function]: APP\plugins\generic\browseBySection\BrowseBySectionPlugin->addSitemapURLs()
#1 /home/.../public_html/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array()
#2 /home/.../public_html/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run()
#3 /home/.../public_html/pages/sitemap/SitemapHandler.php(78): PKP\plugins\Hook::call()
#4 /home/.../public_html/lib/pkp/pages/sitemap/PKPSitemapHandler.php(50): APP\pages\sitemap\SitemapHandler->_createContextSitemap()
#5 [internal function]: PKP\pages\sitemap\PKPSitemapHandler->index()
#6 /home/.../public_html/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()
#7 /home/.../public_html/lib/pkp/classes/core/PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest()
#8 /home/.../public_html/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route()
#9 /home/.../public_html/lib/pkp/classes/core/PKPApplication.php(387): PKP\core\Dispatcher->dispatch()
#10 /home/.../public_html/index.php(21): PKP\core\PKPApplication->execute()
#11 {main}
  thrown in /home/.../public_html/plugins/generic/browseBySection/BrowseBySectionPlugin.php on line 303

Did not work on 3.1.1.1

Tried this on two installations of OJS 3.1.1.1, but when I go to Journal-> Sections -> click on EDIT a section, I get a failed AJAX error.

error log shows:
[09-Jan-2019 16:49:36 Europe/Malta] PHP Fatal error: Call to a member function getData() on null in ******************ric/browseBySection/BrowseBySectionPlugin.inc.php on line 152

$primaryGenreIds is empty

Dear all

I just figured that $primaryGenreIds is empty in

{include file="frontend/objects/article_summary.tpl" section=null showDatePublished=true hideGalleys=true}

In my article_summary.tpl I wanted to only show galley links for $primaryGenreIds and no galley links for supplementary material. This works fine in issues but not via the section.tpl
How could that be solved as $article isn't present as in article_summary.tpl

BUG - if a section is deleted the frontend crashes

Context

I'm using OJS 3.3.0.10

Bug

  • I create a section and enable: "an archive of all submissions published in this section".
  • I create a new menu item with that section
  • I add the new menu item to the primary navigation menu
  • I look at the frontend and the new menu item appears and works
  • I go back to the backend and delete the newly created section
  • I look at the frontend again and the page rendering stops where the primary navigation menu was supposed to be rendered

Expected result

the primary navigation menu should be rendered without the nonexistent menu item and without crashing the rest of the page

Possible Fix

check if the section exists before returning a null element

I'm not sure if the problem belongs to the browseBySection extension rather than the default theme

Update to support versioning

The plugin does not work with the publications introduced as part of the versioning feature. This is mostly because it relies on PublishedSubmissions which no longer exist.

It needs to be revised for v3.2.

OJS 3.3.0.10 Compatibility

Hello,

I tried to use this plugin with OJS 3.3.0.10 but this doesn't works.

Can you confirm it for me?

When do you expect a working version to be released for newer versions of OJS?

Regards

Add journal issue and number to the achives section

Enhancement suggestion : I don't know if this has already been discussed or considered, but it would be very useful to display, in the section archives, the journal issue and number alongside with the already present page range or the issue date. Are the hooks already present for such additional information? Thank you.

Fatal error when trying to edit or create journal sections

Tested with OJS 3.1.2-1. Only appears when the plugin is enabled.
To reproduce, in Journal Settings -> Section edit or create new Section.
In PHP logs:

[20-Jun-2019 07:00:44 UTC] PHP Fatal error:  Uncaught Error: Call to undefined method Application::get() in /var/www/ojs-3.1.2-1/plugins/generic/browseBySection/BrowseBySectionPlugin.inc.php:145
Stack trace:
#0 /var/www/ojs-3.1.2-1/lib/pkp/classes/plugins/HookRegistry.inc.php(107): BrowseBySectionPlugin->initDataSectionFormFields('sectionform::in...', Array)
#1 /var/www/ojs-3.1.2-1/lib/pkp/classes/form/Form.inc.php(240): HookRegistry::call('sectionform::in...', Array)
#2 /var/www/ojs-3.1.2-1/controllers/grid/settings/sections/form/SectionForm.inc.php(70): Form->initData()
#3 /var/www/ojs-3.1.2-1/controllers/grid/settings/sections/SectionGridHandler.inc.php(175): SectionForm->initData()
#4 /var/www/ojs-3.1.2-1/lib/pkp/classes/core/PKPRouter.inc.php(390): SectionGridHandler->editSection(Array, Object(Request))
#5 /var/www/ojs-3.1.2-1/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#6 /var/www/ojs-3.1.2-1/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPComponentRouter->rout in /var/www/ojs-3.1.2-1/plugins/generic/browseBySection/BrowseBySectionPlugin.inc.php on line 145

No branch working with OJS 3.1.2-1

Hi @NateWr ,

currently none of the branches of the Plugin work with OJS 3.1.2-1
Master branch has adaptions for the OJS master branch which wont work with the current release.

Could you open a branch for OJS 3.1.2?
I think you need all commits including 72ad6b2 from master.

Regards,

Nils Stefan Weiher

OPS Compatibility

Is this plugin compatible for use with OPS 3.3.0.10? If not, we would love to see it ported for OPS in the future!

Enable sort options

Allow for different sorting options for presentation:

Sort by:

  • publication date
  • title
  • author ?

Order by:

  • ascending
  • descending

Publication date is the default sort order.

Title would be used in a Glossary or Lexicon.

Author might be covered elsewhere.

In OPS

Hello, can it be adapted to OPS?

Plugin not allowing the "Save" button to work

Hi,

I am trying to use this feature and activated "Browse by Section" Plugin from OJS Plugin gallery and activated it. However, when I go to the section, edit them and check the box that says "Section Browsing - Enable an archive of all submissions published in this section" and then click save, the save button keeps on loading and never saves the options.

I am attaching the screenshots for the same. Please help me out. I am using OJS 3.3.0.10
Screenshot (35)
Screenshot (36)

Cannot Create Section when browseBySection Plugin is Active

Describe the bug
If the browseBySection plugin is activated, it will not be possible to add sections. When pressing the "Create Section" button in the Journal Settings --> Section menu, an error message appears: "Failed Ajax request or invalid JSON returned."

To Reproduce
Steps to reproduce the behavior:

  1. Fresh Install
  2. Download and activate the browseBySection plugin
  3. Access Journal Section page (Journal Settings --> Section)
  4. Click "Create Section"
  5. Error

What application are you using?

  1. OJS 3.4.0.4
  2. browseBySection 1.2.1.0
  3. PHP 8.2.11

Log

PHP Fatal error:  Uncaught TypeError: PKP\section\Repository::get(): Argument #1 ($id) must be of type int, null given, called in /home/.../public_html/plugins/generic/browseBySection/BrowseBySectionPlugin.php on line 159 and defined in /home/.../public_html/lib/pkp/classes/section/Repository.php:58
Stack trace:
#0 /home/.../public_html/plugins/generic/browseBySection/BrowseBySectionPlugin.php(159): PKP\section\Repository->get()
#1 [internal function]: APP\plugins\generic\browseBySection\BrowseBySectionPlugin->initDataSectionFormFields()
#2 /home/.../public_html/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array()
#3 /home/.../public_html/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run()
#4 /home/.../public_html/lib/pkp/classes/form/Form.php(266): PKP\plugins\Hook::call()
#5 /home/.../public_html/lib/pkp/controllers/grid/settings/sections/form/PKPSectionForm.php(170): PKP\form\Form->initData()
#6 /home/.../public_html/controllers/grid/settings/sections/form/SectionForm.php(81): PKP\controllers\grid\settings\sections\form\PKPSectionForm->initData()
#7 /home/.../public_html/controllers/grid/settings/sections/SectionGridHandler.php(214): APP\controllers\grid\settings\sections\form\SectionForm->initData()
#8 /home/.../public_html/controllers/grid/settings/sections/SectionGridHandler.php(196): APP\controllers\grid\settings\sections\SectionGridHandler->editSection()
#9 [internal function]: APP\controllers\grid\settings\sections\SectionGridHandler->addSection()
#10 /home/.../public_html/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()
#11 /home/.../public_html/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest()
#12 /home/.../public_html/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route()
#13 /home/.../public_html/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch()
#14 /home/.../public_html/index.php(21): PKP\core\PKPApplication->execute()
#15 {main}
  thrown in /home/.../public_html/lib/pkp/classes/section/Repository.php on line 58

Move paginator outside of the ul

The paginator here:

{* Pagination *}
{if $prevPage > 1}
{capture assign="prevUrl"}{url|escape router=$smarty.const.ROUTE_PAGE page="section" op="view" path=$sectionPath|to_array:$prevPage}{/capture}
{elseif $prevPage === 1}
{capture assign="prevUrl"}{url|escape router=$smarty.const.ROUTE_PAGE page="section" op="view" path=$sectionPath}{/capture}
{/if}
{if $nextPage}
{capture assign="nextUrl"}{url|escape router=$smarty.const.ROUTE_PAGE page="section" op="view" path=$sectionPath|to_array:$nextPage}{/capture}
{/if}
{include
file="frontend/components/pagination.tpl"
prevUrl=$prevUrl
nextUrl=$nextUrl
showingStart=$showingStart
showingEnd=$showingEnd
total=$total
}

Should be outside of the ul, not inside.

The core paginator present a div:
https://github.com/pkp/pkp-lib/blob/e9cc77c9f15b0fc6e13962a7dd9997571bdc28dd/templates/frontend/components/pagination.tpl#L17-L29

and this better aligns with, for example:
https://github.com/pkp/ojs/blob/7e38f98f1e1a3a40741c4e789046ea6f30f8ac8a/templates/frontend/pages/catalogCategory.tpl#L80-L99

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.