Development

Changeset 6325

You must first sign up to be able to contribute.

Changeset 6325

Show
Ignore:
Timestamp:
12/05/07 10:45:02 (11 months ago)
Author:
naholyr
Message:

Initial README and package.xml versions, ready to go now

Files:

Legend:

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

    r6324 r6325  
    1515- Every user has a dedicated page with the list of all his contributions, and an associated discussion page. 
    1616 
    17  
    18  
    19  
    20 0.0.2 (permission and contribution management) 
    21 - Any page can have associated credentials, which will be required to view and/or edit the page and its subpages ("Page:SubPage" is a subpage of "Page"). These page-wide credentials can be managed in a auto-generated admin module. 
    22  
    23 0.0.3 (navigation) 
    24 - A page can display a menu of its subpages with a special tag 
    25 - A page has a menu of the page's sections on its top 
    26 - A special tag provides inner links (links to other pages in the wiki) 
    27  
    28 0.0.4 (configuration) 
    29 - Taking a look around the code to make configurable everything that is not yet configurable in app.yml 
    30 - This must include the choice of the "inner links" tag, the "index menu" tag, and more than anything the choice of the syntax (you must be able to use any other system) 
    31 - Integration of the InterWiki system (configurable, of course) 
    32  
    33 0.0.5 (tools) 
    34 - Refactoring to make some components, slots, helper, etc… to be used anywhere in the project 
    35  
    36 0.0.6 (i18n) 
    37 - Support of alternative languages for a page 
    38  
    39 0.0.7 (interface) 
    40 - It's time to add a pure stylish CSS to that Wink 
    41 - Adding Javascript toolbar to help contributor (must be thought to be configurable as the syntax can be changed) 
    42 - AJAX edition 
    43  
    44 0.0.8 (indexing) 
    45 - Generalization of the indexes to provide indexByTitle and indexByDate 
    46 - Search engine 
    47  
    48 1.0.0 (first public stable release) 
    49 - Bugfixes so I can consider everything is stable. It should not be too hard as I obviously fix bugs step by step Razz 
    50 - Query optimizations 
    51  
    52  
    53  
    54 We can then think about next features like images uploads (that is not so simple as in my sense it MUST provide a quota and resizing system which must be configurable) & co. 
    55  
    56 I'm hesitating about the possibility to add a "state" to a revision, which would be "draft" or "published" : when you don't specify a revision you view the last "published" revision, but you still can edit a "draft" revision until someone tells it's "published" (this field could require some additional credentials). It may be in future releases. 
    57  
    58  
    59  
    60  
    6117You can use it as usual Wiki systems, you can easily add features («Special» pages are in the todo-list and will ease the extension of this plugin in your application), and thanks to helpers and/or components you could even think about using this as a simple CMS ! 
    6218 
     
    7329 - Currently only the Markdown syntax is supported, and this makes the [http://trac.symfony-project.com/trac/wiki/sfMarkdownPlugin sfMarkdownPlugin] a mandatory dependancy. 
    7430 - Your `myUser` class must define a well written `__toString()` method, as the plugin will only store this data (no ID is stored, all the history of a user is based on his nickname given by `__toString()`). If you don't have a user-managerment system, [http://trac.symfony-project.com/trac/wiki/sfGuardPlugin sfGuardPlugin] is a good choice but is not mandatory. 
    75  - If you want to use RSS feeds, you must install the [http://trac.symfony-project.com/trac/wiki/sfFeed2Plugin sfFeed2Plugin]. 
    7631 
    7732== Installation == 
    78   
    79 To install the plugin for a symfony project, the usual process is to use the symfony command line: 
     33 
     34=== Installing the plugin === 
     35 
     36Choose one of the following solutions, depending on your environment and your preferences. 
     37 
     38==== PEAR ==== 
     39 
     40To install the plugin for a symfony project, the usual process is to use the symfony command line requiring up-to-date PEAR installation : 
    8041{{{ 
    81 $ php symfony plugin-install http://plugins.symfony-project.com/sfSimpleForumPlugin 
     42$ symfony plugin-install symfony/nahoWikiPlugin 
    8243}}} 
    8344 
    84 Alternatively, if you don't have PEAR installed, you can download the latest package attached to this plugin's wiki page and extract it under your project's `plugins/` directory. You will also have to copy the contents of the `myproject/plugins/sfSimpleForumPlugin/web/` directory into a `myproject/web/sfSimpleForumPlugin/` directory. 
     45==== Subversion ==== 
     46 
     47To install the plugin from SVN you have numerous options, just check it out (or export if you don't plan to update it later) from `http://svn.symfony-project.com/plugins/nahoWikiPlugin/trunk` : 
     48{{{ 
     49$ svn checkout http://svn.symfony-project.com/plugins/nahoWikiPlugin/trunk plugins/nahoWikiPlugin 
     50}}} 
     51 
     52Note that you can always use the `tags` directory if you want to use a given version. You will always be able to switch from a version to another : 
     53{{{ 
     54// Switch to a specific version (the trunk has a bug or a backward-incompatibility I can't live with) 
     55$ svn switch http://svn.symfony-project.com/plugins/nahoWikiPlugin/tags/the.version.i.want plugins/nahoWikiPlugin 
     56// Switch back to trunk (I'm ready to use it) 
     57$ svn switch http://svn.symfony-project.com/plugins/nahoWikiPlugin/trunk plugins/nahoWikiPlugin 
     58}}} 
     59 
     60If your project is already under subversion, you can very easily use the SVN install with svn:externals 
     61{{{ 
     62$ svn propedit svn:externals plugins 
     63// Add the following line : 
     64nahoWikiPlugin http://svn.symfony-project.com/plugins/nahoWikiPlugin/trunk 
     65}}} 
     66You will be able to switch later by just changing the URL. 
     67 
     68==== Manually ==== 
     69 
     70Alternatively, if you don't have PEAR installed, you can download the latest package attached to this plugin's wiki page and extract it under your project's `plugins/` directory. 
     71 
     72=== Integrating in your application === 
     73 
     74Check the contents of your `web/` folder, it must contains a folder (or a symlink) named `nahoWikiPlugin/`. If not, you will also have to copy the contents of the `plugins/nahoWikiPlugin/web/` directory into a `web/nahoWikiPlugin/` directory (or make a symlink). 
    8575 
    8676Rebuild the model, generate the SQL code for the new tables and insert it into your database: 
     
    9484}}} 
    9585 
    96 You can load the included fixtures to start using the forum with test data. 
    97 {{{ 
    98 $ php symfony propel-load-data frontend plugins\sfSimpleForumPlugin\data\fixtures 
    99 }}} 
    100  
    101 Enable the new `sfSimpleForum`  module in your application, via the `settings.yml` file. 
     86Enable the new `nahoWiki`  module in your application, via the `settings.yml` file. 
    10287{{{ 
    10388// in myproject/apps/frontend/config/settings.yml 
    10489all: 
    10590  .settings: 
    106     enabled_modules:        [default, sfSimpleForum
     91    enabled_modules:        [default, nahoWiki
    10792}}} 
    10893 
    10994Start using the plugin by browsing to the frontend module's default page: 
    11095{{{  
    111 http://myproject/frontend_dev.php/sfSimpleForum 
     96http://myproject/frontend_dev.php/nahoWiki 
    11297}}} 
    11398 
    114 If you want to enable the plugin administration interface, you have to enable two more modules. You can do so in your main application or in a backend application. the following example is for a 'backend' application: 
     99== Slots, Helpers, Components == 
    115100 
    116 {{{ 
    117 // in myproject/apps/backend/config/settings.yml 
    118 all: 
    119   .settings: 
    120     enabled_modules:        [default, sfSimpleForumCategoryAdmin, sfSimpleForumForumAdmin] 
    121 }}} 
    122  
    123 Configure the plugin categories and forums by browsing to the administration modules default page: 
    124 {{{  
    125 http://myproject/backend_dev.php/sfSimpleForumCategoryAdmin 
    126 http://myproject/backend_dev.php/sfSimpleForumForumAdmin 
    127 }}} 
    128  
    129 == Slots == 
    130  
    131 The templates of the `sfSimpleForum` module define some slots that you cna use inside your layout: 
    132   - auto_discovery_link_tag: For the auto discovery links, to be placed in the `<head>` section 
    133   - forum_navigation: For the forum breadcrumb and actions 
    134  
    135 An example layout for a standard display is given below. 
    136  
    137 {{{ 
    138 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    139 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
    140 <head> 
    141  
    142 <?php include_http_metas() ?> 
    143 <?php include_metas() ?> 
    144  
    145 <?php include_title() ?> 
    146 <?php include_slot('auto_discovery_link_tag') ?> 
    147  
    148 <link rel="shortcut icon" href="/favicon.ico" /> 
    149  
    150 </head> 
    151 <body> 
    152  
    153 <div class="sfSimpleForum"> 
    154   <?php include_slot('forum_navigation') ?> 
    155 </div> 
    156  
    157 <?php echo $sf_data->getRaw('sf_content') ?> 
    158  
    159 </body> 
    160 </html> 
    161 }}} 
     101@TODO 
    162102 
    163103== Configuration == 
     
    165105=== Schema customization === 
    166106 
    167 If you install the `sfPropelAlternativeSchemaPlugin`, you can customize this plugin's schema by creating a `sfSimpleForumPlugin_schema.custom.yml` file under your project's `config/` directory. This allows you to customize the connection name, table names, and even foreign class associations. Refer to the [http://trac.symfony-project.com/wiki/sfPropelAlternativeSchemaPluginsfPropelAlternativeSchemaPlugin README file] for more information. 
     107If you install [http://trac.symfony-project.com/wiki/sfPropelAlternativeSchemaPluginsfPropelAlternativeSchemaPlugin `sfPropelAlternativeSchema` plugin], 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, and even foreign class associations. Refer to the [http://trac.symfony-project.com/wiki/sfPropelAlternativeSchemaPluginsfPropelAlternativeSchemaPlugin README file] for more information. 
    168108 
    169109=== app.yml === 
     
    173113{{{ 
    174114all: 
    175   sfSimpleForumPlugin: 
    176     forum_name:             My symfony forum 
    177     display_categories:     true 
    178     use_feeds:              true  # requires sfFeed2Plugin 
    179     count_views:            true  # count each time a topic is viewed. Turn off to increase performance 
    180     max_per_block:          10    # maximum number of links displayed in a block 
    181     include_breadcrumb:     true  # include breadcrumb slot content. Turn off if you don't use the breadcrumb. 
    182     breadcrumb_separator:   ' » ' # separator for breadcrumb trail 
    183     max_per_page:           10    # maximum threads or messages per page 
    184     pages_displayed:        5     # maximum pages displayed by the pager navigation 
    185     feed_max:               10    # maximum messages served by feed 
    186     show_author_details:    false # display number of messages of post authors 
    187     allow_new_topic_outside_forum: true 
    188     display_post_edited_by: true 
     115  nahoWikiPlugin: 
     116    @TODO 
    189117}}} 
    190118 
    191119=== Routing rules === 
    192120 
    193 The plugin doesn't come with any routing rule. However, you can add some of your own to make the URLs look nicer. An example of set of rules could be as follows
     121The plugin comes with the following routing rules
    194122 
    195123{{{ 
    196 forum_home:  
    197   url:   /forum 
    198   param: { module: sfSimpleForum, action: forumList } 
     124@TODO 
     125}}} 
    199126 
    200 forum_latest_messages:  
    201   url:   /forum/latest/:page 
    202   param: { module: sfSimpleForum, action: latestPosts, page: 1 } 
    203   requirements: { page: \d+ } 
    204  
    205 forum_latest_messages_feed:  
    206   url:   /forum/latest/feed 
    207   param: { module: sfSimpleForum, action: latestPostsFeed } 
    208    
    209 forum_forum:  
    210   url:   /forum/:forum_name/:page 
    211   param: { module: sfSimpleForum, action: forum, page: 1 } 
    212   requirements: { page: \d+ } 
    213  
    214 forum_latest_messages_for_forum:  
    215   url:   /forum/:forum_name/latest/:page 
    216   param: { module: sfSimpleForum, action: latestForumPosts, page: 1 } 
    217   requirements: { page: \d+ } 
    218  
    219 forum_latest_messages_for_forum_feed:  
    220   url:   /forum/:forum_name/latest/feed 
    221   param: { module: sfSimpleForum, action: latestForumPostsFeed } 
    222  
    223 forum_topic:  
    224   url:   /forum/topic/:id/:stripped_title/:page 
    225   param: { module: sfSimpleForum, action: topic, page: 1 } 
    226   requirements: { page: \d+ } 
    227  
    228 forum_topic_feed: 
    229   url:   /forum/topic/:id/:stripped_title/feed 
    230   param: { module: sfSimpleForum, action: topicFeed } 
    231  
    232 forum_new_topic: 
    233   url:   /forum/new_topic/:forum_name 
    234   param: { module: sfSimpleForum, action: createTopic } 
    235  
    236 forum_latest_messages_by_user:  
    237   url:   /forum/user/:username/:page 
    238   param: { module: sfSimpleForum, action: latestUserPosts, page: 1 } 
    239   requirements: { page: \d+ } 
    240  
    241 forum_latest_messages_by_user_feed:  
    242   url:   /forum/user/:username/rss 
    243   param: { module: sfSimpleForum, action: latestUserPostsFeed } 
    244    
    245 forum_post:  
    246   url:   /forum_message/:id 
    247   param: { module: sfSimpleForum, action: post } 
    248 }}} 
     127You can add your own routing rules in your `routing.yml` folder. 
    249128 
    250129=== Look and Feel === 
    251130 
    252 The `sfSimpleForum` 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 `sfSimpleForum` module inside your application with just one `config/view.yml` file in it, with the followin content: 
     131The `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: 
    253132 
    254133{{{ 
    255134all: 
    256   stylesheets: [-/sfSimpleForumPlugin/css/default.css, myCustomStylesheet] 
     135  stylesheets: [-/nahoWikiPlugin/css/default.css, myCustomStylesheet] 
    257136}}} 
    258137 
    259138== TODO == 
    260139 
    261  * Authors can edit a message during its first minutes 
    262  * Moderators can edit a message 
    263  * Moderators can move a topic to another forum and a message to another topic 
    264  * Add images to make the default style less ugly 
     140 * Any page can have associated credentials, which will be required to view and/or edit the page and its subpages ("Page:SubPage" is a subpage of "Page"). These page-wide credentials can be managed in a auto-generated admin module. 
     141 * A page can display a menu of its subpages with a special tag 
     142 * A page has a menu of the page's sections on its top 
     143 * A special tag provides inner links (links to other pages in the wiki) 
     144 * Everything must be configurable : special tags, choice of the markup engine, etc... 
     145 * Integration of the InterWiki system (configurable, of course) 
     146 * Make helpers (e.g. for wiki-links) and components (e.g. for a CMS use) 
     147 * Support alternative languages for a page 
     148 * Add a Javascript toolbar to help contributor (depends on the markup engine) 
     149 * AJAX edition 
     150 * Provide the index by title, and index by date 
     151 * Provide the «last changes» action 
    265152 * Search engine 
    266  * Subscribe to a topic by email 
    267  * Make the plugin sfGuard-independent (cf sfSimpleBlogPlugin) 
    268  * Package with other plugins into an application 
     153 * Media uploads 
     154 * Add and manage the states of a page : draft, hidden, public, etc... 
  • plugins/nahoWikiPlugin/trunk/package.xml

    r6324 r6325  
    123123    <max>1.1.0</max> 
    124124   </package> 
    125   </required> 
    126   <optional> 
    127125   <package> 
    128126    <name>sfMarkdownPlugin</name> 
    129127    <channel>pear.symfony-project.com</channel> 
    130128   </package> 
     129  </required> 
     130  <optional> 
    131131   <package> 
    132132    <name>sfGuardPlugin</name>