Plugin Settings

Development-related discussion, including bundled plugins
metronomista
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 02 Jun 2012, 19:25

Plugin Settings

Postby metronomista » 13 Jun 2012, 01:25

Hi,

i'm trying to build a small plugin to connect tt-rss to a SemanticScuttle instance (a free software to manage bookmarks in a del.icio.us-like way).

So far I've been able to do make it work (with really minor changes made to some of the code in "contrib repo" (Read it later), but it works only in a dirty manner (hardcoding every options inside the js). Say, as many contrib plugins rely on centralized services (Google plus, read it later, etc.), they don't have a problem hardcoding the URL where the plugin must do whatever it is supposed to do. Even more, as there is not secret sharing a link to these services, this URL is usually in the javascript code (runs user side).

As I'm trying to connect to a self-hosted instance of semantic scuttle, I'd love to be able to add a few settings that a user can use to tell the software where her instance of semantic scuttle is running. As every user may like to connect with a different instance, It would be better to leave this config in a per-user level.

The thing is that I'm new to TT-RSS and I don't know if the plugin system is empowered to add new settings/menu to the user prefs menu.


Any ideas?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Plugin Settings

Postby fox » 14 Jun 2012, 12:21

Unfortunately, there's no mechanism to provide plugin settings at this point, which is why plugins usually rely on client cookies (which is why everything is done in JS).

metronomista
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 02 Jun 2012, 19:25

Re: Plugin Settings

Postby metronomista » 16 Mar 2013, 16:15

OK, Finally I did the plugin for the then-state-of-the-art v1.5 of tt-rss.

A couple of weeks ago I updated it to work with tt-rss v1.7 and have finally released it under the terms of the GPL v3.

It requires a small edit during installation, as the plugin system doesn't allow any options and the URL to your SemanticScuttle needs to be hard-typed in the js file.

Anyone can see the clone/fork/download the project from the public github repo: https://github.com/versvs/ttrss2scuttle

Those of you who also speak/read spanish can read the announcement there in my blog: http://www.versvs.net/anotacion/plugin- ... ticscuttle


Greetings to everyone, but special thanks to the guys behind both tt-rss and semantic scuttle :)

Any feedback on the plugin will be truly appreciated :)

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Plugin Settings

Postby fox » 16 Mar 2013, 16:36

>as the plugin system doesn't allow any options

It does, actually. You can add preference panes and even hook into several existing ones. Check out example plugins.

metronomista
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 02 Jun 2012, 19:25

Re: Plugin Settings

Postby metronomista » 16 Mar 2013, 17:12

Yup, I was said that thing a couple of minutes ago at the blog post!

I will look to update the plugin to the new system... it is way cleaner for the user :)

Thanks for the improvement!

metronomista
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 02 Jun 2012, 19:25

Re: Plugin Settings

Postby metronomista » 17 Mar 2013, 01:13

Updated plugin to v2.0 to take profit of the new options mechanics.

I took the owncloud plugin as an inspiration for the pane/options creation :)


Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest