Extension:SearchLog.php

From Organic Design wiki
Revision as of 01:43, 17 May 2007 by Nad (talk | contribs) (Make a start)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<?php

  1. Extension:SearchLog
Info.svg These are the MediaWiki extensions we're using and/or developing. Please refer to the information on the mediawiki.org wiki for installation and usage details. Extensions here which have no corresponding mediawiki article are either not ready for use or have been superseded. You can also browse our extension code in our local Subversion repository or our GitHub mirror.

{{#Security:*|dev}}{{#Security:view|*}}Template:Php

  1. - Licenced under LGPL (http://www.gnu.org/copyleft/lesser.html)
  2. - Author: User:NadCategory:Extensions created with Template:Extension

if (!defined('MEDIAWIKI')) die('Not an entry point.');

define('SEARCHLOG_VERSION','0.0.1, 2007-05-17');

$wgExtensionCredits['other'][] = array( 'name' => 'SearchLog', 'author' => 'User:Nad', 'description' => 'An example extension made with Extension:SearchLog', 'url' => 'http://www.organicdesign.co.nz/Extension:Example', 'version' => SEARCHLOG_VERSION );

  1. If a search has been posted, log the info

if (isset($_REQUEST['search'])) { if (isset($_REQUEST['go'])) $type = 'go'; else if (isset($_REQUEST['go'])) $type = 'fulltext'; else $type = 'other'; }

?>