| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
⬇️ Install package: OJS / OMP 3.5 · OJS 3.4 — or browse all Releases.
A block plugin for Open Journal Systems (OJS) that adds a "most read articles" section to the frontend sidebar. By default the block shows the 5 most-viewed articles of the last 7 days, each with its title (linking to the article page) and an eye icon with the full-text view count. The journal manager can set a custom heading and a custom time window.
Maintained by OJSBR. Adapted for OJS 3.4/3.5 from the original community plugin by Antti-Jussi Nygård (@ajnyga), with contributions by @zielaq. See the full Credits & authorship section below.
| Application | Branch | Plugin release |
|---|---|---|
| OJS 3.5.x and OMP 3.5.x | stable-3_5_0 (default) | 3.5.0.7 |
| OJS 3.4.x | stable-3_4_0 | 3.4.0.4 |
Both branches ship the same code; the locale folders follow each PKP line (38 languages).
Since 3.5.0.7 the same package serves OJS and OMP: on a press the block lists the most read monographs and links to the catalogue. The former mostReadOmp repository is archived; its releases stay available there.
In the plugin settings the journal manager sets:
PHPUnit (tests/*Test.php, on PKP\tests\PKPTestCase): the classes against the installed PKP, the plugin found by PKP's plugin registry, the limits of the settings, the stored titles, the cache key per language, rendering without a query per article, escaping in the block (titles keep only safe HTML), the site level without settings, and the 38 translations. From the OJS root:
lib/pkp/lib/vendor/bin/phpunit --configuration lib/pkp/tests/phpunit.xml --no-coverage "$PWD/plugins/blocks/mostRead/tests"Cypress (cypress/tests/functional/MostRead.cy.js, run by pkp-github-actions on every push): enables the plugin, refuses days and counts outside the limits, saves valid ones and puts the settings back. With withStatistics=1 (the block in the sidebar and published articles with usage statistics) it also checks the block a reader sees.
Verified on OJS 3.5.0.3 and 3.4.0.10.
Tests are kept in the repository and are not part of the release package.
Generative AI (Claude, by Anthropic) was used to write and run tests, improve the code and bring it in line with PKP standards. Every change is reviewed and tested by OJSBR, which is responsible for the published releases.
Issues and pull requests are welcome. Please target the branch matching the OJS version you are working against.
Distributed under the GNU GPL v3. See LICENSE and docs/COPYING.
Plugin de bloco para o Open Journal Systems (OJS) que adiciona uma seção de "artigos mais lidos" à barra lateral. Por padrão mostra os 5 artigos mais acessados nos últimos 7 dias, cada um com título (link para a página do artigo) e ícone de olho com a contagem de acessos. O gestor pode definir um título personalizado e a janela de dias.
Mantido pela OJSBR. Adaptado para OJS 3.4/3.5 a partir do plugin comunitário original de Antti-Jussi Nygård (@ajnyga), com contribuições de @zielaq. Veja a seção Créditos e autoria abaixo.
| Aplicação | Branch | Release do plugin |
|---|---|---|
| OJS 3.5.x e OMP 3.5.x | stable-3_5_0 (padrão) | 3.5.0.7 |
| OJS 3.4.x | stable-3_4_0 | 3.4.0.4 |
As duas branches têm o mesmo código; as pastas de idioma seguem cada linha do PKP (38 idiomas).
A partir da 3.5.0.7 o mesmo pacote serve OJS e OMP: numa editora o bloco lista os livros mais lidos e leva ao catálogo. O antigo mostReadOmp está arquivado; as releases dele continuam lá.
Instale em Configurações → Website → Plugins → Enviar um novo plugin, ou extraia a pasta em plugins/blocks/ (ficando plugins/blocks/mostRead/); não renomeie a pasta. Ative o plugin e habilite o bloco Artigos mais lidos nas configurações da barra lateral.
Dias (1 a 3650, padrão 7), número de artigos (1 a 50, padrão 5) e título do bloco por idioma, em texto puro. A lista é guardada em cache por revista e idioma já pronta para exibir (um dia), e salvar as configurações limpa o cache.
PHPUnit em tests/ (sobre PKP\tests\PKPTestCase) e Cypress em cypress/tests/functional/ (rodado pelo pkp-github-actions a cada push), com os comandos da seção em inglês. A suíte cobre as classes contra o PKP instalado, o plugin encontrado pelo registro de plugins, os limites das configurações, os títulos gravados, o cache por idioma, a renderização sem consulta por artigo, o escape no bloco, o nível do site sem configurações e as 38 traduções; o Cypress confere os limites e, com estatísticas, o bloco que o leitor vê. Verificado no OJS 3.5.0.3 e 3.4.0.10.
Os testes ficam no repositório e não fazem parte do pacote da release.
Foi usada IA generativa (Claude, da Anthropic) para escrever e rodar testes, melhorar o código e alinhá-lo aos padrões da PKP. Toda mudança é revisada e testada pela OJSBR, que responde pelas releases publicadas.
Distribuído sob a GNU GPL v3. Veja LICENSE e docs/COPYING.
| Back | FazBrowse Home | New Git URL |