Code Monkey home page Code Monkey logo

aljawaid / pluginmanager Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 2.0 12.92 MB

Replace the Installed Plugins section with a whole new interface. Plugin Manager provides both users and developers with an improved layout displaying a new section for troubleshooting plugins with a new plugin structure breakdown for each plugin. Install plugins directly or explore new upcoming or untested features from manual plugins.

License: MIT License

CSS 15.98% JavaScript 4.09% PHP 79.93%
kanboard kanboard-plugin extensions extensions-manager manager plugin plugin-manager

pluginmanager's Introduction

PluginManager

GitHub Latest Release (by date) GitHub All Releases GitHub Repository File Count GitHub Repository Size GitHub Code Size

GitHub Discussions GitHub Commits Since Last Release GitHub Commit Monthly Activity Kanboard

Replace the Installed Plugins section with a whole new interface. Plugin Manager provides both users and developers with an improved comprehensive layout displaying a new section for troubleshooting plugins with a new plugin structure breakdown for each plugin. Install plugins direct from the Plugin Directory or explore new upcoming or untested features from manual plugins.

[↓ Bottom] [→ Next] [↑ Top]

Features

  • All plugins, installed and available are now sorted alphabetically
  • Add Back to Top and Bottom buttons for easier screen navigation with smooth scrolling effect
  • Add direct link in Kanboard Settings menu
  • Add New Plugin Sidebar Menu Hook
    • 'template:plugin:sidebar' is located in the plugins menu sidebar
  • Fully translatable
  • Clean coded icons without images for faster page load times
  • Direct link to ContentCleaner and KanboardSupport from the PluginManager sidebar

Plugin Manager

  • Installed Plugins
    • Renamed as Plugin Manager
  • Show installed plugin count
  • Show total count for plugins with updates
    • Filter plugins by those requiring updates
  • Fixed table headers for easier page navigation
  • Use the user friendly search filter to quickly find installed plugins
    • Hover over the input box to focus without clicking
  • Show a notification icon if the plugin has database changes
  • Show a notification icon if the plugin has a published homepage
  • Show the Kanboard compatible version set by the plugin
  • Show a direct link to the plugin readme file if hosted on GitHub, GitLab, Gitea or Codeberg.
  • Show the plugin installation date

Plugin Directory

  • NEW: Show a plugin structure for all plugins
    • Each plugin shows informative icons if it has any database changes, contains template or model overrides, or uses any hooks.
    • Show when each plugin was last updated using Time Ago relative dates
      • Display a relative date with the exact date shown in tooltip (toggles to the exact date when clicked)
    • The plugin structure is compiled for each plugin using properties extracted from the Kanboard Plugins Directory
  • Show a directory source e.g. 'official' or 'custom' including the URL of the source
    • Show external weblink for official directory
  • Show the available plugins count based on your configuration
  • Show the current application version
  • Show a direct link for each plugin's readme file
  • Show plugin totals by type
  • Use the user friendly search filter for quickly finding available plugins
    • Click on each type to dynamically filter all plugins including those with updates
    • Hover over the input box to focus without clicking
  • Highlight the last updated dates to reflect the development activity of a plugin
  • Show direct links to installed plugins

Manual Plugins

  • Manually install plugins in .zip archive files from local or remote locations
  • Manual plugins are part or completely functional plugins but not suitable for general Kanboard installation
  • Show a list of plugins which can be manually downloaded and installed based on data from the Plugin Directory
  • Developers can list their plugins in the normal directory but if they set remote_install to false, the plugin will appear on the manual plugin page with a download link (no install). Kanboard by default, currently completely ignores such plugins.
  • These plugins only show in PluginManager

Plugin Info

  • A dedicated section detailing the breakdown of a plugin with valuable information about core components of a Kanboard plugin
  • Details explaining the plugin structure as displayed in the Plugin Directory and Plugin Manager sections

Plugin Problems

  • A dedicated section listing common issues with plugins and how to resolve them
  • Integration with KanboardSupport to display technical information
  • Useful links to further troubleshoot plugin issues all in one place

[↓ Bottom] [← Previous] [→ Next] [↑ Top]

Screenshots

Plugin Manager

