{"action":"created","issue":{"url":"https://api.github.com/repos/shaarli/Shaarli/issues/129","labels_url":"https://api.github.com/repos/shaarli/Shaarli/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/shaarli/Shaarli/issues/129/comments","events_url":"https://api.github.com/repos/shaarli/Shaarli/issues/129/events","html_url":"https://github.com/shaarli/Shaarli/pull/129","id":59060493,"number":129,"title":"New plugin system","user":{"login":"nodiscc","id":3950390,"avatar_url":"https://avatars.githubusercontent.com/u/3950390?v=3","gravatar_id":"","url":"https://api.github.com/users/nodiscc","html_url":"https://github.com/nodiscc","followers_url":"https://api.github.com/users/nodiscc/followers","following_url":"https://api.github.com/users/nodiscc/following{/other_user}","gists_url":"https://api.github.com/users/nodiscc/gists{/gist_id}","starred_url":"https://api.github.com/users/nodiscc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodiscc/subscriptions","organizations_url":"https://api.github.com/users/nodiscc/orgs","repos_url":"https://api.github.com/users/nodiscc/repos","events_url":"https://api.github.com/users/nodiscc/events{/privacy}","received_events_url":"https://api.github.com/users/nodiscc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shaarli/Shaarli/labels/decision%20needed","name":"decision needed","color":"fef2c0"},{"url":"https://api.github.com/repos/shaarli/Shaarli/labels/plugin","name":"plugin","color":"c11d81"}],"state":"open","locked":false,"assignee":{"login":"nodiscc","id":3950390,"avatar_url":"https://avatars.githubusercontent.com/u/3950390?v=3","gravatar_id":"","url":"https://api.github.com/users/nodiscc","html_url":"https://github.com/nodiscc","followers_url":"https://api.github.com/users/nodiscc/followers","following_url":"https://api.github.com/users/nodiscc/following{/other_user}","gists_url":"https://api.github.com/users/nodiscc/gists{/gist_id}","starred_url":"https://api.github.com/users/nodiscc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodiscc/subscriptions","organizations_url":"https://api.github.com/users/nodiscc/orgs","repos_url":"https://api.github.com/users/nodiscc/repos","events_url":"https://api.github.com/users/nodiscc/events{/privacy}","received_events_url":"https://api.github.com/users/nodiscc/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-02-26T11:45:27Z","updated_at":"2015-03-01T02:02:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/shaarli/Shaarli/pulls/129","html_url":"https://github.com/shaarli/Shaarli/pull/129","diff_url":"https://github.com/shaarli/Shaarli/pull/129.diff","patch_url":"https://github.com/shaarli/Shaarli/pull/129.patch"},"body":" * remove archive.org integration from main code\r\n * add a plugin system: \r\n   * add a new global variable 'PLUGINS', which is an array containing names of plugins that will be enabled.\r\n   * plugins are RainTPL template chunks that will be injected at appropriate locations during the rendering (see next commits for examples).\r\n   * build a list of plugins for each location (footer, toolbar, linklist) based on the `PLUGINS` array, and if the corresponding template chunk exists.\r\n   * at each location, loop over the enabled (and existing) plugins, and include them using RainTPL `include=`.\r\n   * Misc: move rendering the linklist to a separate function.\r\n   * Misc: create a `PageBuilder` **every time** we render the page. This is not always needed, , it now allows us to setup global page settings, like we'll do with plugins.\r\n   * Credits to @pikzen for finding a way to build proper plugin lists for each location (and not needing blank templates to prevent RainTPL from crashing...)\r\n * cleanup: compute `shorturl` (`linkdate|smallHash`) only once\r\n * move QR code to a plugin\r\n   * move RainTPL template chunks for QR code rendering to `tpl/plugins/qrcode`\r\n   * move required resources (js, image) there and update COPYING\r\n   * use the minified qr.js\r\n   * enable the `'qrcode'` plugin by default in `index.php` `'PLUGINS'` config array\r\n * move archive.org integration to a plugin …\r\n   * Disabled by default; to enable it, add `'archiveorg'` to the `'PLUGINS'` config array in `index.php` or `data/options.php`\r\n * add \"playvideos\" plugin: adds a \"Play videos\" toolbar button …\r\n   * code from https://github.com/zaius/youtube_playlist/\r\n   * Plays all Youtube videos linked from the page in an overlay HTML5 player\r\n   * See it's README.md\r\n * plugin system: allow adding elements to the page `<head>` `(tpl/plugins/*/*.includes.html)`"},"comment":{"url":"https://api.github.com/repos/shaarli/Shaarli/issues/comments/76563650","html_url":"https://github.com/shaarli/Shaarli/pull/129#issuecomment-76563650","issue_url":"https://api.github.com/repos/shaarli/Shaarli/issues/129","id":76563650,"user":{"login":"nodiscc","id":3950390,"avatar_url":"https://avatars.githubusercontent.com/u/3950390?v=3","gravatar_id":"","url":"https://api.github.com/users/nodiscc","html_url":"https://github.com/nodiscc","followers_url":"https://api.github.com/users/nodiscc/followers","following_url":"https://api.github.com/users/nodiscc/following{/other_user}","gists_url":"https://api.github.com/users/nodiscc/gists{/gist_id}","starred_url":"https://api.github.com/users/nodiscc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodiscc/subscriptions","organizations_url":"https://api.github.com/users/nodiscc/orgs","repos_url":"https://api.github.com/users/nodiscc/repos","events_url":"https://api.github.com/users/nodiscc/events{/privacy}","received_events_url":"https://api.github.com/users/nodiscc/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T02:02:10Z","updated_at":"2015-03-01T02:02:10Z","body":"It's easier to review commit by commit; let me know if there's something you want explained."}}