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

Fixes #378 - Plugin administration UI. #388

Merged
merged 1 commit into from
Jan 31, 2016

Conversation

ArthurHoaro
Copy link
Member

Features

From the administration panel, users can:

  • See all plugin name and description available.
  • Enable/disable plugins.
  • Change loading order of their plugins (affects for example shaares icon order).
  • Affect and change plugins parameters.

Plugin developer side

Every plugin needs a <plugin_name>.meta file which is in fact an .ini file (KEY="VALUE") to be listed in plugin administration.

Each file contain two keys:

  • description: plugin description
  • parameters: user parameter names, separated by a ;.

Note: In PHP, parse_ini_file() seems to want strings to be between by quotes " in the ini file.

Theme maintainers

There is a new page: pluginsadmin.html. It needs to be added to your theme. I'll update documentation later.

Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can use plugin_admin.js, only if:

  • you're using a table.
  • you call orderUp() and orderUp() onclick on arrows.
  • you add data-line and data-order to your rows.

Otherwise, theme maintainers can use their own JS as long as this field is send by the form:

<input type="hidden" name="order_{$key}" value="{$counter}">

Other

  • In tools.html, moved "Change password" after Shaarli and plugins configuration.
  • Unit tests.
  • 2 new page in Router: pluginadmin and save_pluginadmin.

Preview

screenshot

TODO

  • Documentation!

@ArthurHoaro ArthurHoaro added plugin bells and whistles feature labels Nov 23, 2015
@ArthurHoaro ArthurHoaro self-assigned this Nov 23, 2015
@ArthurHoaro ArthurHoaro added this to the 0.7.0 milestone Nov 23, 2015
@virtualtam
Copy link
Member

Neat \o/

Gonna start to test it during the upcoming weekend!

@ArthurHoaro
Copy link
Member Author

Rebased.

<div class="clear"></div>
</noscript>

<div id="pluginsadmin">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

though 4 spaces are a common indentation value for most languages, HTML devs tend to stick to using 2 spaces to keep the overall code readable:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's better!

@virtualtam
Copy link
Member

First batch of comments posted ;-)

@ArthurHoaro
Copy link
Member Author

Thanks for the review! I had miss a few things! ;)
This one is still open.

@ArthurHoaro
Copy link
Member Author

Documentation updated:

@ArthurHoaro
Copy link
Member Author

I just force pushed an outdated version. -.-
I'll re-fix your review and merge.

ArthurHoaro added a commit that referenced this pull request Jan 31, 2016
Fixes #378 - Plugin administration UI.
@ArthurHoaro ArthurHoaro merged commit 53603f5 into shaarli:master Jan 31, 2016
@ArthurHoaro ArthurHoaro deleted the pluginadmin branch January 31, 2016 18:00
@ArthurHoaro ArthurHoaro mentioned this pull request Jan 31, 2016
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants