mantisbt:issue:7075:integration_with_dokuwiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mantisbt:issue:7075:integration_with_dokuwiki [2011/08/15 12:13] – toddpw | mantisbt:issue:7075:integration_with_dokuwiki [2015/02/13 18:11] (current) – Use InterWiki syntax for MantisBT bug links dregad | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Integrating DokuWiki with Mantis ====== | ====== Integrating DokuWiki with Mantis ====== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
===== Disclaimer ===== | ===== Disclaimer ===== | ||
Line 7: | Line 15: | ||
and should work with subsequent versions (modulo bugs). | and should work with subsequent versions (modulo bugs). | ||
It may work with older versions of mantis provided you make the File Changes described below. | It may work with older versions of mantis provided you make the File Changes described below. | ||
+ | ---- | ||
+ | |||
+ | |||
+ | |||
+ | |||
===== Integration Functionality ===== | ===== Integration Functionality ===== | ||
Line 16: | Line 29: | ||
* Adds a Wiki link on the issue view simple/ | * Adds a Wiki link on the issue view simple/ | ||
* Adds a Wiki menu option which maps to the corresponding project Wiki page, or general page in case of "All Projects" | * Adds a Wiki menu option which maps to the corresponding project Wiki page, or general page in case of "All Projects" | ||
- | * Provides a way for Wiki pages to link to Mantis issues, e.g. ~~Mantis:7075~~. | + | * Provides a way for Wiki pages to link to Mantis issues, e.g. [[Mantis>7075]]. |
- | * Correctly manages HTTP Authentication. See (http:// | + | * Correctly manages HTTP Authentication. See ([[mantis> |
+ | |||
+ | |||
===== Tips ===== | ===== Tips ===== | ||
Line 23: | Line 39: | ||
Following are some tips that are of interest to Mantis / DokuWiki integration: | Following are some tips that are of interest to Mantis / DokuWiki integration: | ||
- | * To define a template for all Wiki pages within a namespace, create '' | + | * To define a template for all Wiki pages within a namespace, create '' |
+ | |||
+ | * The Wiki menu links in Mantis are equivalent to internal links for '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | * The View Issue Details Wiki links in Mantis are equivalent to internal links for '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | * How Wiki access levels are determined: The Mantis auth backend included below takes the namespace containing the object being accessed, extracts the 2nd component, and looks it up in a flat list of Mantis projects. If there is a match, that project' | ||
+ | |||
+ | * Another consequence of the simplistic code here is that it fails to adjust when '' | ||
+ | |||
+ | * Rename (if necessary) your projects and subprojects so that all their names are legal [[doku> | ||
* DokuWiki will see groups for each combination of Mantis project and access level that exist for the current user. For example: | * DokuWiki will see groups for each combination of Mantis project and access level that exist for the current user. For example: | ||
Line 106: | Line 137: | ||
(utf8 redeclaration error reference: http:// | (utf8 redeclaration error reference: http:// | ||
+ | |||
==== Authorisation Configuration ==== | ==== Authorisation Configuration ==== | ||
Line 114: | Line 146: | ||
* @VIEWER 1 | * @VIEWER 1 | ||
* @REPORTER 2 | * @REPORTER 2 | ||
+ | * @UPDATER 4 | ||
* @DEVELOPER 8 | * @DEVELOPER 8 | ||
- | * @MANAGER 8 | + | * @MANAGER 16 |
- | * @ADMINISTRATOR 8 | + | * @ADMINISTRATOR 16 |
</ | </ | ||
This will get you started. See the Tips section above for information about per-project group mappings. | This will get you started. See the Tips section above for information about per-project group mappings. | ||
+ | |||
==== Mantis Authentication Backend (Single Sign-On) ==== | ==== Mantis Authentication Backend (Single Sign-On) ==== | ||
Line 248: | Line 282: | ||
function logOff(){ | function logOff(){ | ||
auth_logout(); | auth_logout(); | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Get user data | ||
+ | * (needed for e-mail subscriptions) | ||
+ | * | ||
+ | * @author Martin Arends http:// | ||
+ | */ | ||
+ | function getUserData($user) | ||
+ | { | ||
+ | $data = array(); | ||
+ | | ||
+ | $t_user_id = user_get_id_by_name( $user ); | ||
+ | |||
+ | if (isset($_REQUEST[' | ||
+ | //media | ||
+ | $t_project_name = explode( ':', | ||
+ | } else { | ||
+ | // normal page | ||
+ | $t_project_name = explode( ':', | ||
+ | } | ||
+ | |||
+ | $t_project_id | ||
+ | $t_access_level = access_get_project_level( $t_project_id, | ||
+ | $t_access_level_string | ||
+ | $t_access_level_string_ex = strtoupper( $t_project_name[1] ) . ' | ||
+ | | ||
+ | $data[' | ||
+ | $data[' | ||
+ | $data[' | ||
+ | return $data; | ||
} | } | ||
} | } |
mantisbt/issue/7075/integration_with_dokuwiki.1313424804.txt.gz · Last modified: 2011/08/18 04:24 (external edit)