function __construct()
    {
        $CI =& get_instance();
        $CI->load->helper('wikilink');
        $CI->load->library('image');
        $this->reference_wiki = 'local';
        $this->external_wikis = PresetWikis();
        $this->image_uri = '/';
        $this->image_overrides = array();
        $this->ignore_images = FALSE;
        $this->emphasis = array();
        $this->quote_template = 'pull_quote';
        $this->templates = array('pull_quote' => array('<blockquote>
<div>
<img src="/images/prototype/news/quote_open.png" alt="Quote" title="Quote" />
{{1}}
<img src="/images/prototype/news/quote_close.png" alt="Quote" title="Quote" />
<br /><span class="author">{{2}}</span>
</div></blockquote>', true), 'frame' => array('<div class="BlueBox"><h4>{{1}}</h4>{{2}}</div>', true), 'br' => array('<br />', false));
        $this->newline_mode = '';
        $this->multi_line = true;
        $this->enable_headings = true;
        $this->enable_youtube = true;
        $this->enable_mediaplayer = true;
        $this->enable_quickquotes = true;
        $this->enable_ordered_lists = true;
        $this->entities = array('\'' => xml_escape('\''), '"' => xml_escape('"'));
    }
/**
 * @param $Wikiname array/string Wiki information. If aray must contain:
 *	- ['base'] (Base URI of wiki)
 *	- ['type'] (Wiki type: 'mediawiki', 'mediawiki_no_urlrw')
 * @param $Article string Article title in wiki.
 */
function WikiLink($Wikiname, $Article)
{
    if (is_string($Wikiname)) {
        $Wiki = PresetWikis($Wikiname);
        if (FALSE === $Wiki) {
            return '';
        }
    } elseif (is_array($Wikiname)) {
        $Wiki = $Wikiname;
    } else {
        return '';
    }
    $result = $Wiki['base'];
    switch ($Wiki['type']) {
        case 'local':
            // Local web address
            $result .= $Article;
            break;
        case 'mediawiki':
            // MediaWiki with url rewrite
            $result .= 'wiki/' . str_replace(' ', '_', $Article);
            break;
        case 'mediawiki_no_urlrw':
            // MediaWiki without url rewrite
            $result .= 'index.php?title=' . str_replace(' ', '_', $Article);
            break;
        default:
            // Unknown wiki type
            return '';
    }
    return $result;
}