Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 1657 Bytes
1 | ***THIS DOCUMENT IS OUT OF DATE*** |
2 | ================================== |
3 | |
4 | How to add a new sidebar plugin |
5 | =============================== |
6 | |
7 | 1. Decide on a name. I'll refer to it as <name> below. |
8 | |
9 | 2. Next, create the plugin's controller in |
10 | components/plugins/sidebars/<name>_controller.rb. Look at |
11 | flickr_controller.rb for an example. At a minimum, you need to |
12 | define two methods: |
13 | |
14 | * self.display_name. This is the short name that shows up in |
15 | title blocks in the sidebar admin UI. |
16 | |
17 | * self.description. This is the description that shows up in the |
18 | UI. |
19 | |
20 | If your plugin needs to save configuration options, then you'll |
21 | need to add a 'configure' method as well, and possible a |
22 | self.default_config method. Follow the examples. |
23 | |
24 | 3. Next, create the configuration page. If your sidebar plugin |
25 | doesn't need any configuration data, then you can skip this step. |
26 | Otherwise create a file called |
27 | components/plugins/sidebars/<name>/configure.rhtml and |
28 | put the form for configuring your plugin into the file. See the |
29 | existing examples for inspiration. You'll need to include |
30 | observe_form to get rails to save your data for you. |
31 | |
32 | 4. Finally, create the plugin's content. This is what is displayed |
33 | when the sidebar is displayed in the blog. Create a file called |
34 | components/plugins/sidebars/<name>/content.rhtml and fill it up. |
35 | Don't forget to include a <h3> header block. Configuration data |
36 | (if any) is available in @sb_config[<config name>] |
37 | |
38 | That's it. New components should be picked up automatically. To |
39 | enable them, you'll need to use the sidebar tool in the admin page. |