Development

Changeset 8055

You must first sign up to be able to contribute.

Changeset 8055

Show
Ignore:
Timestamp:
03/23/08 11:09:13 (5 months ago)
Author:
naholyr
Message:

[nahoWikiPlugin] Fixed README

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/nahoWikiPlugin/trunk/README

    r7058 r8055  
    33== Overview == 
    44 
    5 This plugin allows you to embed a wiki within your symfony application with the following features: 
     5This plugin allows you to embed a wiki within your symfony application with  
     6the following features: 
    67  - Create/edit pages with full versionning 
    78  - Basic permissions management 
     
    1819  - A bunch of helpers to provide total integration in your application 
    1920 
    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. 
     21Most features have been inspired from  
     22[http://www.splitbrain.org/projects/dokuwiki DokuWiki] (e.g. namespaces and  
     23Interwiki work the same way). 
     24 
     25It is not aimed at replacing full-featured wiki packages, but offers a  
     26lightweight alternative for when you build a website that has to contain a  
     27simple wiki. It is very easy to configure and adapt, so it should fulfill most  
     28basic wiki requirements. 
     29 
     30Please note that this plugin is in active development. If you want to help and  
     31improve it, please contact Nicolas Chambrier (naholyr at yahoo dot fr). 
    2532 
    2633== Screenshots == 
     
    3340 
    3441The 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. 
    3751 
    3852== Installation == 
     
    4054=== PEAR Install === 
    4155 
    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 
     56To install the plugin for a symfony project, the usual process is to use the  
     57symfony command line: 
     58{{{ 
     59$ php symfony plugin-install http://plugins.symfony-project.com/nahoWikiPlugin 
    4560}}} 
    4661 
    4762=== SVN Install === 
    4863 
    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: 
     64If your project is not under subversion yet, you can simply checkout the  
     65plugin in your plugins directory: 
     66{{{ 
     67$ svn co http://svn.symfony-project.com/plugins/nahoWikiPlugin/trunk plugins/nahoWikiPlugin 
     68}}} 
     69 
     70If your project is under version control, you can use the svn:externals  
     71property: 
    5572{{{ 
    5673$ svn propedit svn:externals plugins 
     
    5875and add the following line: 
    5976{{{ 
    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`. 
     77nahoWikiPlugin http://svn.symfony-project.com/plugins/nahoWikiPlugin/trunk 
     78}}} 
     79 
     80After you installed `nahoWikiPlugin` this way, you must copy (or symlink)  
     81`plugins/nahoWikiPlugin/web` to `web/nahoWikiPlugin`. 
    6482 
    6583== General instructions == 
    6684 
    67 Rebuild the model as you are used to, to create the new tables needed by the plugin. 
     85Rebuild the model as you are used to, to create the new tables needed by the  
     86plugin. 
    6887{{{ 
    6988$ php symfony propel-build-all # Be careful, this command will erase all the existing tables of your model 
     
    7796You can load the included fixtures to start using the forum with test data. 
    7897{{{ 
    79 $ php symfony propel-load-data frontend plugins/nahoWikiplugin/data/fixtures 
     98$ php symfony propel-load-data frontend plugins/nahoWikiPlugin/data/fixtures 
    8099}}} 
    81100 
     
    95114== Slots == 
    96115 
    97 The templates of the `nahoWiki` module define some slots that you can use inside your layout: 
     116The templates of the `nahoWiki` module define some slots that you can use  
     117inside your layout: 
    98118  - wiki_page_actions : For the current page actions 
    99119  - wiki_page_name : Name of the current page 
    100120  - wiki_breadcrumbs : For the wiki breadcrumbs 
    101121 
    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): 
     122If you want to insert the actions menu or the breadcrumbs in your layout at  
     123the place you exactly want, simply disable the auto-inclusion of it (see  
     124app.yml configuration) and include the corresponding slot in your layout. 
     125 
     126Here is an example layout (in this example, options `include_page_actions` and  
     127`include_page_name` have been disabled in app.yml): 
    105128 
    106129{{{ 
     
    124147=== Schema customization === 
    125148 
    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. 
     149If you install the `sfPropelAlternativeSchemaPlugin`, you can customize this  
     150plugin's schema by creating a `nahoWikiPlugin_schema.custom.yml` file under  
     151your project's `config/` directory. This allows you to customize the  
     152connection name, table names, etc… Refer to the  
     153[http://trac.symfony-project.com/wiki/sfPropelAlternativeSchemaPluginsfPropelAlternativeSchemaPlugin README file] for more information. 
    127154 
    128155=== Extending model, actions, or templates === 
    129156 
    130 If you want to extend a class of the model, just create an empty file `lib/model/nahoWikiClass.php`, which will contain: 
     157If you want to extend a class of the model, just create an empty file  
     158`lib/model/nahoWikiClass.php`, which will contain: 
    131159{{{ 
    132160<?php 
     
    139167}}} 
    140168 
    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: 
     169If 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: 
    142171{{{ 
    143172<?php 
     
    154183}}} 
    155184 
    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. 
     185To override a template file named  
     186`plugins/nahoWikiplugin/modules/nahoWiki/templates/theTemplate.php`, just copy  
     187it to `modules/nahoWiki/templates/theTemplate.php` in your app's folder, and  
     188then edit the copied file: it will be the one used by Symfony to render the  
     189pages. 
     190In most cases, you will want to override `_page_actions.php` or  
     191`_breadcrumbs.php`, or `_toc.php`. Templates have been smartly exploded, you  
     192should be able to customize the rendering with a few efforts. 
    158193 
    159194=== Using another Wiki renderer === 
    160195 
    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)`. 
     196The default engine is [http://daringfireball.net/projects/markdown Markdown]  
     197(if `sfMarkdownPlugin` is not installed, no conversion at all is done). If you  
     198want to use another engine, just override the method  
     199`nahoWikiContentPeer::doConvert($content)`. 
    162200 
    163201Create a file named `lib/model/nahoWikiContentPeer.php`: 
     
    178216=== app.yml === 
    179217 
    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`: 
     218Some of the features of the plugin can be altered by configuration. To do so,  
     219add some of the following lines to your application's `app.yml`: 
    181220 
    182221{{{ 
     
    221260=== Routing rules === 
    222261 
    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. 
     262The plugin comes with the following default rules. You can prevent those  
     263routes to be added by disabling the option `routes_register`, and add  
     264your own routing rules. 
    224265 
    225266Here are the default rules: 
     
    260301=== Look and Feel === 
    261302 
    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: 
     303The `nahoWiki` module comes with a default stylesheet. You can choose to use  
     304your own stylesheet instead of the default one. To do so, you must create an  
     305empty `nahoWiki` module inside your application with just one  
     306`config/view.yml` file in it, with the following content: 
    263307 
    264308{{{ 
     
    271315=== Helpers === 
    272316 
    273 nahoWiki provides a bunch of helpers to help you integrate the wiki in your application. 
     317nahoWiki provides a bunch of helpers to help you integrate the wiki in your  
     318application. 
    274319 
    275320You can insert links to wiki pages, anywhere in your application : 
     
    295340nahoWiki provides basic support for Interwiki. 
    296341 
    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 : 
     342The 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  
     344this is an Interwiki link. 
     345 
     346If 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,  
     349image/x-trac-wiki)]] 
     350 
     351To add a new Interwiki, just create a file named `interwiki.yml` in your app's  
     352folder, and add the key you want : 
    302353 
    303354{{{ 
     
    314365Page names support namespaces. 
    315366 
    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. 
     367If an internal link points to a unexisting page, it's show to the user, using  
     368different models : `internal_link_model` for links to existing pages,  
     369`internal_link_broken_model` for links to unexisting pages. 
    317370 
    318371==== Namespaces ==== 
    319372 
    320 Namespaces work just the same way than [http://www.splitbrain.org/projects/dokuwiki DokuWiki] 
     373Namespaces work just the same way than  
     374[http://www.splitbrain.org/projects/dokuwiki DokuWiki] 
    321375 
    322376== TODO ==