Plugin Manager

Plugin Directory

Plugin Directory

Manual Plugins

Manual Plugins

Plugin Problems

Plugin Problems

More screenshots

[↓ Bottom] [← Previous] [→ Next] [↑ Top]

Usage

Go to Plugins

or

SettingsPlugin Manager

[↓ Bottom] [← Previous] [→ Next] [↑ Top]

Installation & Compatibility

Code Scanning PHP Compatibility Test PHP Compatibility Test PHP Compatibility Test

Installation
Compatibility
  • Requires Kanboard1.2.20
  • Other Plugins & Action Plugins
  • Core Files & Templates
    • 04 Template overrides
    • No database changes
Translations
  • English (UK), French, German, Spanish
  • Starter template available

[↓ Bottom] [← Previous] [→ Next] [↑ Top]

Authors & Contributors

[↓ Bottom] [← Previous] [↑ Top]

License


PluginManager PluginManager PluginManager PluginManager PluginManager PluginManager GitHub commits since latest release (by date)

[↑ Top]

pluginmanager's People

Contributors

alfredbuehler avatar aljawaid avatar cptsanifair avatar creecros avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pluginmanager's Issues

How to Add Link to Readme File?

In the Installed Plugins page, how can we detect the plugin folder and see if there is a README.md or readme.md and then show a link to it?

Or is it best to show the readme link for from the plugin homepage?

Work Out Last Installed Date

There seems to be no date or information on when any plugin was installed.

Solution:
Scan the /plugins folder and the 'last modified' date of the individual plugin folder would be the date it was created (plugin was installed).

I found the scan() but tried using it but got absolutely nowhere. Not much proper information on finding php date modified for directory, everybody talking about files.

Your thoughts? Or if it is easy, can you please create the function etc and tell me how to call it in the template?

for installed plugins, if the date could be worked out, i'd like to fit it in each plugin installed table, probably under the 'up to date' status
image

PHP Fatal error: Uncaught Error: Call to undefined function Kanboard\Plugin\PluginManager\Helper\curl_ini (PHP 8.1)

Using the latest Kanboard version 1.2.28 with PHP 8.1. When trying to access plugin directory, the screen is mostly white

image

And this pops up in the logs:

2023/04/15 13:58:16 [error] 179399#179399: *185 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function Kanboard\Plugin\PluginManager\Helper\curl_init() in /var/www/xxx/plugins/PluginManager/Helper/PluginManagerHelper.php:60
Stack trace:
/var/www/xxx/plugins/PluginManager/Template/plugin/directory.php(174): Kanboard\Plugin\PluginManager\Helper\PluginManagerHelper->lastUpdatedDirectory()
/var/www/xxxx/app/Core/Template.php(83): include('...')
/var/www/xxx/app/Helper/LayoutHelper.php(207): Kanboard\Core\Template->render()
/var/www/xxx/app/Helper/LayoutHelper.php(142): Kanboard\Helper\LayoutHelper->subLayout()
/var/www/xxx/app/Controller/PluginController.php(47): Kanboard\Helper\LayoutHelper->plugin()
/var/www/xxx/app/Core/Controller/Runner.php(77): Kanboard\Controller\PluginController->directory()
/var/www/xxx/app/Core/Controller/Runner.php(31): Kanboard\Core\Controller\Runner->executeController()
/var/w" while reading response header from upstream, client: xxx, server: xxx, request: "GET /extensions/directory HTTP/1.0", upstream: "fastcgi://unix:/run/php/php8.1-fpm.sock:", host: "xxx"

Any idea what it might be?

Bug: All `zip` types are accepted

I just tried to manually install a random zip file and it gave a success alert that the plugin is installed successfully. BUt the plugin does not show up anywhere obviously as it was just a random .zip of files unrelated to kanboard plugins.

I was expecting an error alert to say the zip file is not recognised.

@alfredbuehler Can you please have a look at that part of the code again?

Add Condition for Smooth Scrolling

Add IF condition to plugin file as the scrolling is already in Glancer.... so if glancer installed then ignore, otherwise... create js for back to top button smooth scrolling.

Create Plugin Problems Page

Create a page for the plugin side menu as Plugin Problems

