MantisBT: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 3: Line 3:


==Configuration==
==Configuration==
<source lang="bash">
Add following lines in <code>./bugs/config/config_inc.php</code>
# change mantis title
<source lang="php">
sed -i "s/$g_window_title = 'MantisBT'/$g_window_title = 'ChorkeBT'/g" ./bugs/config_defaults_inc.php
# change mantis default title
</source>
$g_window_title          = 'CKi Bugs';
 
<source lang="bash">
# config with media wiki
sed -i "s/$g_wiki_enable = OFF/$g_wiki_enable = ON/g" ./bugs/config_defaults_inc.php
sed -i "s/$g_wiki_engine = ''/$g_wiki_engine = 'mediawiki'/g" ./bugs/config_defaults_inc.php
sed -i "s/$g_wiki_root_namespace = 'mantis'/$g_wiki_root_namespace = 'Bugs'/g" ./bugs/config_defaults_inc.php
sed -i "s/$g_wiki_engine_url = ''/$g_wiki_engine_url = 'http://cdn.chorke.org/wiki/'/g" ./bugs/config_defaults_inc.php
</source>
 
<source lang="bash">
# change database connection
sed -i "s/$g_db_password            = '';/$g_db_password            = 'password';/g" ./bugs/config/config_inc.php
</source>
</source>


Line 27: Line 15:
==Anonymous==
==Anonymous==
  http://cdn.chorke.org/bugs/manage_user_create_page.php
  http://cdn.chorke.org/bugs/manage_user_create_page.php
  Username    : anonymous
  Username    : guest
  Real Name  : <Leave Empty>
  Real Name  : Guest User
  E-mail      : [email protected]
  E-mail      : [email protected]
  Access Level: [viewer|reporter]
  Access Level: [viewer|reporter]
Line 37: Line 25:
<source lang="php">
<source lang="php">
# enable anonymous/guest login
# enable anonymous/guest login
$g_allow_signup          = OFF;
# $g_allow_blank_email    = ON;
$g_allow_anonymous_login  = ON;
$g_allow_anonymous_login  = ON;
$g_anonymous_account      = 'anonymous';
$g_anonymous_account      = 'guest';
</source>
</source>


Line 47: Line 37:
$g_phpMailer_method      = PPHPMAILER_METHOD_SMTP;
$g_phpMailer_method      = PPHPMAILER_METHOD_SMTP;
$g_smtp_host              = 'mail.chorke.org';
$g_smtp_host              = 'mail.chorke.org';
$g_smtp_username          = 'mantis@chorke.org';
$g_smtp_username          = 'bugs@chorke.org';
$g_smtp_password          = 'mantis/password';
$g_smtp_password          = 'bugs/passphrase';
$g_administrator_email    = '[email protected]';
$g_administrator_email    = '[email protected]';
$g_webmaster_email        = '[email protected]';
$g_webmaster_email        = '[email protected]';
$g_from_email            = 'mantis@chorke.org';
$g_from_email            = 'bugs@chorke.org';
$g_from_name              = 'Mantis Bug Tracker';
$g_return_path_email      = '[email protected]';
$g_return_path_email      = '[email protected]';
$g_from_name              = 'Mantis Bug Tracker';
# $g_log_level            = LOG_EMAIL | LOG_EMAIL_REIPIENT | LOG_FILTERING | LOG_AJAX | LOG_DATABASE | LOG_LDAP;
# $g_log_level            = LOG_EMAIL | LOG_EMAIL_REIPIENT | LOG_FILTERING | LOG_AJAX | LOG_DATABASE | LOG_LDAP;
# $g_log_destination      = 'file:/home/chorke/tmp/mantis/mantisbt.log';
# $g_log_destination      = 'file:/home/chorke/tmp/mantis/mantisbt.log';
Line 59: Line 49:


==MediaWiki Plugin==
==MediaWiki Plugin==
<code>./bugs/core/classes/MantisCoreWikiPlugin.class.php</code>
Add following lines in <code>./bugs/config/config_inc.php</code>
<source lang="php">
# enable media wiki plugin
$g_wiki_enable            = ON;
$g_wiki_engine            = 'mediawiki';
$g_wiki_engine_url        = 'http://cdn.chorke.org/wiki/';
$g_wiki_root_namespace    = 'Bugs';
</source>
 
Update <code>MantisCoreMediaWikiPlugin</code> class of <code>./bugs/core/classes/MantisCoreWikiPlugin.class.php</code>


<source lang="php" highlight="24,26,41,52" start="106" line>
<source lang="php" highlight="24,26,41,52" start="106" line>
Line 116: Line 115:
     }
     }
}
}
</source>
==MediaWiki Extension==
This extension is for Mantis databases running on MySQL.Grab the code via git:
<source lang="bash">
cd ./weke/extensions/
git clone https://github.com/tessus/mwExtensionMantis.git Mantis
cd ./../../
</source>
Add the following code at the bottom of your <code>./weke/LocalSettings.php</code>
<source lang="php">
# mantis extensions mysql database access for wiki
require_once( "$IP/extensions/Mantis/Mantis.php" );
$wgMantisConf['DBname']    = 'chorke_appbugs';
$wgMantisConf['DBuser']    = 'chorke_appbugs';
$wgMantisConf['DBpassword'] = 'password';
$wgMantisConf['DBprefix']  = 'mantis_';
$wgMantisConf['Url']        = 'http://cdn.chorke.org/bugs/';
</source>
</source>


