Plugins » History » Version 116

Kenan Dervisevic, 2018-04-04 22:37
highlight ruby code

1 1 Jean-Philippe Lang
h1. Plugins
2 1 Jean-Philippe Lang
3 85 Mischa The Evil
h2. Plugin list
4 85 Mischa The Evil
5 85 Mischa The Evil
A full list of available Redmine plugins can be found at the "Plugin Directory":/plugins.
6 85 Mischa The Evil
7 115 Seppe Stas
More plugins (some in very early development), which are not listed at the "Plugin Directory":/plugins but are publicly available on "GitHub":https://github.com can be found using a "search like this":https://github.com/search?type=Repositories&language=&q=redmine&repo=&langOverride=&x=0&y=0&start_value=1.
8 85 Mischa The Evil
9 1 Jean-Philippe Lang
h2. Installing a plugin
10 1 Jean-Philippe Lang
11 88 Jean-Philippe Lang
1. Copy your plugin directory into @#{RAILS_ROOT}/plugins@ (Redmine 2.x) or @#{RAILS_ROOT}/vendor/plugins@ (Redmine 1.x). If you are downloading the plugin directly from GitHub, you can do so by changing into your plugin directory and issuing a command like @git clone git://github.com/user_name/name_of_the_plugin.git@.
12 1 Jean-Philippe Lang
13 111 Nicolas Rodriguez
2. If the plugin requires a migration, run the following command in @#{RAILS_ROOT}@ to upgrade your database (make a db backup before).
14 1 Jean-Philippe Lang
15 99 Eduardo Machado
2.1. For Redmine 1.x:
16 99 Eduardo Machado
17 116 Kenan Dervisevic
<pre><code class="ruby">bundle exec rake db:migrate_plugins RAILS_ENV=production</code></pre>
18 116 Kenan Dervisevic
  
19 99 Eduardo Machado
20 1 Jean-Philippe Lang
2.2. For Redmine 2.x:
21 99 Eduardo Machado
22 116 Kenan Dervisevic
<pre><code class="ruby">bundle exec rake redmine:plugins:migrate RAILS_ENV=production</code></pre>
23 1 Jean-Philippe Lang
24 81 Jean-Philippe Lang
3. Restart Redmine
25 1 Jean-Philippe Lang
26 30 Jean-Philippe Lang
You should now be able to see the plugin list in _Administration -> Plugins_ and configure the newly installed plugin (if the plugin requires to be configured).
27 1 Jean-Philippe Lang
28 83 Tony Marschall
h2. Uninstalling a plugin
29 83 Tony Marschall
30 83 Tony Marschall
1. If the plugin required a migration, run the following command to downgrade your database (make a db backup before):
31 1 Jean-Philippe Lang
32 102 Anonymous
1.1. For Redmine 1.x: 
33 102 Anonymous
34 116 Kenan Dervisevic
<pre><code class="ruby">bundle exec rake db:migrate:plugin NAME=plugin_name VERSION=0 RAILS_ENV=production</code></pre>
35 102 Anonymous
36 102 Anonymous
1.2. For Redmine 2.x:
37 102 Anonymous
38 116 Kenan Dervisevic
<pre><code class="ruby">bundle exec rake redmine:plugins:migrate NAME=plugin_name VERSION=0 RAILS_ENV=production</code></pre>
39 1 Jean-Philippe Lang
40 88 Jean-Philippe Lang
2. Remove your plugin from the plugins folder: @#{RAILS_ROOT}/plugins@ (Redmine 2.x) or @#{RAILS_ROOT}/vendor/plugins@ (Redmine 1.x)..
41 61 Mischa The Evil
42 80 Jean-Philippe Lang
3. Restart Redmine
43 38 Mischa The Evil
44 16 Jean-Philippe Lang
h2. Writing plugins
45 1 Jean-Philippe Lang
46 73 Mischa The Evil
There is a step-by-step [[Plugin_Tutorial|tutorial]] about writing a plugin. Some more (detailed) information is collected and stored in the "[[Plugin_Internals|plugin internals]]" page.
47 77 Felix Schäfer
More (general) developer information can be found in the [[Guide#Developer-guide|Redmine Developer Guide]].
48 92 Terence Mill
49 94 Terence Mill
h2. Migrating Plugins
50 92 Terence Mill
51 94 Terence Mill
There are changes in Plugins API or new Rails requirements which need to be considered if you want to use plugin from prior version of redmine.
52 94 Terence Mill
In any case it's proposed to update and migrate redmine core system first without plugins and then if stable try to drop in one by one, to know where problems come from if any.
53 93 Terence Mill
54 113 Toshi MARUYAMA
Consideration towards plugins which *overwrite views* completely because of bad coding style or there is no "hook" available shall be made in any case. Maybe you can collect and write down plugin references here which are of this type.
55 93 Terence Mill
56 93 Terence Mill
Let's start with..
57 93 Terence Mill
58 96 Terence Mill
* "Redmine_blocks":/plugins/redmine_blocks
59 93 Terence Mill
60 92 Terence Mill
h3. Redmine 1.3 > 1.4
61 92 Terence Mill
62 92 Terence Mill
* routes.rb which defines url to controller (parameter, action) mapping must be created in <plugin>/config/routes.rb
63 92 Terence Mill
* @ARCondition@ is gone with no replacement
64 92 Terence Mill
* @TabularFormBuilder@ is now @Redmine::Views::LabelledFormBuilder@
65 92 Terence Mill
* defining your own context menus now requires @helper :context_menus@ in the respective controller
66 92 Terence Mill
* of course, @returning@ is deprecated in favor of @tap@
67 92 Terence Mill
* if you're doing anything with repos check it twice, because there can be multiple repos now per project
68 97 Jan from Planio www.plan.io
* @Project#visible_by@ is deprecated and replaced by @Project#visible_condition@
69 1 Jean-Philippe Lang
70 100 Jan from Planio www.plan.io
71 92 Terence Mill
h3. Redmine 1.4 > 2.x
72 103 Terence Mill
73 103 Terence Mill
* "Writing plugins compatible with both Redmine 1.x and 2.x - some tips":/boards/3/topics/31445
74 103 Terence Mill
75 103 Terence Mill
h3. Writing Redmine 2.x plugins
76 103 Terence Mill
77 103 Terence Mill
* "Tutorial":http://www.gogolek.co.uk/blog/2012/09/writing-redmine-2-x-plugins-tutorial/