Skip to content

Instantly share code, notes, and snippets.

View meineerde's full-sized avatar

Holger Just meineerde

View GitHub Profile
# make sure to require this in your init.rb
class MyPluginIssueHook < Redmine::Hook::ViewListener
# this just renders the partial
# the contents of the context ahsh is made available as local variables to the partial
render_on :view_issues_form_details_bottom, :partial => 'hooks/view_issues_form_details_bottom'
def controller_account_success_authentication_after(context={ })
# do something here
<IfModule mod_passenger.c>
PassengerRoot /var/ruby/1.8/gem_home/gems/passenger-2.2.11
PassengerRuby /usr/ruby/1.8/bin/ruby
PassengerEnabled on
PassengerUserSwitching on
PassengerDefaultUser passenger
</IfModule>
# First run script/generate redmine_plugin add_link
# Put in vendor/plugins/redmine_add_link/init.rb
require 'redmine'
Redmine::Plugin.register :redmine_rt_link do
name 'Redmine Add Link'
author 'Holger Just'
url 'http://dev.holgerjust.de/projects/redmine-misc'
# first numbered item
** subitem
# second numbered item
** subitem
Processing OpensearchController#index (for 93.219.166.11 at 2010-04-27 16:57:07) [GET]
Parameters: {"project_id"=>"redmine-opensearch/repository/show/trunk/app/views", "action"=>"index", "controller"=>"opensearch"}
Rendering template within layouts/base
Rendering common/404 (404)
Filter chain halted as [:find_optional_project] rendered_or_redirected.
Completed in 18ms (View: 11, DB: 3) | 404 Not Found [http://dev.holgerjust.de/projects/redmine-opensearch/repository/show/trunk/app/views/opensearch]
<Directory /var/www/redmine/public>
Allow from all
Options -MultiViews
</Directory>
* Level 1
* Level 1
** Level 2
*** Level 3
** Level 2
require 'redmine'
require 'dispatcher'
Dispatcher.to_prepare do
# Patches
require_dependency 'query_patch'
end
Redmine::Plugin.register :redmine_my_plugin do
...
require 'redmine'
Redmine::Plugin.register :my_plugin do
[...]
project_module :my_module do
permission :read_my_stuff, :my_controller => [:first_action, :second_action]
end
end
<Location /svn>
DAV svn
SVNParentPath "/var/svn"
DirectorySlash Off
AuthType Basic
AuthName "Secured Area"
Require valid-user
</Location>