Wiki (papaya Module Package)

From PapayaCMS

Jump to: navigation, search

The papaya Wiki is a free (GNU GPL) papaya module package that provides a Wiki to be used within your papaya CMS installation. Most of the wiki markup is compatible with the widespread MediaWiki system.

Note This is the Administration Manual for the papaya Wiki module. If you want to know how to use the Wiki once it's set up, please refer to the papaya Wiki Users' Manual.

The wiki is available in papaya Nightly Builds as of March 3rd, 2011.

The wiki package provides three page modules:

  • The wiki page allows users to read and edit articles and see their version history
  • The wiki index page provides an overview of all pages and categories in the wiki
  • The wiki upload page allows users to upload and manage media files to be used in wiki articles

Additionally, the wiki provides a backend administration modules in which editors or administrators can read and -- if necessary -- delete articles.

Contents

Setting up the database tables

Setting up the Wiki package in the Modules section

In order to use the wiki, you need to create its database tables first. For this task, you will need administrator privileges in the papaya backend. Follow these steps to set up the wiki tables:

  1. Log in to the papaya CMS backend as an administrator.
  2. In the main toolbar, choose Modules from the Administration group. The Administration -- Modules page will be displayed.
  3. If you have upgraded from an earlier papaya CMS version that did not contain the wiki yet, click on Search modules in the page menu. After some time, a message reading 4 modules added (or more than four if you haven't updated in a while) will appear.
  4. In the Packages sidebar on the left, click on the Wiki package. The Package content area will be displayed.
  5. When prompted about missing database tables in the package, click on Create. The database tables for the wiki module will be created.

If the tables have already been created, but you upgraded your papaya CMS version, there's a chance that the table definitions have changed. Click on the plus sign next to Tables in the Package content area. Then click on Check package tables to check whether the tables are up to date. After a while, an icon will appear next to each table: Tables with a checkmark on a green background are up to date, an exclamation mark on an orange background means that the table has not been created, and an exclamation mark on a red background means that the table has to be updated. For an update, click on the table and choose Synchronize from the page menu. Then click on the Synchronize button to synchronize the table with its definition file.

Adding views for the wiki pages

The view for the papaya wiki index page
The output filter template for the papaya wiki index page

After setting up the module package and its database tables, switch to the Views section in the main toolbar's Administration group. To add a view for the wiki page, follow these steps:

  1. In the View area, enter a title of your choice; Wiki page is a reasonable choice. In the Module pull-down menu, choose Standard Wiki Page from the Wiki group.
  2. Click the Add button to create the new view. The View added. message will be displayed.
  3. In the Output filter sidebar on the right, check the empty checkbox next to the html extension. The No XSLT file specified. warning message will be displayed.
  4. In the XSLT stylesheet pull-down menu, choose page_wiki.xsl. Select html as the Link output mode.
  5. Click on Save to save your settings. The Changes saved. message will be displayed.
  6. Click on Add view in the page menu and repeat steps 1-5 for the Wiki Index Page module using the page_wiki_index.xsl template.
  7. Click on Add view again and repeat steps 1-5 one last time for the Wiki Upload Page using the page_wiki_upload.xsl template.

Setting up the wiki pages

After creating the views, you can set up the wiki pages. The following subsections describe how to create and publish each of them.

Setting up the wiki article page

In the papaya CMS backend's main toolbar, select Pages from the Content group. The Content -- Pages page will be displayed.

Select a page in the Pages sidebar on the left to decide where you want your wiki page to reside in the page tree. Click either Add page to create the new page on the same level of the page tree, or Add subpage to create it as a subpage of the currently selected page. In either case, the new page will appear in the page tree.

In the Properties pane of the page settings, enter an appropriate page title and any other data you like, such as meta tags. Click on Save when you're done.

Next, switch to the View pane and select Wiki page from the Wiki folder.

Content settings for the wiki page

Now you can click on the Content pane and edit the page's content. In Table 1, you find a description for each edit field. Field is the name for each field, Description shows the purpose of each field, Type describes the kind of input element; and in Values you will get a hint on expected values.

Table 1: Wiki page content settings
Field Description Type Values
Title Page title (main headline) Input field Non-HTML string
Settings section General settings for the wiki page
Allow anonymous edits? Whether anyone can edit wiki articles (Yes), or only logged-in surfers (No) Radio group Select Yes or No
Index page ID of the wiki index page, for the internal navigation Page ID selector Integer (page ID)
Upload page ID of the upload page, for the internal navigation Page ID selector Integer (page ID)
Show teaser Show an article teaser when no article is selected (Yes), or just an error message (No) Radio group Select Yes or No
Teaser article If Show teaser is set to Yes, you can enter an article title here. Otherwise, a random article teaser will be shown. Input field Non-HTML string
Teaser length (chars) Maximum length of the teaser in characters Input field Integer (default 400)
Teaser length in search results Maximum length of the teaser in search results Input field Integer (default 200)
Media settings section Dimension settings for embedded images
Thumbnail width Default width for image thumbnails when no width is set Input field Integer (default 320)
Thumbnail height Default height for image thumbnails when no height is set Input field Integer (default 0, i.e. aspect ration will be maintained according to width)
Keywords section Keywords for the wiki parser. The parser will always recognize the original English words, but here you can also set localized keywords.
Redirect Keyword for entries that are not articles but redirections Input field Non-HTML string (default Redirect)
Category Keyword for categories Input field Non-HTML string (default Category)
File Keyword for embedded media files Input field Non-HTML string (default File)
Thumbnail Keyword to display an embedded image as a thumbnail Input field Non-HTML string (default thumb)
References Headline for the automatically generated list of references/footnotes Input field Non-HTML string (default References)
Messages section Information, warning and error messages
No article selected Displayed when no article is selected and Show teaser is set to No Input field Non-HTML string
No anonymous editing Error message when Allow anonymous edits is set to No and a non-logged-in user tries it anyway Input field Non-HTML string
Article saved Success message after saving an edited article Input field Non-HTML string
Error creating article Error message when creating a new article failed (usually a database error) Input field Non-HTML string
Error saving article Error message when saving an existing article failed (usually a database error) Input field Non-HTML string
Error: Media file not found Error message when a media file is requested using a File:Filename article name and the file was not found Input field Non-HTML string (use a %s sprintf() placeholder for the file name)
Error: Article locked Error message when an article has been locked by an administrator Input field Non-HTML string
Captions section Captions for links, buttons, menu items et al.
Index Caption for the index page link Input field Non-HTML string (default Index)
Article Caption for the article link (read mode) Input field Non-HTML string (default Article)
Read article Caption for the link to the full article from a teaser Input field Non-HTML string (default Read article)
Table of contents Caption for an article's auto-generated TOC Input field Non-HTML string (default Table of Contents)
Search results Caption for search results Input field Non-HTML string (use a %s sprintf() placeholder for the search term)
Create Caption for the link to create an article Input field Non-HTML string (use a %s sprintf() placeholder for the article title)
Edit Caption for the link to edit the current article (edit mode) Input field Non-HTML string (default Edit)
Versions Caption for the link to view an article's version history (versions mode) Input field Non-HTML string (default Versions)
Comparing versions Caption for the versions mode headline Input field Non-HTML string (use a %s sprintf() placeholder for the article title)
Compare button Caption for the button to compare selected versions Input field Non-HTML string (default Compare selected versions)
Random article Caption for the link to read a random article (random mode) Input field Non-HTML string (default Random article)
Upload Caption for the link to the upload page Input field Non-HTML string (default Upload)
Search article Caption for the button next to the article input field Input field Non-HTML string (default Go)
Preview Caption for the preview button in edit mode Input field Non-HTML string (default Preview)
Save Caption for the save button in edit mode Input field Non-HTML string (default Save article)
Edit article Caption for the edit mode headline Input field Non-HTML string (use a %s sprintf() placeholder for the article title)
File title For File:Filename articles, a table with file information is displayed. Caption for the title row. Input field Non-HTML string (default Title)
File description Caption for the description row in a file information table. Input field Non-HTML string (default Description)
Image size Caption for the image size (pixels) row in a file information table (only when the file is an image). Input field Non-HTML string (default Image size)
File size Caption for the file size (bytes) in a file information table Input field Non-HTML string (default File size)
File MIME type Caption for the MIME type in a file information table Input field Non-HTML string (default MIME type)
Article versions Caption for the versions table in versions mode Input field Non-HTML string (use a %s sprintf() placeholder for the article title)
Version from Caption for the message when reading an old version of an article Input field Non-HTML string (use a %s sprintf() placeholder for the timestamp)
Version Caption for the version column in the versions table Input field Non-HTML string (default Version)
Author Caption for the author column in the versions table Input field Non-HTML string (default Author)
Comment Caption for the comment column in the versions table Input field Non-HTML string (default Comment)
Redirected from Caption to show that an article is a redirection from another entry Input field Non-HTML string (use a %s sprintf() placeholder for the original title)
Redirection to Caption to show that an entry redirects to another article Input field Non-HTML string (use a %s sprintf() placeholder for the redirection target)
Categories Caption for the categories of an article Input field Non-HTML string (default Category)
Subcategories Caption for the subcategories of a category entry Input field Non-HTML string (default Subcategories)

After editing the settings, click on Save to save them. When you check the page using the Preview pane, you should see an error message warning you that no article has been selected.

Finally, you can select Publish page from the page menu, enter a publication message and click on the Publish submit button in the form to make the page publicly available. You might also want to postpone the publishing until all wiki pages are set up because you need to change the index and upload links anyway after you've created these pages.

Setting up the wiki index page

Content settings for the wiki index page

To set up the index page, you can simply follow all steps described in the previous subsection, Setting up the wiki article page. There are only two differences:

  • On the View pane, select Wiki index page instead of Wiki page.
  • On the Content pane there are different fields, described in Table 2.
Table 2: Wiki index page content settings
Field Description Type Values
Title Page title (main headline) Input field Non-HTML string
Settings section General settings
Mode Display mode for the index (all articles or by starting letter) Drop-down menu Select all for all articles or by letter to display a link for each starting letter
Articles per page Maximum number of articles to be displayed on one page; if there are more, paging links will be displayed Input field Integer (default 25)
Categories per page Maximum number of categories to be displayed on one page in category mode; if there are more, paging links will be displayed Input field Integer (default 10)
Number of recent articles The number of articles to be displayed in the Recently modified section Input field Integer (default 15)
Wiki page Page ID of the wiki page that displays the articles Page ID selector Integer (page ID of the wiki page; choose the page created in the previous subsection)
Keywords section Keywords for auto-generated lists
Category Keyword that marks an article as a category, i.e. Category:Title Input field Non-HTML string (default Category)
Captions section Captions for links, buttons, menu items, et al.
Article Caption for the article input field Input field Non-HTML string (default Article)
Search article Caption for the submit button next to the article input field Input field Non-HTML string (default Go)
Categories Caption for the Categories section of the index Input field Non-HTML string (default Categories)
No articles Message to be displayed when the wiki (or current starting letter) contains no articles Input field Non-HTML string (default No articles yet)
No categories Message to be displayed in category view when the wiki contains no categories Input field Non-HTML string (default No categories yet)
Recently modified Caption for the Recently modified view Input field Non-HTML string (default Recently modified)
Articles Caption for the Articles section of the index Input field Non-HTML string (default Articles)
Page Caption for Paging links Input field Non-HTML string (default Page)

Setting up the wiki upload page

Content settings for the Wiki upload page

Again, you can follow the instructions from the Setting up the wiki article page subsection above. Just choose the Wiki upload page view in the View pane and set the content according to Table 3 in the Content pane.

Please note that the upload page can only be used by logged-in surfers due to restrictions in papaya's media database. But usually, you would not want unregistered users to upload files anyway. The navigation in the main article page only shows the upload page link when the current user is logged in, but if an anonymous user happens to hit the upload page directly, an error message will be displayed.

Table 2: Wiki upload page content settings
Field Description Type Values
Title Page title (main headline) Input field Non-HTML string
Text Text to be displayed under the title Text area/rich text field (according to papaya configuration) Any text, including HTML
Upload folder A media database folder to upload media files to Pull-down menu Select a folder for file uploads (it makes sense to create a dedicated folder for the wiki)
Article page ID of the wiki article page Page ID selector Integer (ID of the article page; select the page you have set up in the first subsection of this section)
Captions section Captions for the upload form and other parts of the page
Article Caption for the article input field Input field Non-HTML string (default Article)
Search article Caption for the article input field's submit button Input field Non-HTML string (default Go)
File Caption for the file upload form field Input field Non-HTML string (default Upload file)
File name Caption for the field in which the user can optionally enter an alternate file name Input field Non-HTML string (default Alternate file name)
File title Caption for the title input field Input field Non-HTML string (default Title)
File description Caption for the description text area Input field Non-HTML string (default Description)
Submit button Caption for the upload form's submit button Input field Non-HTML string (default Upload)
Messages section Success, warning, and error messages for the upload process
Success Message for successful uploads Input field Non-HTML string (default Successfully uploaded.)
Success message Verbose upload success message including embedding syntax for the new file Text area Non-HTML string (use a %s sprintf() placeholder for the uploaded file's name)
Login error Error message for anonymous users Input field Non-HTML string (default You need to be logged in.)
Input error Error message for invalid input in the upload form Input field Non-HTML string (default Input error.)
No file error Error message when there is no upload file Input field Non-HTML string (default No file.)
File size error Error message when the uploaded file was too large Input field Non-HTML string (default File too large.)
Partial upload error Error message when only a part of the file could be uploaded. Input field Non-HTML string (default File was only uploaded partially.)
Upload error Other upload errors (including media DB file system privileges) Input field Non-HTML string (default Upload error.)
Media DB error Error with the papaya CMS media DB (e.g. surfer privileges) Input field Non-HTML string (default Media DB error.)
Wiki file error Error when the uploaded file cannot be registered in the wiki's media file tables Input field Non-HTML string (default Wiki file error.)

Using the Wiki administration module

Overview of the Wiki administration with open and active Filter

The wiki package provides a backend administration module that you can use to read articles and to delete them if necessary.

To enter the admin module, click Applications in the Applications group of the backend's main toolbar. The Applications overview page will be displayed. Click on the wiki icon to start the wiki administration once. You can also click on the heart icon next to the application to add the wiki administration to your personal favorites that will be permanently displayed in the Administration group.

When you open the administration, you see the collapsed Filter area and the Articles area on the left. The Articles list provides paging, showing up to 25 articles per page. The icon next to each title indicates the article's current status; see Table 4 for information about each status. Use the Content language links right below the backend's main toolbar to switch between articles in different languages.

Table 4: Article status and their icons in the Wiki administration
Icon Status name Description
Wiki article status editable.png Editable by everyone Article can be edited by anonymous users (unless this is generally prohibited in the Wiki page settings)
Wiki article status loggedin.png Editable by logged-in surfers only Article can only be edited by logged-in surfers
Wiki article status readonly.png Not editable Article is readonly and cannot be edited at all (unless its status is changed again)
Wiki article status locked.png Locked (invisible) Article is hidden and cannot be read
Reading an article in the Wiki administration

Using the article filter

Click on the Plus sign to open the collapsed filter box. Enter any character sequence and click on the Filter button. The Articles list will only display articles that contain (not start with) the character sequence you entered. To display all articles again, click on the Minus sign in the title bar of the filter box. The box will be collapsed and the first page of the complete article list will be displayed.

Reading articles

Click on any article to read it; it will be displayed in plain text mode.

Setting an article's status

Setting an article's status

When an article is selected, you can see a form to set its status above the article text.

Select the appropriate status as described in Table 4 and click on Save to change the status of the current article.

Deleting articles

Confirming the deletion of an article

When an article is selected, you can click on the Delete article button in the page menu to delete the article. For security reasons, you will be asked to confirm the deletion by clicking Delete in a message dialog box.

In other languages