Add content which shows the common problems which users face with badly structured or outdated plugins.

Areas to cover:

  • Further Help
  • link to plugin section of forum
  • link to support page of KanboardSupport showing technical info (if installed)
  • link to kanboard instance about page
  • Plugin Uninstalling
  • mention manual way to uninstall plugin (delete folder)
  • Plugins with Database Changes (highlighted through the new Plugin Manager)
    • Mention the need to cross-check the database for extra tables (also plugin schema table thanks @alfredbuehler )
    • Add example command to delete tables from Mysql database

Pressing Enter on Filter Input Redirects Page to Dashboard

Something I noticed in PluginManager just now. If I am on the “Plugin Directory” view, and enter some text in the filter textbox, the plugins are filtered accordingly. Good. But, if I press the “Enter” key at any time, I am teleported to my kanboard’s home page, the Dashboard view.

I kind of reflexively hit the enter key, even when it’s not necessary, because it’s a normal “submit” action for a textbox/filter. So, I end up constantly bouncing between Plugin Directory and Dashboard when I’m trying to filter the list. Not a huge problem and not a common occurrence, but figured I’d share.

Forum Post by @axb21:
https://kanboard.discourse.group/t/new-plugin-pluginmanager/2492/24?u=aljawaid

Revamp Plugin Side Menu

Make

  • Installed Plugins > Plugin Manager
  • Plugins Directory > Plugins Directory
  • Problem Plugins
    • Add new page with notes on how to detect and delete problem plugins

Add Link to KanboardSupport Plugin

It will be useful, if users go to the Plugin Problems page, that they have access to the technical data of their setup. If KanboardSupport plugin is installed then add a menu item and link

Copy installed plugins to clipboard

There seems to be no real practical way to copy the installed list of plugins to the clipboard so they can be shared across forum posts etc,

Delay in Moving Task Cards in Board View

Hi aljawaid,

thanks for your great contributions to Kanboard!

I tried the PluginManager. Looks great and furthermore provides important informations about plugins.

Unfortunately i have delayed movement of the task cards on the board when moving them around by pressing left mouse and moving the mouse beetween the columns. I doublechecked this behavior. It's gone as soon as i delete the plugin folder for PluginManager and clear the cache. If i copy the folder back, do a cache clean reload: it's back again.

I suppose a correlation to the css issue:

#27

Cheers, fx

Work with Custom URL as Directory

Normal routine:
Kanboard shows its list of plugins in the directory

  • show count
  • show list
  • show disabled url (non-link format)

Define custom url for a different directory (testing, updated with new properties) a duplicate of plugins.json

  • do not show the official pugins, pull the list from the custom url
  • add note that json files only for custom url

Bug: Plugin Filter Causes JS Errors on Other Pages

The current plugin filter works but...

  • JS loads with plugin and shows error except on plugin page - something to do with document.querySelector
  • the description is not shown in the results
  • need to improve to add a 'clear field' icon

Find a replacement, maybe jQuery

  • but table is not a normal table (has extra spanning row [plugin description]) which needs to be filtered

Try to Use jQuery to Change Time Ago on Click

Request by Rainer in the forum

Some users prefer full date shown. I know Matomo or OpenCart did this in the timestamp log column.... showed the relative date (time ago) and then on click it replaced the content with the full date and time. Try to replicate this feature.

Currently:

image

PM not load after latest update

HI, I have a problem with update 4.0-4.1. When I update to one of those version, I get white page instead of plugin page.
Kanboard 1.2.28 with PHP: 8.2.6.

Show 'Other' Icon on Plugin Info Page if >0

Based on this commit abe9a9f which is for the Plugin Directory Page.

The same icon should only show if there is greater than 0 (soon there should always be zero as all plugins will be part of a type)

I think the use Kanboard\Core\Plugin\Directory; is correct in the controller and also the 'available_plugins' => Directory::getInstance($this->container)->getAvailablePlugins(); ?>

but something is wrong in this:

<?php $totalOthers = isset($countTypes) ? ((count($available_plugins)) - (array_sum($countTypes)) ) : '0' ?>
        <?php if ($totalOthers > 0): ?>
