Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin system draft + example plugin #45

Closed
wants to merge 7 commits into from
Closed

Plugin system draft + example plugin #45

wants to merge 7 commits into from

Conversation

nodiscc
Copy link
Member

@nodiscc nodiscc commented Nov 6, 2014

Very rough work in progress. This (will) add a plugin system for page elements. Do not merge.

The example plugin adds a readityourself link for each Shaarli link, pointing to a readable version of the page (example).
The readityourself server URL is configurable.
Requested in sebsauvage#66. To test it, git clone https://github.com/nodiscc/Shaarli shaarli-test; cd shaarli-test; git checkout readityourself

howitlooks

TODO - PLUGIN SYSTEM

  • all options should be in options.php, + Move all configuration settings to data/config.php #41
  • LINKLIST_PLUGINS should be an array()
    • It's a list of enabled plugins that will get included/run when raintpl generates the linklist
    • adaptable to PAGEHEADER_PLUGINS, EDITLINK_PLUGINS...
  • remove the new if condition line 51, instead:
    • loop over all plugin names in the arry, for each, include inc/plugins/$pluginname/$pluginname.html (find a correct location).
    • the <span... print in the example plugin should be in inc/plugins/readityourself/readityourself.html
  • test test test
  • add more example plugins (archive.org ? qr code?)
  • test test
  • rebase and squash commits

This method should work for most feature requests in #14, and allows moving some current core items (thumbnails, qr) to plugins. Third party plugins can be cloned in plugins/ and simply enabled in options.php.

Current status: draft draft draft. Give it some time or submit changes to https://github.com/nodiscc/Shaarli on branch readityourself

@nodiscc
Copy link
Member Author

nodiscc commented Nov 8, 2014

Resuming work on this now. Please do not merge. The pull request is open for anyone to comment on the logic and my crap code skills.

@nodiscc
Copy link
Member Author

nodiscc commented Nov 8, 2014

Closing this for a clean start in https://github.com/nodiscc/Shaarli/commits/plugin-system

@nodiscc nodiscc closed this Nov 8, 2014
@nodiscc nodiscc deleted the readityourself branch November 9, 2014 11:53
@nodiscc nodiscc restored the readityourself branch November 9, 2014 14:41
@nodiscc nodiscc deleted the readityourself branch November 9, 2014 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress plugin bells and whistles
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant