How does the plugin system work? Documentation Added - WIP


dlandon

Recommended Posts

  • 1 month later...
  • Replies 195
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 7 months later...

One other comment.  The filename of the .plg should be unique.  The plugin system does not handle collisions on plugin filenames at all, and effectively if there are two plugins with the same filename, they both cannot be simultaneously installed.

 

Edited by Squid
Link to comment
  • 9 months later...

FYI, Starting with the next rev of unRaid (6.6.0-rc1?), a new attribute on plugins is available: support  Used for the URL to the appropriate support thread for the plugin.

 

<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" min="6.4.0" support="https://lime-technology.com/forums/topic/38582-plug-in-community-applications/">

 

If the attribute doesn't exist in the .plg file, then CA when installing a plugin will automatically add the attribute to installed plugins when it installs one (based upon the support thread in the plugin's XML).  In other words, you don't need to add this attribute to any .plg

 

But, if you've added a support link into the README.md file, then that should now be removed so that the link does not appear twice on the plugins page.

Link to comment
  • 6 months later...

Starting with unRaid 6.7, plugin authors have the ability to add in another entity into the .plg file to allow the plugin to display a font-awesome icon on the Plugins Tab

 

<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" icon="refresh">

This will show the icon fa-refresh on the plugin page.  For compatibility with previous versions of unRaid though you should still have the appropriate png in the Images folder.  This is optional.  If the icon attribute doesn't exist, the status quo remains in effect

 

image.png.5958ec7de2af7a45d606f86c1994030e.png

 

Additionally, for pretty much all of the v6 series, you have also been able to specify a font-awesome icon for the .page file's settings.

 

Menu="Utilities"
Type="xmenu"
Title="Auto Update Applications"
Icon="refresh"

Will display the fa-refresh icon on the settings page for the AutoUpdate plugin.

 

image.png.175463707e3a6ef1ca521b995e5d0890.png

 

To utilize those icons within the Community Applications plugin (versions after 1/5/19), add another entry to the xml  (For compatibility with previous versions of CA the <Icon> entry should still be present with an appropriate URL link.  Once again, optional.  If IconFA isn't present, CA will use Icon.  ** CA has been changed so that a font-awesome icon can be utilized in the <Icon> entry.  Technically, this deprecates <IconFA>, but that method is still supported.

 

<IconFA>refresh</IconFA>

image.png.98aaee23113285ba2c2dfc184c8e026b.png

You can also utilize the new unRaid specific icons (I'll leave it to you to discover them once 6.7 gets released) by using (on any of those entries) the full name of the icon.  (But obviously, those new icons will not display on unRaid versions prior to 6.7)

Edited by Squid
Link to comment
  • 1 month later...
  • 4 years later...
4 hours ago, KluthR said:

Hmm. I wanted to switch to semantic versioning, seems, that is something thats not supported then?

 

Note that semver isn't really that useful for Unraid plugins, because users can't choose which version to install - they always get the latest. It is kind of like browsers, you just update to stay current and deal with it if the author makes breaking changes.

 

One benefit of the date-based system is users can tell whether a plugin has been abandoned, or if it has been updated for the latest release of Unraid.

Link to comment
3 minutes ago, KluthR said:

@ljm42 just noted, that with semver, one could not choose a version. How can users choose a version with date versioning

 

Sorry if I wasn't clear. My point was that since users cannot choose what version to install there isn't much value in using semver.

Link to comment
1 hour ago, ljm42 said:

One benefit of the date-based system is users can tell whether a plugin has been abandoned, or if it has been updated for the latest release of Unraid.

Hmm.. MyServers violates the standard lol and required specific workarounds in auto update lol

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.