I think it would be extremely useful to have a "real plugin-system" integrated into redmine core. Based on this, it should be possible to modify routing,controllers,models,views,helpers and even core functions.
At the moment it's hard to build extensions without patching the core and even the engines-plugin is just an unstable workaround for me :(
I'm one of the developers of forge.typo3.org and would like to contribute my redmine modifications - but I can't do this by contributing hundreds of patches. There should be a clean way for everyone to extend redmine by developing plugins.
Maybe it makes sense to look at the mephisto guys and how they implemented their plugin-system:
Any other ideas?
#2 Updated by Martin Herr over 10 years ago
I really tried to overload existing redmine-views and -controllers with engines for several days - but couldn't get it to work.. :(
Will try it again :)
@Jean-Philippe: Would it be possible that I could get write access to http://www.redmine.org/wiki/redmine/Plugins that I can add some documentation about my experiences writing redmine plugins?
#3 Updated by Rocco Stanzione over 10 years ago
+1. As the Engines docs say, you can't really clobber models with a plugin - you'd have to copy the whole existing model into the plugin, which kind of defeats the purpose. I was able to get it to work for one page load with some evil hackery, but at the end Rails insists on loading the original plugin.
#4 Updated by Brian Palmer over 10 years ago
I have to disagree. I'm working on a Redmine plugin and the engines system has worked very well, I think a "real" plugin system would require a huge amount of effort to even reach the same level. Models can be a problem, true, but it's not difficult to inject code into existing models in the plugin initialization code. I added a new has_many association to projects in this way. Some problems can occur in development mode because of reloading, but they can be worked around.
#7 Updated by Eric Davis about 10 years ago
chaoqun zou wrote:
Could you tell us how to do this? "I added a new has_many association to projects in this way."
This code is working great for me. As you can see in the ClassMethods and InstanceMethods modules, you can easily add or override methods in the Redmine core.
# init.rb require_dependency 'issue_patch'
# issue_patch.rb require_dependency 'issue' module IssuePatch def self.included(base) # :nodoc: base.extend(ClassMethods) base.send(:include, InstanceMethods) # Same as typing in the class base.class_eval do belongs_to :my_plugin_class end end module ClassMethods # Methods to add to the Issue class end module InstanceMethods # Methods to add to specific issue objects end end # Add module to Issue Issue.send(:include, IssuePatch)
#8 Updated by Eric Davis almost 10 years ago
- Status changed from New to Closed
- Assignee deleted (
- Target version set to 0.8
- % Done changed from 0 to 100
I'm going to close this issue. #1677 added some plugin hooks so plugins can start to add in their own HTML or controller logic. r1723 lets any plugin override a view by creating the same named view file.
If any more hooks are needed; open a issue describing where you would like it, what data you would like, and assign it to me.
#9 Updated by Thiyagarajan Thulasi over 3 years ago
In my redmine application i added some plugins while overriding a same patch in different plugin but it take priority with the top level i unable to run my bottom plugin patch.
Plugin 'A' Am writing patch for issues controller and issue before_save callBack
plugin 'B' Am overriding same issue controller patch and model before_save callBack
The above scenario Plugin 'A' patch's only running plugin 'B' code does't run
Any one have any solution for this?