DokuWiki Installer

:

This page assists in the first time installation and configuration of Dokuwiki. More info on this installer is available on it's own documentation page.

DokuWiki uses ordinary files for the storage of wiki pages and other information associated with those pages (e.g. images, search indexes, old revisions, etc). In order to operate successfully DokuWiki must have write access to the directories that hold those files. This installer is not capable of setting up directory permissions. That normally needs to be done directly on a command shell or if you are using hosting, through FTP or your hosting control panel (e.g. cPanel).

This installer will setup your DokuWiki configuration for ACL, which in turn allows administrator login and access to DokuWiki's admin menu for installing plugins, managing users, managing access to wiki pages and alteration of configuration settings. It isn't required for DokuWiki to operate, however it will make Dokuwiki easier to administer.

Experienced users or users with special setup requirements should use these links for details concerning installation instructions and configuration settings.

For security reasons this script will only work with a new and unmodified Dokuwiki installation. You should either re-extract the files from the downloaded package or consult the complete Dokuwiki installation instructions

driven by DokuWiki powered by PHP
Sample Plugins [Mantis Bug Tracker Wiki]

User Tools

Site Tools


mantisbt:plugins_sample

Sample Plugins

Super Cow Powers

This is a very minimal plugin that does nothing but increase your site's Geek Factor.

Directory Structure

mantis/
  plugins/
    Supercow/
      Supercow.php

plugins/Supercow/Supercow.php

<?php
 
class SupercowPlugin extends MantisPlugin {
 
  function register() {
    $this->name        = 'Super Cow Powers';
    $this->description = 'Gives your Mantis installation super cow powers.';
 
    $this->version     = '1.0';
    $this->requires    = array(
      'MantisCore'       => '1.2.0',
    );
 
    $this->author      = 'Fred Smith';
    $this->contact     = 'fredsmith@fredsmith.fsn';
    $this->url         = 'http://fredsmith.fsn';
  }
 
  function init() {
    plugin_event_hook( 'EVENT_PLUGIN_INIT', 'header' );
  }
 
  /**
   * Handle the EVENT_PLUGIN_INIT callback.
   */
  function header() {
    header( 'X-Mantis: This Mantis has super cow powers.' );
  }
 
}

This is a plugin that detects svn:123 and hyperlinks it to the ViewVC web page that contains all the details of the changeset.

plugins/svnlinks/register.php

<?php
 
/**
 * Return plugin details to the API.
 * @return array Plugin details
 */
function plugin_callback_svnlinks_info() {
  return array(
    'name' => 'SVN Links',
    'description' => 'Detects references to SVN changesets and hyperlinks them.',
    'version' => '1.0',
    'author' => 'Victor Boctor',
    'contact' => 'vboctor -at- users.sourceforge.net',
    'url' => 'http://www.mantisbt.org',
  );
}
 
/**
 * Intitialize the plugin.
 */
function plugin_callback_svnlinks_init() {
	plugin_event_hook( 'EVENT_TEXT_LINKS', 'string_display_links' );
}

plugins/svnlinks/events.php

<?php
 
# Configuration:
# $g_plugin_svnlinks_svn_changeset_link = 'http://mantisbt.svn.sourceforge.net/viewvc/mantisbt?view=rev&revision=%s';

/**
 * Handle the EVENT_TEXT_LINKS callback.
 */
function plugin_event_svnlinks_string_display_links( $p_event, $p_string ) {
	$t_svn_changeset_link_format = config_get( 'plugin_svnlinks_svn_changeset_link', '' );
	if ( is_blank( $t_svn_changeset_link_format ) ) {
		return $p_string;
	}
 
	$t_svn_changeset_link = sprintf( $t_svn_changeset_link_format, '\\1' );
 
	$t_replace_with = '<a href="'. $t_svn_changeset_link . '" target="_new">svn:\\1</a>';
 
	return preg_replace( '/svn\:([[:digit:]]+)/i',
						 $t_replace_with,
						 $p_string );
}
mantisbt/plugins_sample.txt · Last modified: 2013/06/21 09:54 by atrol