├── .gitignore ├── README.md ├── WidgetDocs.md ├── app ├── controllers │ └── concerns │ │ └── sidebar_concern.rb ├── models │ └── sidebar_box.rb └── views │ └── sidebar │ └── _sidebar.html.erb ├── assets ├── javascripts │ ├── discourse │ │ ├── helpers │ │ │ ├── sidebar-helpers.js.es6 │ │ │ └── sidebar_widgets.js.es6 │ │ ├── initializers │ │ │ └── hide-sidebar.js.es6 │ │ ├── templates │ │ │ └── sidebar │ │ │ │ ├── category_info.js.handlebars │ │ │ │ ├── category_list.js.handlebars │ │ │ │ ├── create_button.js.handlebars │ │ │ │ ├── fb_page.js.handlebars │ │ │ │ ├── featured_users.js.handlebars │ │ │ │ ├── forum_news.js.handlebars │ │ │ │ ├── free_text.js.handlebars │ │ │ │ ├── search_help.js.handlebars │ │ │ │ ├── signup.js.handlebars │ │ │ │ ├── subcategories.js.handlebars │ │ │ │ ├── suggested_topics.js.handlebars │ │ │ │ ├── topic_stats.js.handlebars │ │ │ │ ├── unanswered_topics.js.handlebars │ │ │ │ ├── user_notifications.js.handlebars │ │ │ │ └── user_stats.js.handlebars │ │ └── views │ │ │ └── sidebar.js.es6 │ └── reply-new-menu.js └── stylesheets │ └── sidebar_styles.scss ├── config ├── locales │ ├── client.de.yml │ ├── client.en.yml │ └── server.en.yml └── settings.yml ├── lib └── discourse-plugin-sidebar │ ├── engine.rb │ └── version.rb └── plugin.rb /.gitignore: -------------------------------------------------------------------------------- 1 | .bundle/ 2 | log/*.log 3 | pkg/ 4 | test/dummy/db/*.sqlite3 5 | test/dummy/db/*.sqlite3-journal 6 | test/dummy/log/*.log 7 | test/dummy/tmp/ 8 | test/dummy/.sass-cache 9 | auto_generated 10 | Gemfile.lock 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Discourse Sidebar Plugin 2 | 3 | This plugins provides a sidebar as a third-party tool to be used for discourse. The sidebar is widget oriented, can be configured from the backend and allows other plugins to add other widgets to the sidebar. 4 | 5 | **Attention**: By itself this plugin _does not_ add a sidebar to discourse. It merely allows other plugins to _use_ the sidebar and add it to discourse. If you want to have the entire app wrapped with the sidebar, make sure to install [simple-sidebar-theme-plugin](https://github.com/ligthyear/discourse-plugin-simple-sidebar-theme). 6 | 7 | ## Installation 8 | 9 | ### Docker 10 | 11 | To install in docker, add the following to your app.yml in the plugins section: 12 | 13 | ``` 14 | hooks: 15 | after_code: 16 | - exec: 17 | cd: $home/plugins 18 | cmd: 19 | - mkdir -p plugins 20 | - git clone https://github.com/discourse/docker_manager.git 21 | - git clone https://github.com/ligthyear/discourse-plugin-sidebar.git sidebar 22 | ``` 23 | 24 | and rebuild docker via 25 | 26 | ``` 27 | cd /var/discourse 28 | ./launcher rebuild app 29 | ``` 30 | 31 | ## Manually 32 | 33 | Just three simple steps. From your main discourse do: 34 | 35 | cd plugins 36 | git clone https://github.com/ligthyear/discourse-plugin-sidebar.git # clone the repo here 37 | cd .. 38 | RAILS_ENV=production rake assets:precompile 39 | 40 | 41 | ** You might also want to add the [simple-sidebar-theme-plugin](https://github.com/ligthyear/discourse-plugin-simple-sidebar-theme)**. 42 | 43 | ## Configuration 44 | 45 | This plugin comes with to configuration options, to be found under the `Sidebar` section in the admin SiteSettings: 46 | 47 | They work as follows: 48 | 49 | - **sidebar widgets**: is a '|'-separated list of the widgets to load. What is not listed here won't be loaded in the sidebar. The order is from top to bottom. _Attention_: not all widgets show up on all pages. 50 | - **sidebar free text**: you can add your own free-field text here to be rendered in the 'freetext' plugin. 51 | - **sidebar fb page**: add the facebook page of the sidebar Facebook-Page-Widget is supposed to use 52 | - **sidebar forum news category**: give the category-slug to the category to be used by the "forum_news"-widget 53 | 54 | 55 | ### Reply as New topic 56 | 57 | As when the sidebar is wrapped around the topic, it reduces the space and drops the right gutter (if the other plugins does enforce that), it drops the `reply as new topic feature`. To bring it back, the plugins provides this as a post-menu-action. Add it to the action menu to get it back. 58 | 59 | ## Compability 60 | 61 | - [Curated Home](https://github.com/ligthyear/discourse-curated-home) allows you to configure a sidebar using this plugin. 62 | 63 | ## Changelog: 64 | 65 | * 2014-12-25: 66 | - fix naming issue of files to make sure sidebar can import the widgets 67 | - clean ups 68 | - update docs 69 | - use all widgets per default 70 | 71 | * 2014-11-27: 72 | - plenty of more widgets 73 | - plenty of design fixes 74 | 75 | * 2014-05-15: 76 | - Update Readme 77 | - Add docs for Plugin-Plugin-Developers 78 | 79 | * 2014-04-22: 80 | - add Readme 81 | 82 | * 2014-04-19: 83 | - initial version 84 | 85 | ## TODO 86 | 87 | (in order of importance) 88 | 89 | ### other Limitations: 90 | 91 | (none) 92 | 93 | Found a bug? Please report it on github! 94 | 95 | ## Authors: 96 | Benjamin Kampmann 97 | 98 | ## License (BSD): 99 | Copyright (c) 2014, Benjamin Kampmann 100 | All rights reserved. 101 | 102 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 103 | 104 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 105 | 106 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 107 | 108 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 109 | -------------------------------------------------------------------------------- /WidgetDocs.md: -------------------------------------------------------------------------------- 1 | # Discourse Sidebar Plugin Widget Development Documentation 2 | 3 | **For general installation instruction, please see Readme.md** 4 | 5 | ## Introduction 6 | 7 | The Sidebar Plugin itself is pluggable by design and allows third parties to provider further widgets through extension. These widgets are just common Ember-Views that just need to register with the plugin in a certain way and provide some more helper methods to make interaction easier. 8 | 9 | ## Concept 10 | 11 | Essentially when the plugin starts it replaces the main view with a wrapper adding the `Discourse.SidebarView` (as defined in `javascript/sidebar_injects.js.erb`) in an `