Plugin Tutorial » History » Revision 1

Revision 1/115 | Next »
Jean-Philippe Lang, 2008-08-08 20:33

Plugin Tutorial

Creating a new Plugin

Open up a command prompt and "cd" to your redmine directory, then execute the following command:

% ruby script/generate redmine_plugin pools

The plugin structure is created in vendor/plugins/redmine_pools:

      create  vendor/plugins/redmine_pools/app/controllers
      create  vendor/plugins/redmine_pools/app/helpers
      create  vendor/plugins/redmine_pools/app/models
      create  vendor/plugins/redmine_pools/app/views
      create  vendor/plugins/redmine_pools/db/migrate
      create  vendor/plugins/redmine_pools/lib/tasks
      create  vendor/plugins/redmine_pools/assets/images
      create  vendor/plugins/redmine_pools/assets/javascripts
      create  vendor/plugins/redmine_pools/assets/stylesheets
      create  vendor/plugins/redmine_pools/lang
      create  vendor/plugins/redmine_pools/README
      create  vendor/plugins/redmine_pools/init.rb
      create  vendor/plugins/redmine_pools/lang/en.yml

Edit vendor/plugins/redmine_pools/init.rb too adjust plugin information (name, author, description and version).
For example:

require 'redmine'

Redmine::Plugin.register :redmine_pools do
  name 'Pools plugin'
  author 'John Smith'
  description 'A plugin for managing pools'
  version '0.0.1'

Then start the application and point your browser to http://localhost:3000/admin/info.
After logging in, you should see your new plugin in the plugins list:

Updated by Jean-Philippe Lang over 14 years ago · 1 revisions