<?php endif ?>

as the icon doesn't show, when it should currently (there are 86 others for now)

Move Totals Next to Filter Box

The test code by #16 @creecros is putting the totals in the top directory info table.... it makes the table too big as not intended.

Think of... each total in common text format to be beside the filter box. There is plenty of whitespace to be filled up in that area.

Bug: Plurals Are Ignored in Age Breakdown

Commit a4ba3cd shortened the breakdown of the age displayed. This removed the considerations for plurals.

Revert PART of the a4ba3cd commit to re-introduce a complate breakdown

  • Update AgeHelper.php to include the original strings but in the case format not the original elseif
  • Update translations

Highlight Last Updated

Work out a way to highlight in orange colour any plugins which have not been updated more than 12 months ago

  • green = < 12 months
  • orange = 12+ months
  • red = 24+ months

using plugin['title'] for logical checks is utterly incorrect

I have just placed the following PR to Kanboard:
a fix for the plugin directory

In PluginManager you have most probably borrowed that ill-considered code, and did build upon it, and did multiply it for various purposes. This makes it a bit more tangled at your side 🤔
They may choose to merge or to ignore my PR in Kanboard, but it doesn't concern you either way since you override the entire behavior.

So, have a look at the PR changes and consider applying them analogically to PluginManager/Template/plugin/directory.php.

<?php foreach ($available_plugins as $plugin): ?>

However, bear in mind that the $available_plugins is an associative array of the form (key => value), the "key" being the plugin name and the "value" an array of the plugin properties.
And you have an extra problem because you effectively destroy the keys when you sort the array here:

<?php usort($available_plugins, fn ($a, $b) => strtolower($a['title']) <=> strtolower($b['title'])); ?>

Add New Plugin Properties to All Plugins in The Plugins Directory

Must sift through all plugins and add the new json properties

  • Add last_updated date to each plugin
  • Add has_hooks to my own plugins
  • Add has_overrides to my own plugins
  • Sort all plugins alphabetically in json file
  • Add properties to plugins 5+ years (oldest)
  • Add properties to plugins <4 weeks (recent)
  • Add properties to plugins <2 years
  • Add properties to plugins <3 years
  • Add properties to plugins <4 years
  • Add properties to plugins <5 years
  • #21

Missing in the Kanboard Plugin Directory

The Plugin Manager does not exist in my Kanboard Plugin Directory
Application version: v1.2.25
PHP version: 8.1.12

Lists: [Oxygen] and then [Project activity modifier]

CSS not selective enough - conflicts with other views

Hi aljawaid,

i'am sorry for bothering again. But i've an other issue with ccs coming from the plugin-manager plugin and interfering with other views / pages in Kanboard.

This one overwrites css for my links (a elements) on the board.

a, details, summary, i, img, table, tr, .btn-uninstall, svg, #PluginSideBar > ul li, figure {
    transition: var(--transition-pm);
}

a:hover {
    color: var(--pp-red-alt-2) !important;        <--- important is very bad for a plugin...
}

Here in this picture you can see that settings belonging to the plugin are active on my board view:

grafik

I fear this is a general issue. Plugin CSS overwriting other, general settings, because it's not selective enough. The CSS should be dedicated to the plugin by using specific classes in the html and only mark out this classes or IDs.

Sorry, i'am not complaining! I appreciate your great contributions to Kanboard! But i think this can lead to seroius issues.

Cheers, Fx

Some glitches in displaying things

Env:
Latest Kanboard
All PlugIns latest Version
No Theme installed
Latest Firefox Browser

Hi aljawaid,

there are a few visual glitches in the plugin-manager. Minor issues:

Buttons in Installed PlugIn Section

Buttons for PlugIn Infos and the "Uninstall" and "Info" Buttons are not aligned, not same height.
grafik

Depending on the width of the bowser window the info button are in one line but not all are the same height
grafik

Buttons Top of PlugIn Directory

When i press one of the buttons (PlugIn Type) nothing happens but the search field blinks one time. Is this meant to be a filter? Or is this by design?

grafik

PlugIn Info Page

The boxes are not aligned
grafik

As written earlier in this post: minor issues.

Cheers, Fx

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.