Drupal Wiki
From Stadm
Jump to navigationJump to search
Trying to achieve a MediaWiki like interface on Drupal is a little tricky and messy. It looks like there might be some extra steps necessary to achieve steps like adding Categories, linking items, formatting etc. This page will record these issues and Zack will attempt to address each.
Contents
Location
This is currently being tested on the IT drupal installation located at: http://it.eri.ucsb.edu/
- The wiki can be accessed in one of two ways:
- going directly to http://it.eri.ucsb.edu/wiki/
- going to the IT eri website listed above, and clicking "Wiki Home" under the "Wiki" side menu.
Structure/Advanced
Modules
To achieve similar effects to MediaWiki, the Drupal "Wiki" uses the Wikitools and MediaWiki API modules.
- Wikitools creates a form on all blank pages within the wiki subdirectory that builds a node on the contentless page that is being visited.
- MediaWiki API connects directly to the MediaWiki API hosted on mediawiki commons. The API url can be changed by going to the configuration page -> content authoring -> text formats and then the configure link next to MediaWiki API
- This formats any node entries that use the MediaWIki text filter.
- DWiki repairs some of the broken links of the returned text from MediaWiki API.
- Fixes internal links (i.e. links formatted using [[ThisLink]])
- Adds categories to the taxonomies using MediaWiki syntax (i.e. [[Category:ThisCategory]]).
- Builds a custom form to edit each section of a wiki page.
- Makes [edit] links direct to the section editor for that section.
Taxonomy and Categories
Drupal in some ways makes categorizing pages a little easier. Pages are categorized using the terms under the Taxonomy "Categories."
- Categories can be added as links to the "Wiki" sidebar menu, but will automatically appear on the wiki/Categories page (This is the basic Taxonomy view that displays links to all registered terms).
- List of all Pages tagged with term automatically appear on term page (located at wiki/c/categories/(term name)
- "List All Pages" in sidebar is a link to a Page view that contains a table of links to all pages
- Filtered by Content Type = "Wiki Page"
Default Page Creation Location
- This can be configured at "admin/config/search/path/patterns" under "Content Paths" -> "Pattern for all Wiki Page paths"
Blocking Anonymous Users
To block anonymous users, the "block_wiki" context is used.
- If role is Anonymous, and path = wiki or wiki/*
- Hide content
- Results in a green alert message at the top of page "Active context: block_wiki" if conditions are met.
- Still shows page title
Using Wiki
- To view a page:
- Click "List All Pages" under "Wiki" menu in sidebar and locate the page you are looking for on the table or,
- Go to wiki/(page name)
- To add a page:
- Type wiki/"your page name here" after the IT ERI URL
- Edit the "Body" textarea as you like
- If applicable, select checkbox for Category
- Your page URL will automatically become "wiki/(page title)"
- If you would like to put your page at a different location, you can edit the location by clicking URL Path Settings
- Uncheck the box next to "Generate automatic URL alias"
- Type desired location at textfield next to "URL alias"
Bugs/Problems
- Every time a page is added to the wiki, an error message saying "Warning: strpos(): Empty delimiter in wikitools_node_validate() (line 385 of /var/www/vhosts/it.eri.ucsb.edu/sites/all/modules/wikitools/wikitools.module)."
- Likely a bug in wikitools because it is still in beta for Drupal 7.x
- On recent changes, there doesn't seem to be a field for the view that displays the specific change or the person who did it. Currently, the Page, Type, Date and Time of Update, and Original Author are displayed.