==References==
==References==
* [https://www.mediawiki.org/wiki/Extension:Mantis Media Wiki Mantis Extension Installation]
* [https://www.mediawiki.org/wiki/Extension:Mantis Media Wiki Mantis Extension Installation]
* [https://mantisbt.org/forums/viewtopic.php?t=23252 Mantis SMTP Email Server Config]
* [https://www.mediawiki.org/wiki/Manual:Extensions Media Wiki Extension Installation]
* [https://www.mediawiki.org/wiki/Manual:Extensions Media Wiki Extension Installation]
* [https://www.mantisbt.org/wiki/doku.php/mantisbt:enabling_anonymous_access Enabling Anonymous Access]
* [https://www.mantisbt.org/wiki/doku.php/mantisbt:enabling_anonymous_access Enabling Anonymous Access]
* [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight Media Wiki Syntax Highlight]
* [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight Media Wiki Syntax Highlight]
* [http://www.mantisbt.org/wiki/doku.php/mantisbt:issue:7075:integration_with_dokuwiki Integration With Doku Wiki]
* [http://www.mantisbt.org/wiki/doku.php/mantisbt:issue:7075:integration_with_dokuwiki Integration With Doku Wiki]

Latest revision as of 08:19, 24 February 2019

MantisBT makes collaboration with team members & clients easy, fast, and professional. MantisBT is an open source issue tracker that provides a delicate balance between simplicity and power. Users are able to get started in minutes and start managing their projects while collaborating with their teammates and clients effectively. Once you start using it, you will never go back!

Configuration

Add following lines in ./bugs/config/config_inc.php

# change mantis default title
$g_window_title           = 'CKi Bugs';
http://cdn.chorke.org/bugs
user: administrator
pass: root

Anonymous

http://cdn.chorke.org/bugs/manage_user_create_page.php
Username    : guest
Real Name   : Guest User
E-mail      : [email protected]
Access Level: [viewer|reporter]
Enabled     : true
Protected   : true

Add following lines in ./bugs/config/config_inc.php

# enable anonymous/guest login
$g_allow_signup           = OFF;
# $g_allow_blank_email    = ON;
$g_allow_anonymous_login  = ON;
$g_anonymous_account      = 'guest';

SMTP Config

Add following lines in ./bugs/config/config_inc.php

# smtp mailer config
$g_phpMailer_method       = PPHPMAILER_METHOD_SMTP;
$g_smtp_host              = 'mail.chorke.org';
$g_smtp_username          = '[email protected]';
$g_smtp_password          = 'bugs/passphrase';
$g_administrator_email    = '[email protected]';
$g_webmaster_email        = '[email protected]';
$g_from_email             = '[email protected]';
$g_from_name              = 'Mantis Bug Tracker';
$g_return_path_email      = '[email protected]';
# $g_log_level            = LOG_EMAIL | LOG_EMAIL_REIPIENT | LOG_FILTERING | LOG_AJAX | LOG_DATABASE | LOG_LDAP;
# $g_log_destination      = 'file:/home/chorke/tmp/mantis/mantisbt.log';

MediaWiki Plugin

Add following lines in ./bugs/config/config_inc.php

# enable media wiki plugin
$g_wiki_enable            = ON;
$g_wiki_engine            = 'mediawiki';
$g_wiki_engine_url        = 'http://cdn.chorke.org/wiki/';
$g_wiki_root_namespace    = 'Bugs';

Update MantisCoreMediaWikiPlugin class of ./bugs/core/classes/MantisCoreWikiPlugin.class.php

/**
 * Basic MediaWiki support with old-style wiki integration.
 */
class MantisCoreMediaWikiPlugin extends MantisCoreWikiPlugin {
    /**
     * Plugin Registration
     * @return void
     */
    function register() {
        $this->name = 'MantisBT MediaWiki 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' );
        if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) {
            $t_base .= urlencode( project_get_name( $p_project_id ) );
        } else {
            $t_base .= plugin_config_get( 'root_namespace' );
        }
        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' ) ) . '/' . (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 );
    }
}

MediaWiki Extension

This extension is for Mantis databases running on MySQL.Grab the code via git:

cd ./weke/extensions/
git clone https://github.com/tessus/mwExtensionMantis.git Mantis
cd ./../../

Add the following code at the bottom of your ./weke/LocalSettings.php

# mantis extensions mysql database access for wiki
require_once( "$IP/extensions/Mantis/Mantis.php" );
$wgMantisConf['DBname']     = 'chorke_appbugs';
$wgMantisConf['DBuser']     = 'chorke_appbugs';
$wgMantisConf['DBpassword'] = 'password';
$wgMantisConf['DBprefix']   = 'mantis_';
$wgMantisConf['Url']        = 'http://cdn.chorke.org/bugs/';

References