View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0022371 | mantisbt | wiki | public | 2017-02-14 11:02 | 2023-10-31 16:32 |
| Reporter | vendeeglobe | Assigned To | dregad | ||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Product Version | 2.1.0 | ||||
| Target Version | 2.26.0 | Fixed in Version | 2.26.0 | ||
| Summary | 0022371: Support for WackoWiki | ||||
| Description | Adds support for WackoWiki to Wiki Integration. | ||||
| Additional Information | HowTo: https://wackowiki.org/doc/Dev/PatchesHacks/MantisWackoWikiIntegration | ||||
| Tags | No tags attached. | ||||
| Attached Files | wackowiki_integration_mantis2.1.0.patch (4,738 bytes)
diff --git a/config_defaults_inc.php b/config_defaults_inc.php
--- a/config_defaults_inc.php
+++ b/config_defaults_inc.php
@@ -3782,7 +3782,7 @@
/**
* Wiki Engine.
- * Supported engines: 'dokuwiki', 'mediawiki', 'twiki', 'wikka', 'xwiki'
+ * Supported engines: 'dokuwiki', 'mediawiki', 'twiki', 'wackowiki', 'wikka', 'xwiki'
* @global string $g_wiki_engine
*/
$g_wiki_engine = '';
diff --git a/core/classes/MantisCoreWikiPlugin.class.php b/core/classes/MantisCoreWikiPlugin.class.php
--- a/core/classes/MantisCoreWikiPlugin.class.php
+++ b/core/classes/MantisCoreWikiPlugin.class.php
@@ -218,6 +218,65 @@
}
/**
+ * Basic WackoWiki support with old-style wiki integration.
+ */
+class MantisCoreWackowikiPlugin extends MantisCoreWikiPlugin {
+ /**
+ * Plugin Registration
+ * @return void
+ */
+ function register() {
+ $this->name = 'MantisBT WackoWiki Integration';
+ $this->version = '0.1';
+ $this->requires = array(
+ 'MantisCore' => '2.0.0',
+ );
+ }
+
+ /**
+ * Wiki base url
+ *
+ * @param integer $p_project_id A project identifier.
+ * @return string
+ */
+ function base_url( $p_project_id = null ) {
+ $t_base = plugin_config_get( 'engine_url' ) . '';
+
+ $t_namespace = ucfirst( plugin_config_get( 'root_namespace' ) );
+ if( !is_blank( $t_namespace ) ) {
+ $t_base .= urlencode( $t_namespace ) . '/';
+ }
+
+ if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) {
+ $t_base .= urlencode( project_get_name( $p_project_id ) ) . '/';
+ }
+ return $t_base;
+ }
+
+ /**
+ * Wiki link to a bug
+ *
+ * @param integer $p_event Event.
+ * @param integer $p_bug_id A bug identifier.
+ * @return string
+ */
+ function link_bug( $p_event, $p_bug_id ) {
+ return $this->base_url( bug_get_field( $p_bug_id, 'project_id' ) ) . 'Issue' . (int)$p_bug_id;
+ }
+
+ /**
+ * Wiki link to a project
+ *
+ * @param integer $p_event Event.
+ * @param integer $p_project_id A project identifier.
+ * @return string
+ */
+ function link_project( $p_event, $p_project_id ) {
+ return $this->base_url( $p_project_id ) . '';
+ }
+}
+
+/**
* Basic WikkaWiki support with old-style wiki integration.
*/
class MantisCoreWikkaWikiPlugin extends MantisCoreWikiPlugin {
diff --git a/core/wiki_api.php b/core/wiki_api.php
--- a/core/wiki_api.php
+++ b/core/wiki_api.php
@@ -70,6 +70,9 @@
case 'twiki':
plugin_child( 'MantisCoreTwiki' );
break;
+ case 'wackowiki':
+ plugin_child( 'MantisCoreWackowiki' );
+ break;
case 'WikkaWiki':
plugin_child( 'MantisCoreWikkaWiki' );
break;
diff --git a/doc/en-US/Admin_Guide/Admin_Guide.txt b/doc/en-US/Admin_Guide/Admin_Guide.txt
--- a/doc/en-US/Admin_Guide/Admin_Guide.txt
+++ b/doc/en-US/Admin_Guide/Admin_Guide.txt
@@ -3802,6 +3802,8 @@
* twiki: TWiki
+ * wackowiki: WackoWiki
+
* wikka: WikkaWiki
* xwiki: XWiki
diff --git a/doc/en-US/Admin_Guide/html-desktop/index.html b/doc/en-US/Admin_Guide/html-desktop/index.html
--- a/doc/en-US/Admin_Guide/html-desktop/index.html
+++ b/doc/en-US/Admin_Guide/html-desktop/index.html
@@ -1793,7 +1793,9 @@
</div></li><li class="listitem"><div class="para">
<span class="emphasis"><em>twiki</em></span>: <a href="http://twiki.org/">TWiki</a>
</div></li><li class="listitem"><div class="para">
- <span class="emphasis"><em>wikka</em></span>: <a href="http://wikkawiki.org/">WikkaWiki</a>
+ <span class="emphasis"><em>wackowiki</em></span>: <a href="https://wackowiki.org/">WackoWiki</a>
+ </div></li><li class="listitem"><div class="para">
+ <span class="emphasis"><em>wikka</em></span>: <a href="https://wikkawiki.org/">WikkaWiki</a>
</div></li><li class="listitem"><div class="para">
<span class="emphasis"><em>xwiki</em></span>: <a href="http://www.xwiki.org/">XWiki</a>
</div></li></ul></div>
diff --git a/doc/en-US/Admin_Guide/html-single/index.html b/doc/en-US/Admin_Guide/html-single/index.html
--- a/doc/en-US/Admin_Guide/html-single/index.html
+++ b/doc/en-US/Admin_Guide/html-single/index.html
@@ -1793,6 +1793,8 @@
</div></li><li class="listitem"><div class="para">
<span class="emphasis"><em>twiki</em></span>: <a href="http://twiki.org/">TWiki</a>
</div></li><li class="listitem"><div class="para">
+ <span class="emphasis"><em>wackowiki</em></span>: <a href="https://wackowiki.org/">WackoWiki</a>
+ </div></li><li class="listitem"><div class="para">
<span class="emphasis"><em>wikka</em></span>: <a href="http://wikkawiki.org/">WikkaWiki</a>
</div></li><li class="listitem"><div class="para">
<span class="emphasis"><em>xwiki</em></span>: <a href="http://www.xwiki.org/">XWiki</a>
| ||||
| related to | 0029497 | new | Remove WikkaWiki from Wiki Integration. |
|
A updated patch can be found on the HowTo page above. |
|
|
I have no objections to adding this. Would you be able to submit a pull request with your patch ? |
|
|
I create a pull request. |
|
|
The Pull request is available. I tested the patch beforehand and all works as expected. |
|
|
Thanks, will review & merge as time allows. |
|
|
MantisBT: master ecd659f6 2021-06-08 07:38 Committer: dregad Details Diff |
Wiki integration: add support for WackoWiki Fixes 0022371 Signed-off-by: Damien Regad <dregad@mantisbt.org> |
Affected Issues 0022371 |
|
| mod - config_defaults_inc.php | Diff File | ||
| mod - core/classes/MantisCoreWikiPlugin.class.php | Diff File | ||
| mod - core/wiki_api.php | Diff File | ||
| mod - docbook/Admin_Guide/en-US/config/wiki.xml | Diff File | ||