WeakWiki


modules\forum\forum.module.php

WeakWiki (WeakWiki Forum module: forum.module.php) Copyright (C) 2010 Alexander Lang This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see . Project Home: http://weakwiki.robnet.wmweb.at/ Contact: robbiblubber@robnet.wmweb.at



/********************************************************************************
WeakWiki (WeakWiki Forum module: forum.module.php)
Copyright (C) 2010 Alexander Lang

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this
program; if not, see .

Project Home: http://weakwiki.robnet.wmweb.at/
Contact:      robbiblubber@robnet.wmweb.at
********************************************************************************/



require_once('./lib/modules.library.php');



/** This is class implements the forum module.									*/
class ForumModule extends __Module
{	
	/** Returns the module name.
		@return		Module name.												*/
	public function getName()
	{
		return "forum";
	}
	
	/** Returns the module version.
		@return		Module name.												*/
	public function getVersion()
	{
		return _VERSION;
	}
	
	/** Returns a description of the module.
		@return		Module description.											*/
	public function getDescription()
	{
		return "Forum Module";
	}
	
	/** Returns the module's parse mode.
		@return		Parse mode.													*/
	public function getParseMode()
	{
		return MOD_MODE_PARSE_LINKS;
	}
	
	/** Returns a detail page for the module.
		@return		Module detail page.											*/
	public function getDetails()
	{
		return "forum
WeakWiki Forum Module Version " . $this->getVersion() . "
by Alexander Lang
Copyright (C) 2010 Alexander Lang

"; } /** Method is called when parsing links. @param $input Unparsed text. @return Parsed text. */ public function parseLink($input) { switch($input) { case "@forum": return _WIKI_COMMAND . "?action=forum"; } return $input; } /** Returns links to add to main menu. @return Main menu links. */ public function addToMainMenu() { if(FORUM_MENU_REGISTER) { return "forum | "; } else { return ""; } } /** Adequately reacts to a module query. @return TRUE when module processes the query, otherwise FALSE. */ public function run() { if(isset($_GET['action']) && ($_GET['action'] == "forum")) { include('./modules/forum/forum.include.php'); return true; } return false; } } ?>

WeakWiki