Changeset 8055
- Timestamp:
- 03/23/08 11:09:13 (5 months ago)
- Files:
-
- plugins/nahoWikiPlugin/trunk/README (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/nahoWikiPlugin/trunk/README
r7058 r8055 3 3 == Overview == 4 4 5 This plugin allows you to embed a wiki within your symfony application with the following features: 5 This plugin allows you to embed a wiki within your symfony application with 6 the following features: 6 7 - Create/edit pages with full versionning 7 8 - Basic permissions management … … 18 19 - A bunch of helpers to provide total integration in your application 19 20 20 Most features have been inspired from [http://www.splitbrain.org/projects/dokuwiki DokuWiki] (e.g. namespaces and Interwiki work the same way). 21 22 It is not aimed at replacing full-featured wiki packages, but offers a lightweight alternative for when you build a website that has to contain a simple wiki. It is very easy to configure and adapt, so it should fulfill most basic wiki requirements. 23 24 Please note that this plugin is in active development. If you want to help and improve it, please contact Nicolas Chambrier. 21 Most features have been inspired from 22 [http://www.splitbrain.org/projects/dokuwiki DokuWiki] (e.g. namespaces and 23 Interwiki work the same way). 24 25 It is not aimed at replacing full-featured wiki packages, but offers a 26 lightweight alternative for when you build a website that has to contain a 27 simple wiki. It is very easy to configure and adapt, so it should fulfill most 28 basic wiki requirements. 29 30 Please note that this plugin is in active development. If you want to help and 31 improve it, please contact Nicolas Chambrier (naholyr at yahoo dot fr). 25 32 26 33 == Screenshots == … … 33 40 34 41 The prerequisites for using the `nahoWiki` plugin are: 35 - As the plugin doesn't contain a user management module, the project where you install it must have a table managing authors, or users (whatever the name), and the related Propel class must have a `__toString()` method. Both these conditions are satisfied by the [http://trac.symfony-project.com/trac/wiki/sfGuardPlugin sfGuardPlugin], so installing this plugin is a good choice. 36 - You need the [http://trac.symfony-project.com/trac/wiki/sfMarkdownPlugin sfMarkdownPlugin] which will provide the ability to convert from wiki syntax to XHTML contents. 42 - As the plugin doesn't contain a user management module, the project where 43 you install it must have a table managing authors, or users (whatever the 44 name), and the related Propel class must have a `__toString()` method. Both 45 these conditions are satisfied by the 46 [http://trac.symfony-project.com/trac/wiki/sfGuardPlugin sfGuardPlugin], so 47 installing this plugin is a good choice. 48 - You need the [http://trac.symfony-project.com/trac/wiki/sfMarkdownPlugin 49 sfMarkdownPlugin] which will provide the ability to convert from wiki syntax 50 to XHTML contents. 37 51 38 52 == Installation == … … 40 54 === PEAR Install === 41 55 42 To install the plugin for a symfony project, the usual process is to use the symfony command line: 43 {{{ 44 $ php symfony plugin-install http://plugins.symfony-project.com/nahoWikiplugin 56 To install the plugin for a symfony project, the usual process is to use the 57 symfony command line: 58 {{{ 59 $ php symfony plugin-install http://plugins.symfony-project.com/nahoWikiPlugin 45 60 }}} 46 61 47 62 === SVN Install === 48 63 49 If your project is not under subversion yet, you can simply checkout the plugin in your plugins directory: 50 {{{ 51 $ svn co http://svn.symfony-project.com/plugins/nahoWikiplugin/trunk plugins/nahoWikiplugin 52 }}} 53 54 If your project is under version control, you can use the svn:externals property: 64 If your project is not under subversion yet, you can simply checkout the 65 plugin in your plugins directory: 66 {{{ 67 $ svn co http://svn.symfony-project.com/plugins/nahoWikiPlugin/trunk plugins/nahoWikiPlugin 68 }}} 69 70 If your project is under version control, you can use the svn:externals 71 property: 55 72 {{{ 56 73 $ svn propedit svn:externals plugins … … 58 75 and add the following line: 59 76 {{{ 60 nahoWikiplugin http://svn.symfony-project.com/plugins/nahoWikiplugin/trunk plugins/nahoWikiplugin 61 }}} 62 63 After you installed `nahoWikiplugin` this way, you must copy (or symlink) `plugins/nahoWikiplugin/web` to `web/nahoWikiplugin`. 77 nahoWikiPlugin http://svn.symfony-project.com/plugins/nahoWikiPlugin/trunk 78 }}} 79 80 After you installed `nahoWikiPlugin` this way, you must copy (or symlink) 81 `plugins/nahoWikiPlugin/web` to `web/nahoWikiPlugin`. 64 82 65 83 == General instructions == 66 84 67 Rebuild the model as you are used to, to create the new tables needed by the plugin. 85 Rebuild the model as you are used to, to create the new tables needed by the 86 plugin. 68 87 {{{ 69 88 $ php symfony propel-build-all # Be careful, this command will erase all the existing tables of your model … … 77 96 You can load the included fixtures to start using the forum with test data. 78 97 {{{ 79 $ php symfony propel-load-data frontend plugins/nahoWiki plugin/data/fixtures98 $ php symfony propel-load-data frontend plugins/nahoWikiPlugin/data/fixtures 80 99 }}} 81 100 … … 95 114 == Slots == 96 115 97 The templates of the `nahoWiki` module define some slots that you can use inside your layout: 116 The templates of the `nahoWiki` module define some slots that you can use 117 inside your layout: 98 118 - wiki_page_actions : For the current page actions 99 119 - wiki_page_name : Name of the current page 100 120 - wiki_breadcrumbs : For the wiki breadcrumbs 101 121 102 If you want to insert the actions menu or the breadcrumbs in your layout at the place you exactly want, simply disable the auto-inclusion of it (see app.yml configuration) and include the corresponding slot in your layout. 103 104 Here is an example layout (in this example, options `include_page_actions` and `include_page_name` have been disabled in app.yml): 122 If you want to insert the actions menu or the breadcrumbs in your layout at 123 the place you exactly want, simply disable the auto-inclusion of it (see 124 app.yml configuration) and include the corresponding slot in your layout. 125 126 Here is an example layout (in this example, options `include_page_actions` and 127 `include_page_name` have been disabled in app.yml): 105 128 106 129 {{{ … … 124 147 === Schema customization === 125 148 126 If you install the `sfPropelAlternativeSchemaPlugin`, you can customize this plugin's schema by creating a `nahoWikiPlugin_schema.custom.yml` file under your project's `config/` directory. This allows you to customize the connection name, table names, etc… Refer to the [http://trac.symfony-project.com/wiki/sfPropelAlternativeSchemaPluginsfPropelAlternativeSchemaPlugin README file] for more information. 149 If you install the `sfPropelAlternativeSchemaPlugin`, you can customize this 150 plugin's schema by creating a `nahoWikiPlugin_schema.custom.yml` file under 151 your project's `config/` directory. This allows you to customize the 152 connection name, table names, etc… Refer to the 153 [http://trac.symfony-project.com/wiki/sfPropelAlternativeSchemaPluginsfPropelAlternativeSchemaPlugin README file] for more information. 127 154 128 155 === Extending model, actions, or templates === 129 156 130 If you want to extend a class of the model, just create an empty file `lib/model/nahoWikiClass.php`, which will contain: 157 If you want to extend a class of the model, just create an empty file 158 `lib/model/nahoWikiClass.php`, which will contain: 131 159 {{{ 132 160 <?php … … 139 167 }}} 140 168 141 If you want to extend the actions, the process is similar: create a file named `modules/nahoWiki/actions/actions.class.php` in your app's directory: 169 If you want to extend the actions, the process is similar: create a file named 170 `modules/nahoWiki/actions/actions.class.php` in your app's directory: 142 171 {{{ 143 172 <?php … … 154 183 }}} 155 184 156 To override a template file named `plugins/nahoWikiplugin/modules/nahoWiki/templates/theTemplate.php`, just copy it to `modules/nahoWiki/templates/theTemplate.php` in your app's folder, and then edit the copied file: it will be the one used by Symfony to render the pages. 157 In most cases, you will want to override `_page_actions.php` or `_breadcrumbs.php`, or `_toc.php`. Templates have been smartly exploded, you should be able to customize the rendering with a few efforts. 185 To override a template file named 186 `plugins/nahoWikiplugin/modules/nahoWiki/templates/theTemplate.php`, just copy 187 it to `modules/nahoWiki/templates/theTemplate.php` in your app's folder, and 188 then edit the copied file: it will be the one used by Symfony to render the 189 pages. 190 In most cases, you will want to override `_page_actions.php` or 191 `_breadcrumbs.php`, or `_toc.php`. Templates have been smartly exploded, you 192 should be able to customize the rendering with a few efforts. 158 193 159 194 === Using another Wiki renderer === 160 195 161 The default engine is [http://daringfireball.net/projects/markdown Markdown] (if `sfMarkdownPlugin` is not installed, no conversion at all is done). If you want to use another engine, just override the method `nahoWikiContentPeer::doConvert($content)`. 196 The default engine is [http://daringfireball.net/projects/markdown Markdown] 197 (if `sfMarkdownPlugin` is not installed, no conversion at all is done). If you 198 want to use another engine, just override the method 199 `nahoWikiContentPeer::doConvert($content)`. 162 200 163 201 Create a file named `lib/model/nahoWikiContentPeer.php`: … … 178 216 === app.yml === 179 217 180 Some of the features of the plugin can be altered by configuration. To do so, add some of the following lines to your application's `app.yml`: 218 Some of the features of the plugin can be altered by configuration. To do so, 219 add some of the following lines to your application's `app.yml`: 181 220 182 221 {{{ … … 221 260 === Routing rules === 222 261 223 The plugin comes with the following default rules. You can prevent those routes to be added by disabling the option `routes_register`, and add your own routing rules. 262 The plugin comes with the following default rules. You can prevent those 263 routes to be added by disabling the option `routes_register`, and add 264 your own routing rules. 224 265 225 266 Here are the default rules: … … 260 301 === Look and Feel === 261 302 262 The `nahoWiki` module comes with a default stylesheet. You can choose to use your own stylesheet instead of the default one. To do so, you must create an empty `nahoWiki` module inside your application with just one `config/view.yml` file in it, with the following content: 303 The `nahoWiki` module comes with a default stylesheet. You can choose to use 304 your own stylesheet instead of the default one. To do so, you must create an 305 empty `nahoWiki` module inside your application with just one 306 `config/view.yml` file in it, with the following content: 263 307 264 308 {{{ … … 271 315 === Helpers === 272 316 273 nahoWiki provides a bunch of helpers to help you integrate the wiki in your application. 317 nahoWiki provides a bunch of helpers to help you integrate the wiki in your 318 application. 274 319 275 320 You can insert links to wiki pages, anywhere in your application : … … 295 340 nahoWiki provides basic support for Interwiki. 296 341 297 The main syntax is `[[Key>PageName Title]]`, and it outputs a link to the page "PageName" of the wiki named "Key", preceded by a nice icon telling the user this is an Interwiki link. 298 299 If the file named `web/nahoWikiPlugin/images/interwiki/key.gif` exists (or `.png` or `.jpg`) it will be used, else we use the generic `interwiki.png` [[Image(source:plugins/nahoWikiPlugin/trunk/web/images/interwiki.png, image/x-trac-wiki)]] 300 301 To add a new Interwiki, just create a file named `interwiki.yml` in your app's folder, and add the key you want : 342 The main syntax is `[[Key>PageName Title]]`, and it outputs a link to the page 343 "PageName" of the wiki named "Key", preceded by a nice icon telling the user 344 this is an Interwiki link. 345 346 If the file named `web/nahoWikiPlugin/images/interwiki/key.gif` exists (or 347 `.png` or `.jpg`) it will be used, else we use the generic `interwiki.png` 348 [[Image(source:plugins/nahoWikiPlugin/trunk/web/images/interwiki.png, 349 image/x-trac-wiki)]] 350 351 To add a new Interwiki, just create a file named `interwiki.yml` in your app's 352 folder, and add the key you want : 302 353 303 354 {{{ … … 314 365 Page names support namespaces. 315 366 316 If an internal link points to a unexisting page, it's show to the user, using different models : `internal_link_model` for links to existing pages, `internal_link_broken_model` for links to unexisting pages. 367 If an internal link points to a unexisting page, it's show to the user, using 368 different models : `internal_link_model` for links to existing pages, 369 `internal_link_broken_model` for links to unexisting pages. 317 370 318 371 ==== Namespaces ==== 319 372 320 Namespaces work just the same way than [http://www.splitbrain.org/projects/dokuwiki DokuWiki] 373 Namespaces work just the same way than 374 [http://www.splitbrain.org/projects/dokuwiki DokuWiki] 321 375 322 376 == TODO ==