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 #14

Closed
nodiscc opened this issue Aug 3, 2014 · 11 comments

Comments

@nodiscc
Copy link
Member

commented Aug 3, 2014

update: See https://github.com/shaarli/Shaarli/wiki/Ideas-for-plugins

Hey, I did a roundup of issues on https://github.com/sebsauvage/Shaarli/issues and tried to list requests/bugs that would fit as plugins. Then see what we have:

Add/remove page elements

Sharing tools

  • sebsauvage#70: Publish to Twitter (with bit.ly) and Facebook please open a new issue if interested, should be a generic social service sharing plugin, without user tracking
  • sebsauvage#171: Make QR code optional moved to #57
  • sebsauvage#14: Use local QR-Code generation instead of external service fixed

Thumbnailers

Themes

Comment systems

@Sbgodin

This comment has been minimized.

Copy link
Member

commented Aug 3, 2014

Great work! Congratulation. Well, what does @sebsauvage thinks about the seditious team building the seditious shaarli?

@e2jk

This comment has been minimized.

Copy link

commented Aug 4, 2014

Thanks @nodiscc for this thorough investigation work.
What I fail to understand, is what makes it so different:

  • having a "plugin" system that are enabled by configuration switches
  • having the features directly backed in the standard code, and enabled by configuration switches?

In other words, why put the HTML files in a separate plugin folder, instead of just putting it with the other files in the tpl folder?

We'll be bound of having "plugins" (e.g. share to Twitter) which just add a link in an existing template. those plugins would not have a different HTML file, which means some plugins are in the main code directly, and others in the plugins directory. After a while, it'll just be confusing. For example, we currently have thumbnails for a couple of sites in the main code. Why would we treat Deviantart differently, and have that turned off by default, whereas e.g. xkcd is included inthe main code. Or does that mean we move xkcd as a plugin, and turn it off by default? Doesn't seem like a better idea to me.

So either create plugins that are just features available in the main code, but turned off by default, or not have any plugins, keep the code simple (KISS-principle) and just be firm in refusing some features. Although I'm not completely against the first option, I think it makes more sense to keep it simple. Otherwise we'll soon be building some kind of half-backed social media site (multi-user link sharing with comments included), which will do a lot of things in a mediocre way, an nothing in an excellent way...

That being said, I would call out the themes functionality as something that makes sense to be built as "plugin", e.g. a themes folder, there within a folder with the name of the theme, and in that folder the CSS file, and potentially extra HTML files (if needed by the theme). You would activate that theme in the config file, by listing the name of the theme.

@nodiscc

This comment has been minimized.

Copy link
Member Author

commented Nov 8, 2014

@e2jk @Sbgodin @sebsauvage @timovn @BoboTiG @Alkarex Working plugin system proposal at #52

@e2jk

This comment has been minimized.

Copy link

commented Feb 18, 2015

I have just created a page on the wiki to list plugin suggestions, as a way to unclutter the issues list. But that's before I had realized we had this issue open. Should we delete the wiki page instead?
The idea behind the wiki page is to be able to close issues for plugins that nobody is picking up at the moment, to have a somewhat cleaner issues list, which enables to focus on what is broken. First quality, then quantity...

@nodiscc

This comment has been minimized.

Copy link
Member Author

commented Feb 18, 2015

@e2jk Thanks for creating the wiki page; we can move "wontfix" plugin requests there (eg. #58). Just make sure the wiki page is linked from somewhere (the wiki Home page, or the README)

Should we delete the wiki page instead

I'd keep both for the moment, this issue is a great way to see what would be required for a plugin system, as the current proposal #52 is not complete (I'll have to rebase/redo it on top of the latest changes). We can close this issue when the plugin system is implemented.

For example, judging by the list at the top:

  • I think we need a plugin system as a way to inject components in the HTML head (piwik), in the toolbar (configurable custom page link, JS button), in the linklist info bar (links to external sharing/comments/archival services, qr, Link to dead link signalling ...), in the footer (JS includes).
  • We may need to enable adding new fields to the editlink dialog via plugins, to allow them to set custom properties for links (thumbnail URL? "via" field? Custom comment url? geo-URI ?) via plugins, but it's not as clear. The savedb() function would also need to be changed to allow extra fields (currently they are hardcoded).
  • Some ideas listed at the top would probably be better implemented in Shaarli's core (new bookmarklets, tagcloud improvments), or marked wontfix because they would require complex plugin infrastructure or are insecure (HTML descriptions support, syntax highlighting...)
@nodiscc

This comment has been minimized.

Copy link
Member Author

commented Mar 4, 2015

Plugin system pull request at #129

@nodiscc

This comment has been minimized.

Copy link
Member Author

commented Mar 5, 2015

I've closed #129. The plugin system is available in branch https://github.com/shaarli/Shaarli/tree/new-plugin-system. Feel free to add your work on top of it and send Pull Requests. Items that need to be dealt with before merging:

  • QR code onClick event is broken
  • plugin option defaults should not be defined in index.php, rather, explain they have to be configured (in the wiki)bsp@TE:~/git/Shaarli/tpl/plugins (new-plugin-system %=)$

I'll sort more items from the original list and forward people here.

@nodiscc

This comment has been minimized.

Copy link
Member Author

commented Mar 11, 2015

Clean Pull Request back at #164

@nodiscc

This comment has been minimized.

Copy link
Member Author

commented Apr 6, 2015

Blocked by #163

@nodiscc nodiscc removed the help wanted label Apr 15, 2015

@ArthurHoaro

This comment has been minimized.

Copy link
Member

commented Jun 19, 2015

Blocked by #163

Why? Also, #163 if 1.0 milestone. We can work on it later.

@virtualtam virtualtam added the tools label Jul 8, 2015

@virtualtam virtualtam modified the milestones: 0.9.0, 0.5.1, 0.6.0 Jul 30, 2015

@nodiscc nodiscc removed their assignment Sep 29, 2015

@ArthurHoaro

This comment has been minimized.

Copy link
Member

commented Nov 13, 2015

Closing this with #275.

Please open separate issues for plugin suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.