Feature #1352
closedDOC - Add documentation for building and using the plugin libraries
0%
Description
Since the plugins are vital to building a great community, some beginner level documentation on building and use the Redmine::Plugin
library would help foster the community growth. Would also be a great idea to build some script/generate
type scripts to help automate the process.
References:
Updated by Eric Davis over 16 years ago
Jean-Philippe Lang has started a wiki page for this: Plugin_Tutorial
Updated by Jean-Baptiste Barth over 16 years ago
I tried to follow the PluginTutorial page and found some oopsies.. I hope the following remarks are welcome and here is the right place for that, as there's no "discussion" page directly linked to this wiki page.
1. The Generating a controller section mentions "You should see the 2 polls and you should be able to vote for them:" but they were not created before, if I'm not wrong. You may suggest to create them just after the model creation, by adding the following lines in the migration before the db:migrate :
Poll.create(:question => "Can you see this poll ?") Poll.create(:question => "And can you see this other poll ?")
2. I also added a "if poll.save" after the "flash" notice in order to save the poll, otherwise it did not seem to be saved at all, even in production mode.
Moreover, there's a little typo error in the controller : "poll.vote(params[:anwser])" should be replaced by "poll.vote(params[:answer])", or "No" will be incremented in any case ;-)
3. Another little suggestion, but you may disagree : in the beginning it is said to edit "vendor/plugins/redmine_polls/app/blablabla" but next it's said to edit "app/blabla" directly. Maybe it would be a good idea to explicit that all the files related to a plugin are in "vendor/plugins/<plugin_name>" and that "main installation" should not be modified.
4. In Extending the project menu section, templates and controller may be modified in order to keep "project_id" parameter : even if poll are still not project-linked in the database, it would avoid some error pages...
Anyway, I found this tutorial very useful to understand how plugins work, as I'm just a beginner in writing plugins for your great app. See you ... soon :-)
Updated by Eric Davis about 16 years ago
- Category set to Website (redmine.org)
- Status changed from New to Resolved
- Assignee changed from Eric Davis to Jean-Baptiste Barth
- Resolution set to Fixed
I've updated the tutorial. Would you mind giving it a quick look and see how it is now?
Updated by Jean-Baptiste Barth about 16 years ago
- Status changed from Resolved to Closed
It's OK, much clearer in my opinion, great !
Sorry I didn't make these updates myself, I had totally forgot this post...