[jbossws-commits] JBossWS SVN: r4799 - in projects/wiki: extensions and 2 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri Oct 19 04:27:40 EDT 2007


Author: heiko.braun at jboss.com
Date: 2007-10-19 04:27:40 -0400 (Fri, 19 Oct 2007)
New Revision: 4799

Added:
   projects/wiki/extensions/htdig/
   projects/wiki/extensions/htdig/EmbedSearch.php
   projects/wiki/extensions/htdig/ExtensionClass.php
   projects/wiki/extensions/htdig/footer.html
   projects/wiki/extensions/htdig/header.html
   projects/wiki/extensions/htdig/htdig.conf
   projects/wiki/extensions/htdig/index.html
   projects/wiki/extensions/htdig/long.html
   projects/wiki/extensions/htdig/nomatch.html
   projects/wiki/extensions/htdig/search.html
   projects/wiki/extensions/htdig/short.html
   projects/wiki/extensions/htdig/syntax.html
   projects/wiki/extensions/htdig/wrapper.html
Modified:
   projects/wiki/LocalSettings.php
   projects/wiki/skins/Devmo.php
Log:
Replace default search with htdig

Modified: projects/wiki/LocalSettings.php
===================================================================
--- projects/wiki/LocalSettings.php	2007-10-19 08:20:22 UTC (rev 4798)
+++ projects/wiki/LocalSettings.php	2007-10-19 08:27:40 UTC (rev 4799)
@@ -156,4 +156,7 @@
 # Graphwiz
 include("extensions/Graphviz.php");
 $wgGraphVizSettings->dotCommand = "/usr/bin/dot";
+
+# htdig
+include("extensions/htdig/EmbedSearch.php");
 ?>

Added: projects/wiki/extensions/htdig/EmbedSearch.php
===================================================================
--- projects/wiki/extensions/htdig/EmbedSearch.php	                        (rev 0)
+++ projects/wiki/extensions/htdig/EmbedSearch.php	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,60 @@
+<?php
+ # To activate the extension, include it at the end from your LocalSettings.php at
+ # with: include("extensions/EmbedURL.php");
+ #
+ # Syntax: (2007-02-17)
+ # <embedurl>http://www.my-url.com/</embedurl>
+ # <embedurl>http://www.my-url.com/{width=640}{height=480}</embedurl>
+ #
+ $wgExtensionFunctions[] = "wfEmbedURL";
+ 
+ function wfEmbedURL() {
+    global $wgParser;
+ 
+    $wgParser->setHook( "embedsearch", "renderEmbedSearch" );
+ }
+ 
+ # The callback function for converting the input text to HTML output
+ function renderEmbedSearch( $input, $params, &$parser ) {
+    global $_GET; 
+    # Building the code
+ 
+    # disable caching
+    $parser->disableCache();
+
+    $pos = strpos($input, "{width=");
+    if ($pos == false) {
+      $url = $input;
+    } else {
+      $url = substr($input, 0, $pos);
+      $width = substr($input, $pos+7);
+      $pos1 = strpos($width, "}");
+      if ($pos1 != false) {
+        $width = substr($width, 0, $pos1);
+      }
+    }
+    $pos = strpos($input, "{height=");
+    if ($pos != false) {
+      $height = substr($input, $pos+8);
+      $pos1 = strpos($height, "}");
+      if ($pos1 != false) {
+        $height = substr($height, 0, $pos1);
+      }
+    }
+ 
+    if ($url == false ) {
+      $url = "http://www.mediawiki.org/wiki/Extension:EmbedURL";
+    }
+    if ($width == false ) {
+      $width = "735";
+    }
+    if ($height == false ) {
+      $height = "650";
+    }
+ 
+    $htdig="http://localhost/cgi-bin/htsearch?config=&restrict=&exclude=&method=and&format=builtin-long&sort=score&words=".$_GET["words"];
+    $output = "<iframe src='".$htdig."' style='width:".$width."px;height:".$height."px;' scrolling='yes' marginwidth='0' marginheight='0' frameborder='0'></iframe>";
+ 
+    return $output;
+ }
+

Added: projects/wiki/extensions/htdig/ExtensionClass.php
===================================================================
--- projects/wiki/extensions/htdig/ExtensionClass.php	                        (rev 0)
+++ projects/wiki/extensions/htdig/ExtensionClass.php	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,481 @@
+<?php
+/*
+ * ExtensionClass.php
+ * 
+ * MediaWiki extension
+ * @author: Jean-Lou Dupont (http://www.bluecortex.com)
+ *
+ * Purpose:  Provides a toolkit for easier Mediawiki
+ *           extension development.
+ *
+ * FEATURES:
+ * - 'singleton' implementation suited for extensions that require single instance
+ * - 'magic word' helper functionality
+ * - limited pollution of global namespace
+ *
+ * Tested Compatibility: MW 1.8.2 (PHP5), 1.9.3, 1.10
+ *
+ * History:
+ * v1.0		Initial availability
+ * v1.01    Small enhancement in processArgList
+ * v1.02    Corrected minor bug
+ * v1.1     Added function 'checkPageEditRestriction'
+ * v1.2     Added 'getArticle' function
+ * ----     Moved to SVN management
+ * v1.3     Added wgExtensionCredits updating upon Special:Version viewing
+ * v1.4     Fixed broken singleton functionality
+ * v1.5		Added automatic registration of hook functions based
+ *          on the definition of an handler in the derived class
+ *          (e.g. if handler 'hArticleSave' exists, then the appropriate
+ *           'ArticleSave' hook is registered)
+ * v1.51    Fixed '$passingStyle' bug (thanks to Joshua C. Lerner)
+ * v1.6     Added 'updateCreditsDescription' helper method.
+ * v1.7		Added 'depth' parameter support: more than 1 class depth can be created.
+ *          Added 'setupTags' method (support for parser tags)
+ *          Enhancement to 'getParam' method
+ *          Added 'formatParams' method
+ * v1.8     Added 'initFirst' parameter
+ * v1.9     Added support for including 'head' scripts and stylesheeets
+ *          in a manner compatible with parser caching functionality.
+ *          (Original idea from [user:Jimbojw]
+ * v1.91    Added check for screening script duplicates in 'addHeadScript'
+ * v1.92    Added optional removal of parameters not listed in template.
+ *
+ */
+$wgExtensionCredits['other'][] = array( 
+	'name'    => 'ExtensionClass',
+	'version' => 'v1.92 $LastChangedRevision: 174 $',
+	'author'  => 'Jean-Lou Dupont', 
+	'url'     => 'http://www.bluecortex.com',
+);
+ 
+class ExtensionClass
+{
+	static $gObj; // singleton instance
+ 
+// List up-to-date with MW 1.10 SVN 21828
+static $hookList = array(
+'ArticlePageDataBefore', 
+'ArticlePageDataAfter', 
+'ArticleAfterFetchContent',
+'ArticleViewRedirect', 
+'ArticleViewHeader',
+'ArticlePurge',
+'ArticleSave', 
+'ArticleInsertComplete',
+'ArticleSaveComplete',
+'MarkPatrolled', 
+'MarkPatrolledComplete', 
+'WatchArticle', 
+'WatchArticleComplete',
+'UnwatchArticle', 
+'UnwatchArticleComplete', 
+'ArticleProtect', 
+'ArticleProtectComplete',
+'ArticleDelete', 
+'ArticleDeleteComplete', 
+'ArticleEditUpdatesDeleteFromRecentchanges',
+'ArticleEditUpdateNewTalk',
+'DisplayOldSubtitle',
+'IsFileCacheable',
+'CategoryPageView',
+'FetchChangesList',
+'DiffViewHeader',
+'AlternateEdit', 
+'EditFormPreloadText', 
+'EditPage::attemptSave', 
+'EditFilter', 
+'EditPage::showEditForm:initial',
+'EditPage::showEditForm:fields',
+'SiteNoticeBefore',
+'SiteNoticeAfter',
+'FileUpload',
+'BadImage', 
+'MagicWordMagicWords', 
+'MagicWordwgVariableIDs',
+'MathAfterTexvc',
+'MessagesPreLoad',
+'LoadAllMessages',
+'OutputPageParserOutput',
+'OutputPageBeforeHTML',
+'AjaxAddScript', 
+'PageHistoryBeforeList',
+'PageHistoryLineEnding',
+'ParserClearState', 
+'ParserBeforeStrip',
+'ParserAfterStrip',
+'ParserBeforeTidy',
+'ParserAfterTidy',
+'ParserBeforeStrip',
+'ParserAfterStrip', 
+'ParserBeforeStrip',
+'ParserAfterStrip', 
+'ParserBeforeInternalParse',
+'InternalParseBeforeLinks', 
+'ParserGetVariableValueVarCache',
+'ParserGetVariableValueTs', 
+'ParserGetVariableValueSwitch',
+'IsTrustedProxy',
+'wgQueryPages', 
+'RawPageViewBeforeOutput', 
+'RecentChange_save',
+'SearchUpdate', 
+'AuthPluginSetup', 
+'LogPageValidTypes',
+'LogPageLogName', 
+'LogPageLogHeader', 
+'LogPageActionText',
+'SkinTemplateTabs', 
+'BeforePageDisplay', 
+'SkinTemplateOutputPageBeforeExec', 
+'PersonalUrls', 
+'SkinTemplatePreventOtherActiveTabs',
+'SkinTemplateTabs', 
+'SkinTemplateBuildContentActionUrlsAfterSpecialPage',
+'SkinTemplateContentActions', 
+'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink',
+'SkinTemplateSetupPageCss',
+'BlockIp', 
+'BlockIpComplete', 
+'BookInformation', 
+'SpecialContributionsBeforeMainOutput',
+'EmailUser', 
+'EmailUserComplete',
+'SpecialMovepageAfterMove',
+'SpecialMovepageAfterMove',
+'SpecialPage_initList',
+'SpecialPageExecuteBeforeHeader',
+'SpecialPageExecuteBeforePage',
+'SpecialPageExecuteAfterPage',
+'PreferencesUserInformationPanel',
+'SpecialSearchNogomatch',
+'ArticleUndelete',
+'UndeleteShowRevision',
+'UploadForm:BeforeProcessing',
+'UploadVerification',
+'UploadComplete',
+'UploadForm:initial',
+'AddNewAccount',
+'AbortNewAccount',
+'UserLoginComplete',
+'UserCreateForm',
+'UserLoginForm',
+'UserLogout',
+'UserLogoutComplete',
+'UserRights',
+/*'SpecialVersionExtensionTypes',*/ // reserved special treatment
+'UnwatchArticle',
+'AutoAuthenticate', 
+'GetFullURL',
+'GetLocalURL',
+'GetInternalURL',
+'userCan',
+'TitleMoveComplete',
+'isValidPassword',
+'UserToggles',
+'GetBlockedStatus',
+'PingLimiter',
+'UserRetrieveNewTalks',
+'UserClearNewTalkNotification',
+'PageRenderingHash',
+'EmailConfirmed',
+'ArticleFromTitle',
+'CustomEditor',
+'UnknownAction',
+/*'LanguageGetMagic', */ // reserved a special treatment in this class 
+'LangugeGetSpecialPageAliases',
+'MonoBookTemplateToolboxEnd',
+'SkinTemplateSetupPageCss',
+'SkinTemplatePreventOtherActiveTabs'
+);
+ 
+	var $className;
+	
+	var $paramPassingStyle;
+	var $ext_mgwords;	
+	
+	// Parameter passing style.
+	const mw_style = 1;
+	const tk_style = 2;
+	
+	public static function &singleton( $mwlist=null ,$globalObjName=null, 
+										$passingStyle = self::mw_style, $depth = 1,
+										$initFirst = false )
+	{
+		// Let's first extract the callee's classname
+		$trace = debug_backtrace();
+		$cname = $trace[$depth]['class'];
+ 
+		// If no globalObjName was given, create a unique one.
+		if ($globalObjName === null)
+			$globalObjName = substr(create_function('',''), 1 );
+		
+		// Since there can only be one extension with a given child class name,
+		// Let's store the $globalObjName in a static array.
+		if (!isset(self::$gObj[$cname]) )
+			self::$gObj[$cname] = $globalObjName; 
+				
+		if ( !isset( $GLOBALS[self::$gObj[$cname]] ) )
+			$GLOBALS[self::$gObj[$cname]] = new $cname( $mwlist, $passingStyle, $depth, $initFirst );
+			
+		return $GLOBALS[self::$gObj[$cname]];
+	}
+	public function ExtensionClass( $mgwords=null, $passingStyle = self::mw_style, 
+									$depth = 1, $initFirst = false )
+	/*
+	 *  $mgwords: array of 'magic words' to subscribe to *if* required.
+	 */
+	{
+		global $wgHooks;
+			
+		if ($passingStyle == null) $passingStyle = self::mw_style; // prevention...
+		$this->paramPassingStyle = $passingStyle;
+		
+		// Let's first extract the callee's classname
+		$trace = debug_backtrace();
+		$this->className= $cname = $trace[$depth]['class'];
+		// And let's retrieve the global object's name
+		$n = self::$gObj[$cname];
+		
+		global $wgExtensionFunctions;
+		
+		// v1.8 feature
+		$initFnc = create_function('',"global $".$n."; $".$n."->setup();");
+		if ($initFirst)
+			 array_unshift(	$wgExtensionFunctions, $initFnc );
+		else $wgExtensionFunctions[] = $initFnc;
+		
+		$this->ext_mgwords = $mgwords;		
+		if (is_array($this->ext_mgwords) )
+			$wgHooks['LanguageGetMagic'][] = array($this, 'getMagic');
+ 
+		// v1.3 feature
+		if ( in_array( 'hUpdateExtensionCredits', get_class_methods($this->className) ) )
+			$wgHooks['SpecialVersionExtensionTypes'][] = array( &$this, 'hUpdateExtensionCredits' );				
+ 
+		// v1.5 feature
+		foreach (self::$hookList as $index => $hookName)
+			if ( in_array( 'h'.$hookName, get_class_methods($this->className) ) )
+				$wgHooks[$hookName][] = array( &$this, 'h'.$hookName );
+	}
+	public function getParamPassingStyle() { return $this->passingStyle; }
+	public function setup()
+	{
+		if (is_array($this->ext_mgwords))
+			$this->setupMagic();
+	}
+	// ================== MAGIC WORD HELPER FUNCTIONS ===========================
+	public function getMagic( &$magicwords, $langCode )
+	{
+		foreach($this->ext_mgwords as $index => $key)
+			$magicwords [$key] = array( 0, $key );
+		return true;
+	}
+	public function setupMagic( )
+	{
+		global $wgParser;
+		foreach($this->ext_mgwords as $index => $key)
+			$wgParser->setFunctionHook( "$key", array( $this, "mg_$key" ) );
+	}
+	public function setupTags( $tagList )
+	{
+		global $wgParser;
+		foreach($tagList as $index => $key)
+			$wgParser->setHook( "$key", array( $this, "tag_$key" ) );
+	}
+	// ================== GENERAL PURPOSE HELPER FUNCTIONS ===========================
+	public function processArgList( $list, $getridoffirstparam=false )
+	/*
+	 * The resulting list contains:
+	 * - The parameters extracted by 'key=value' whereby (key => value) entries in the list
+	 * - The parameters extracted by 'index' whereby ( index = > value) entries in the list
+	 */
+	{
+		if ($getridoffirstparam)   
+			array_shift( $list );
+			
+		// the parser sometimes includes a boggie
+		// null parameter. get rid of it.
+		if (count($list) >0 )
+			if (empty( $list[count($list)-1] ))
+				unset( $list[count($list)-1] );
+		
+		$result = array();
+		foreach ($list as $index => $el )
+		{
+			$t = explode("=", $el);
+			if (!isset($t[1])) 
+				continue;
+			$result[ "{$t[0]}" ] = $t[1];
+			unset( $list[$index] );
+		}
+		if (empty($result)) 
+			return $list;
+		return array_merge( $result, $list );	
+	}
+	public function getParam( &$alist, $key, $index, $default )
+	/*
+	 *  Gets a parameter by 'key' if present
+	 *  or fallback on getting the value by 'index' and
+	 *  ultimately fallback on default if both previous attempts fail.
+	 */
+	{
+		if (array_key_exists($key, $alist) )
+			return $alist[$key];
+		elseif (array_key_exists($index, $alist) && $index!==null )
+			return $alist[$index];
+		else
+			return $default;
+	}
+	public function initParams( &$alist, &$templateElements, $removeNotInTemplate = true )
+	{
+			#var_dump( $alist );
+		// v1.92 feature.
+		if ($removeNotInTemplate)
+			foreach( $templateElements as $index => &$el )
+				if ( !isset($alist[ $el['key'] ]) )
+					unset( $alist[$el['key']] );
+		
+		foreach( $templateElements as $index => &$el )
+			$alist[$el['key']] = $this->getParam( $alist, $el['key'], $el['index'], $el['default'] );
+	}
+	public function formatParams( &$alist , &$template )
+	// look at yuiPanel extension for usage example.
+	// $alist = { 'key' => 'value' ... }
+	{
+		foreach ( $alist as $key => $value )
+			// format the entry.
+			$this->formatParam( $key, $value, $template );
+	}
+	private function formatParam( &$key, &$value, &$template )
+	{
+		$format = $this->getFormat( $key, $template );
+		if ($format !==null )
+		{
+			switch ($format)
+			{
+				case 'bool':   $value = (bool) $value; break; 
+				case 'int':    $value = (int) $value; break;
+				default:
+				case 'string': $value = (string) $value; break;					
+			}			
+		}
+	}
+	public function getFormat( &$key, &$template )
+	{
+		$format = null;
+		foreach( $template as $index => &$el )
+			if ( $el['key'] == $key )
+				$format  = $el['format'];
+			
+		return $format;
+	}
+	public function checkPageEditRestriction( &$title )
+	// v1.1 feature
+	// where $title is a Mediawiki Title class object instance
+	{
+		$proceed = false;
+  
+		$state = $title->getRestrictions('edit');
+		foreach ($state as $index => $group )
+			if ( $group == 'sysop' )
+				$proceed = true;
+		return $proceed;		
+	} 
+	public function getArticle( $article_title )
+	{
+		$title = Title::newFromText( $article_title );
+		  
+		// Can't load page if title is invalid.
+		if ($title == null)	return null;
+		$article = new Article($title);
+ 
+		return $article;	
+	}
+	
+	function isSysop( $user = null ) // v1.5 feature
+	{
+		if ($user == null)
+		{
+			global $wgUser;
+			$user = $wgUser;
+		}	
+		return in_array( 'sysop', $user->getGroups() );
+	}
+	
+	function updateCreditsDescription( &$text ) // v1.6 feature.
+	{
+		global $wgExtensionCredits;
+	
+		foreach ( $wgExtensionCredits[self::thisType] as $index => &$el )
+			if ($el['name']==self::thisName)
+				$el['description'].=$text;	
+	}
+ 
+/*  Add scripts & stylesheets functionality.
+This process must be done in two phases:
+phase 1- encode information related to the required
+         scripts & stylesheets in a 'meta form' in
+		 the parser cache text.
+phase 2- when the page is rendered, extract the meta information
+         and include the information appropriately in the 'head' of the page.		  
+************************************************************************************/
+	static $scriptList;
+	static $scriptsAdded;
+	static $scriptsListed;
+ 
+	function addHeadScript( $st )
+	{
+		if ( !isset($st) ) return;
+		
+		if ( !isset(self::$scriptList) )
+			self::$scriptList[] = $st;
+		elseif	(!in_array($st, self::$scriptList)) 
+			self::$scriptList[] = $st;
+			 
+		self::$scriptsAdded = false;
+		self::$scriptsListed = false;
+	}
+	
+	function hParserAfterTidy( &$parser, &$text )
+	// set the meta information in the parsed 'wikitext'.
+	{
+		if (self::$scriptsListed) return true;
+		self::$scriptsListed = true;
+ 
+		if (!empty(self::$scriptList))
+			foreach(self::$scriptList as $sc)
+				$text .= '<!-- META_KEYWORDS '.base64_encode($sc).' -->'; 
+ 
+		return true;
+	}	
+	function hOutputPageBeforeHTML( &$op, &$text )
+	// This function sifts through 'meta tags' embedded in html comments
+	// and picks out scripts & stylesheet references that need to be put
+	// in the page's HEAD.
+	{
+		// some hooks get called more than once...
+		// In this case, since ExtensionClass provides a 
+		// base class for numerous extensions, then it is very
+		// likely this method will be called more than once;
+		// so, we want to make sure we include the head scripts just once.
+		if (self::$scriptsAdded) return true;
+		self::$scriptsAdded = true;
+		
+		if (preg_match_all(
+        	'/<!-- META_KEYWORDS ([0-9a-zA-Z\\+\\/]+=*) -->/m', 
+        	$text, 
+        	$matches)===false) return true;
+			
+    	$data = $matches[1];
+ 
+	    foreach ($data AS $item) 
+		{
+	        $content = @base64_decode($item);
+	        if ($content) $op->addScript( $content );
+	    }
+	    return true;
+	}
+ 
+} // end class definition.
+?>

Added: projects/wiki/extensions/htdig/footer.html
===================================================================
--- projects/wiki/extensions/htdig/footer.html	                        (rev 0)
+++ projects/wiki/extensions/htdig/footer.html	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,5 @@
+$(PAGEHEADER)
+$(PREVPAGE) $(PAGELIST) $(NEXTPAGE)
+<hr size=1/>
+Powered by <a href="http://www.htdig.org/">ht://Dig</a>
+</body></html>

Added: projects/wiki/extensions/htdig/header.html
===================================================================
--- projects/wiki/extensions/htdig/header.html	                        (rev 0)
+++ projects/wiki/extensions/htdig/header.html	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+	<title>Search results for '$&(WORDS)'</title>
+<style type="text/css">
+// override unwanted main css elements
+body {
+        margin: 0 30px 2em 30px;
+        padding: 0px;   
+        line-height: 140%;
+        font-size: 0.9em;       
+        color: #ffffff;
+}
+body, td, th, h3, input { /* redundant rules for bad browsers  */
+        font-family: verdana, sans-serif;
+        voice-family: "\"}\"";
+        voice-family: inherit;
+}
+body, td, th, h3, input { /* redundant rules for bad browsers  */
+        font-family: verdana, sans-serif;
+        voice-family: "\"}\"";
+        voice-family: inherit;
+}
+
+</style>
+
+</head>
+<body>
+Search results for '$&(LOGICAL_WORDS)'</h2>
+<form method="get" action="$(CGI)">
+<font size="-1">
+<input type="hidden" name="config" value="$&(CONFIG)">
+<input type="hidden" name="restrict" value="$&(RESTRICT)">
+<input type="hidden" name="exclude" value="$&(EXCLUDE)">
+Match: $(METHOD)
+Format: $(FORMAT)
+Sort by: $(SORT)
+<br>
+Refine search:
+<input type="text" size="30" name="words" value="$&(WORDS)">
+<input type="submit" value="Search">
+</font>
+</form>
+<strong>Documents $(FIRSTDISPLAYED) - $(LASTDISPLAYED) of $(MATCHES) matches.
+More <img src="/htdig/star.gif" alt="*">'s indicate a better match.
+</strong>
+<hr noshade size="1">

Added: projects/wiki/extensions/htdig/htdig.conf
===================================================================
--- projects/wiki/extensions/htdig/htdig.conf	                        (rev 0)
+++ projects/wiki/extensions/htdig/htdig.conf	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,203 @@
+#
+# Example config file for ht://Dig.
+#
+# This configuration file is used by all the programs that make up ht://Dig.
+# Please refer to the attribute reference manual for more details on what
+# can be put into this file.  (http://www.htdig.org/confindex.html)
+# Note that most attributes have very reasonable default values so you
+# really only have to add attributes here if you want to change the defaults.
+#
+# What follows are some of the common attributes you might want to change.
+#
+
+#
+# Specify where the database files need to go.  Make sure that there is
+# plenty of free disk space available for the databases.  They can get
+# pretty big.
+#
+database_dir:		/var/lib/htdig
+
+#
+# Define common_dir, which is used in several of the examples.
+#
+common_dir:     /usr/share/htdig
+
+#
+# Disable the translation of the ISO Latin 1 SGML entities from the
+# documents into upper end 8-bit characters in the database,
+# and then back to the Latin 1 SGML entities in htsearch results.
+#
+translate_latin1:	false
+
+#
+# This specifies the URL where the robot (htdig) will start.  You can specify
+# multiple URLs here.  Just separate them by some whitespace.
+# The example here will cause the ht://Dig homepage and related pages to be
+# indexed.
+# You could also index all the URLs in a file like so:
+# start_url:	       `${common_dir}/start.url`
+#
+start_url:		http://localhost/mediawiki/index.php?title=JBossWS
+
+#
+# This attribute limits the scope of the indexing process.  The default is to
+# set it to the same as the start_url above.  This way only pages that are on
+# the sites specified in the start_url attribute will be indexed and it will
+# reject any URLs that go outside of those sites.
+#
+# Keep in mind that the value for this attribute is just a list of string
+# patterns. As long as URLs contain at least one of the patterns it will be
+# seen as part of the scope of the index.
+#
+#limit_urls_to:		${start_url}
+limit_urls_to:         http://localhost/
+
+#
+# This attribute is used for compressing the database.  The default is to
+# set it to the same as the limit_urls_to above, plus some common endings.
+#
+# Keep in mind that this list should be short.  If your  start_url  is a very
+# long list of URLs, it may be wise to replace it with something like
+# http://www.  or comment this out and use the compiled-in default.
+#
+common_url_parts:	${limit_urls_to} .html .htm .shtml .php
+
+#
+# If there are particular pages that you definitely do NOT want to index, you
+# can use the exclude_urls attribute.  The value is a list of string patterns.
+# If a URL matches any of the patterns, it will NOT be indexed.  This is
+# useful to exclude things like virtual web trees or database accesses.  By
+# default, all CGI URLs will be excluded.  (Note that the /cgi-bin/ convention
+# may not work on your web server.  Check the  path prefix used on your web
+# server.)
+#
+exclude_urls:		/cgi-bin/ .cgi printable=yes Image:
+
+#
+# Since ht://Dig does not (and cannot) parse every document type, this 
+# attribute is a list of strings (extensions) that will be ignored during 
+# indexing. These are *only* checked at the end of a URL, whereas 
+# exclude_url patterns are matched anywhere.
+#
+# Also keep in mind that while other attributes allow regex, these must be 
+# actual strings.
+#
+bad_extensions:		.wav .gz .z .sit .au .zip .tar .hqx .exe .com .gif \
+	.jpg .jpeg .aiff .class .map .ram .tgz .bin .rpm .mpg .mov .avi .css
+
+#
+# The string htdig will send in every request to identify the robot.  Change
+# this to your email address.
+#
+maintainer:		root at localhost
+
+#
+# The excerpts that are displayed in long results rely on stored information
+# in the index databases.  The compiled default only stores 512 characters of
+# text from each document (this excludes any HTML markup...)  If you plan on
+# using the excerpts you probably want to make this larger.  The only concern
+# here is that more disk space is going to be needed to store the additional
+# information.  Since disk space is cheap (! :-)) you might want to set this
+# to a value so that a large percentage of the documents that you are going
+# to be indexing are stored completely in the database.  At SDSU we found
+# that by setting this value to about 50k the index would get 97% of all
+# documents completely and only 3% was cut off at 50k.  You probably want to
+# experiment with this value.
+# Note that if you want to set this value low, you probably want to set the
+# excerpt_show_top attribute to false so that the top excerpt_length characters
+# of the document are always shown.
+#
+max_head_length:	10000
+
+#
+# To limit network connections, ht://Dig will only pull up to a certain limit
+# of bytes. This prevents the indexing from dying because the server keeps
+# sending information. However, several FAQs happen because people have files
+# bigger than the default limit of 100KB. This sets the default a bit higher.
+# (see <http://www.htdig.org/FAQ.html> for more)
+#
+max_doc_size:		200000
+
+#
+# Most people expect some sort of excerpt in results. By default, if the 
+# search words aren't found in context in the stored excerpt, htsearch shows 
+# the text defined in the no_excerpt_text attribute:
+# (None of the search words were found in the top of this document.)
+# This attribute instead will show the top of the excerpt.
+#
+no_excerpt_show_top:	true
+
+#
+# Depending on your needs, you might want to enable some of the fuzzy search
+# algorithms.  There are several to choose from and you can use them in any
+# combination you feel comfortable with.  Each algorithm will get a weight
+# assigned to it so that in combinations of algorithms, certain algorithms get
+# preference over others.  Note that the weights only affect the ranking of
+# the results, not the actual searching.
+# The available algorithms are:
+#	accents
+#	exact
+#	endings
+#	metaphone
+#	prefix
+#	regex
+#	soundex
+#	speling [sic]
+#	substring
+#	synonyms
+# By default only the "exact" algorithm is used with weight 1.
+# Note that if you are going to use the endings, metaphone, soundex, accents,
+# or synonyms algorithms, you will need to run htfuzzy to generate
+# the databases they use.
+#
+search_algorithm:	exact:1 synonyms:0.5 endings:0.1
+
+#
+# The following are the templates used in the builtin search results
+# The default is to use compiled versions of these files, which produces
+# slightly faster results. However, uncommenting these lines makes it
+# very easy to change the format of search results.
+# See <http://www.htdig.org/hts_templates.html> for more details.
+#
+# template_map: Long long ${common_dir}/long.html \
+#		Short short ${common_dir}/short.html
+# template_name: long
+
+#
+# The following are used to change the text for the page index.
+# The defaults are just boring text numbers.  These images spice
+# up the result pages quite a bit.  (Feel free to do whatever, though)
+#
+next_page_text:		<img src="/htdig/buttonr.gif" border="0" align="middle" width="30" height="30" alt="next">
+no_next_page_text:
+prev_page_text:		<img src="/htdig/buttonl.gif" border="0" align="middle" width="30" height="30" alt="prev">
+no_prev_page_text:
+page_number_text:	'<img src="/htdig/button1.gif" border="0" align="middle" width="30" height="30" alt="1">' \
+			'<img src="/htdig/button2.gif" border="0" align="middle" width="30" height="30" alt="2">' \
+			'<img src="/htdig/button3.gif" border="0" align="middle" width="30" height="30" alt="3">' \
+			'<img src="/htdig/button4.gif" border="0" align="middle" width="30" height="30" alt="4">' \
+			'<img src="/htdig/button5.gif" border="0" align="middle" width="30" height="30" alt="5">' \
+			'<img src="/htdig/button6.gif" border="0" align="middle" width="30" height="30" alt="6">' \
+			'<img src="/htdig/button7.gif" border="0" align="middle" width="30" height="30" alt="7">' \
+			'<img src="/htdig/button8.gif" border="0" align="middle" width="30" height="30" alt="8">' \
+			'<img src="/htdig/button9.gif" border="0" align="middle" width="30" height="30" alt="9">' \
+			'<img src="/htdig/button10.gif" border="0" align="middle" width="30" height="30" alt="10">'
+#
+# To make the current page stand out, we will put a border around the
+# image for that page.
+#
+no_page_number_text:	'<img src="/htdig/button1.gif" border="2" align="middle" width="30" height="30" alt="1">' \
+			'<img src="/htdig/button2.gif" border="2" align="middle" width="30" height="30" alt="2">' \
+			'<img src="/htdig/button3.gif" border="2" align="middle" width="30" height="30" alt="3">' \
+			'<img src="/htdig/button4.gif" border="2" align="middle" width="30" height="30" alt="4">' \
+			'<img src="/htdig/button5.gif" border="2" align="middle" width="30" height="30" alt="5">' \
+			'<img src="/htdig/button6.gif" border="2" align="middle" width="30" height="30" alt="6">' \
+			'<img src="/htdig/button7.gif" border="2" align="middle" width="30" height="30" alt="7">' \
+			'<img src="/htdig/button8.gif" border="2" align="middle" width="30" height="30" alt="8">' \
+			'<img src="/htdig/button9.gif" border="2" align="middle" width="30" height="30" alt="9">' \
+			'<img src="/htdig/button10.gif" border="2" align="middle" width="30" height="30" alt="10">'
+
+# local variables:
+# mode: text
+# eval: (if (eq window-system 'x) (progn (setq font-lock-keywords (list '("^#.*" . font-lock-keyword-face) '("^[a-zA-Z][^ :]+" . font-lock-function-name-face) '("[+$]*:" . font-lock-comment-face) )) (font-lock-mode)))
+# end:

Added: projects/wiki/extensions/htdig/index.html
===================================================================
--- projects/wiki/extensions/htdig/index.html	                        (rev 0)
+++ projects/wiki/extensions/htdig/index.html	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>ht://Dig WWW Search</title>
+
+<style type="text/css">
+// override unwanted main css elements
+body {
+        margin: 0 30px 2em 30px;
+        padding: 0px;   
+        line-height: 140%;
+        font-size: 0.9em;       
+        color: #ffffff;
+}
+body, td, th, h3, input { /* redundant rules for bad browsers  */
+        font-family: verdana, sans-serif;
+        voice-family: "\"}\"";
+        voice-family: inherit;
+}
+body, td, th, h3, input { /* redundant rules for bad browsers  */
+        font-family: verdana, sans-serif;
+        voice-family: "\"}\"";
+        voice-family: inherit;
+}
+
+</style>
+
+</head>
+<body>
+<h1>
+<a href="http://www.htdig.org"><IMG SRC="/htdig/htdig.gif" align="bottom" alt="ht://Dig" border="0"></a>
+WWW Site Search</h1>
+<hr noshade size="1">
+This search will allow you to search the contents of
+all the publicly available WWW documents at this site.
+<br>
+<p>
+<form method="post" action="/cgi-bin/htsearch">
+<font size="-1">
+Match: <select name="method">
+<option value="and">All
+<option value="or">Any
+<option value="boolean">Boolean
+</select>
+Format: <select name="format">
+<option value="builtin-long">Long
+<option value="builtin-short">Short
+</select>
+Sort by: <select name="sort">
+<option value="score">Score
+<option value="time">Time
+<option value="title">Title
+<option value="revscore">Reverse Score
+<option value="revtime">Reverse Time
+<option value="revtitle">Reverse Title
+</select>
+</font>
+<input type="hidden" name="config" value="htdig">
+<input type="hidden" name="restrict" value="">
+<input type="hidden" name="exclude" value="">
+<br>
+Search:
+<input type="text" size="30" name="words" value="">
+<input type="submit" value="Search">
+</form>
+<hr noshade size="4">
+<a href="http://www.htdig.org/">
+Powered by ht://Dig $(VERSION)</a>
+</body>
+</html>
+

Added: projects/wiki/extensions/htdig/long.html
===================================================================
--- projects/wiki/extensions/htdig/long.html	                        (rev 0)
+++ projects/wiki/extensions/htdig/long.html	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,6 @@
+<dl><dt><strong><a href="$&(URL)">$&(TITLE)</a></strong>$(STARSLEFT)
+</dt><dd>$(EXCERPT)<br>
+<em><a href="$&(URL)">$&(URL)</a></em>
+<font size="-1">$(MODIFIED), $(SIZE) bytes</font>
+</dd></dl>
+

Added: projects/wiki/extensions/htdig/nomatch.html
===================================================================
--- projects/wiki/extensions/htdig/nomatch.html	                        (rev 0)
+++ projects/wiki/extensions/htdig/nomatch.html	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+	<title>No match for '$&(LOGICAL_WORDS)'</title>
+<style type="text/css">
+// override unwanted main css elements
+body {
+        margin: 0 30px 2em 30px;
+        padding: 0px;   
+        line-height: 140%;
+        font-size: 0.9em;       
+        color: #ffffff;
+}
+body, td, th, h3, input { /* redundant rules for bad browsers  */
+        font-family: verdana, sans-serif;
+        voice-family: "\"}\"";
+        voice-family: inherit;
+}
+body, td, th, h3, input { /* redundant rules for bad browsers  */
+        font-family: verdana, sans-serif;
+        voice-family: "\"}\"";
+        voice-family: inherit;
+}
+
+</style>
+
+</head>
+<body>
+Search results</h1>
+<hr size=1/>
+<h2>No matches were found for '$&(LOGICAL_WORDS)'</h2>
+<p>
+Check the spelling of the search word(s) you used.
+If the spelling is correct and you only used one word,
+try using one or more similar search words with "<strong>Any</strong>."
+</p><p>
+If the spelling is correct and you used more than one
+word with "<strong>Any</strong>," try using one or more similar search
+words with "<strong>Any</strong>."</p><p>
+If the spelling is correct and you used more than one
+word with "<strong>All</strong>," try using one or more of the same words
+with "<strong>Any</strong>."</p>
+<hr noshade size="1">
+<form method="get" action="$(CGI)">
+<font size="-1">
+<input type="hidden" name="config" value="$&(CONFIG)">
+<input type="hidden" name="restrict" value="$&(RESTRICT)">
+<input type="hidden" name="exclude" value="$&(EXCLUDE)">
+Match: $(METHOD)
+Format: $(FORMAT)
+Sort by: $(SORT)
+<br>
+Refine search:
+<input type="text" size="30" name="words" value="$&(WORDS)">
+<input type="submit" value="Search">
+</font>
+</form>
+</body></html>

Added: projects/wiki/extensions/htdig/search.html
===================================================================
--- projects/wiki/extensions/htdig/search.html	                        (rev 0)
+++ projects/wiki/extensions/htdig/search.html	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>ht://Dig WWW Search</title>
+
+<style type="text/css">
+// override unwanted main css elements
+body {
+        margin: 0 30px 2em 30px;
+        padding: 0px;   
+        line-height: 140%;
+        font-size: 0.9em;       
+        color: #ffffff;
+}
+body, td, th, h3, input { /* redundant rules for bad browsers  */
+        font-family: verdana, sans-serif;
+        voice-family: "\"}\"";
+        voice-family: inherit;
+}
+body, td, th, h3, input { /* redundant rules for bad browsers  */
+        font-family: verdana, sans-serif;
+        voice-family: "\"}\"";
+        voice-family: inherit;
+}
+
+</style>
+
+</head>
+<body>
+<h1>
+<a href="http://www.htdig.org"><IMG SRC="/htdig/htdig.gif" align="bottom" alt="ht://Dig" border="0"></a>
+WWW Site Search</h1>
+<hr noshade size="1">
+This search will allow you to search the contents of
+all the publicly available WWW documents at this site.
+<br>
+<p>
+<form method="post" action="/cgi-bin/htsearch">
+<font size="-1">
+Match: <select name="method">
+<option value="and">All
+<option value="or">Any
+<option value="boolean">Boolean
+</select>
+Format: <select name="format">
+<option value="builtin-long">Long
+<option value="builtin-short">Short
+</select>
+Sort by: <select name="sort">
+<option value="score">Score
+<option value="time">Time
+<option value="title">Title
+<option value="revscore">Reverse Score
+<option value="revtime">Reverse Time
+<option value="revtitle">Reverse Title
+</select>
+</font>
+<input type="hidden" name="config" value="htdig">
+<input type="hidden" name="restrict" value="">
+<input type="hidden" name="exclude" value="">
+<br>
+Search:
+<input type="text" size="30" name="words" value="">
+<input type="submit" value="Search">
+</form>
+<hr noshade size="4">
+<a href="http://www.htdig.org/">
+Powered by ht://Dig $(VERSION)</a>
+</body>
+</html>
+

Added: projects/wiki/extensions/htdig/short.html
===================================================================
--- projects/wiki/extensions/htdig/short.html	                        (rev 0)
+++ projects/wiki/extensions/htdig/short.html	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1 @@
+$(STARSRIGHT) <strong><a href="$&(URL)">$&(TITLE)</a></strong><br>

Added: projects/wiki/extensions/htdig/syntax.html
===================================================================
--- projects/wiki/extensions/htdig/syntax.html	                        (rev 0)
+++ projects/wiki/extensions/htdig/syntax.html	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html><head><title>Error in Boolean search for '$&(WORDS)'</title></head>
+<body bgcolor="#eef7ff">
+<h1><img src="/htdig/htdig.gif" alt="ht://Dig">
+Error in Boolean search for '$&(LOGICAL_WORDS)'</h1>
+<hr noshade size="4">
+Boolean expressions need to be 'correct' in order for the search
+system to use them.
+The expression you entered has errors in it.<p>
+Examples of correct expressions are: <strong>cat and dog</strong>, <strong>cat
+not dog</strong>, <strong>cat or (dog not nose)</strong>.<br>Note that
+the operator <strong>not</strong> has the meaning of 'without'.
+<blockquote><strong>
+$(SYNTAXERROR)
+</strong></blockquote>
+<hr noshade size="4">
+<form method="get" action="$(CGI)">
+<font size="-1">
+<input type="hidden" name="config" value="$&(CONFIG)">
+<input type="hidden" name="restrict" value="$&(RESTRICT)">
+<input type="hidden" name="exclude" value="$&(EXCLUDE)">
+Match: $(METHOD)
+Format: $(FORMAT)
+Sort: $(SORT)
+<br>
+Refine search:
+<input type="text" size="30" name="words" value="$&(WORDS)">
+<input type="submit" value="Search">
+</font>
+</form>
+<hr noshade size="4">
+<a href="http://www.htdig.org/">
+<img src="/htdig/htdig.gif" border="0" alt="">ht://Dig $(VERSION)</a>
+</body></html>
+

Added: projects/wiki/extensions/htdig/wrapper.html
===================================================================
--- projects/wiki/extensions/htdig/wrapper.html	                        (rev 0)
+++ projects/wiki/extensions/htdig/wrapper.html	2007-10-19 08:27:40 UTC (rev 4799)
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html><head>
+<title>Search results for '$&(WORDS)'</title>
+
+<style type="text/css">
+// override unwanted main css elements
+body {
+        margin: 0 30px 2em 30px;
+        padding: 0px;   
+        line-height: 140%;
+        font-size: 0.9em;       
+        color: #ffffff;
+}
+body, td, th, h3, input { /* redundant rules for bad browsers  */
+        font-family: verdana, sans-serif;
+        voice-family: "\"}\"";
+        voice-family: inherit;
+}
+body, td, th, h3, input { /* redundant rules for bad browsers  */
+        font-family: verdana, sans-serif;
+        voice-family: "\"}\"";
+        voice-family: inherit;
+}
+
+</style>
+
+</head>
+<body>
+Search results for '$&(LOGICAL_WORDS)'</h2>
+<hr noshade size="1">
+<form method="get" action="$(CGI)">
+<font size="-1">
+<input type="hidden" name="config" value="$&(CONFIG)">
+<input type="hidden" name="restrict" value="$&(RESTRICT)">
+<input type="hidden" name="exclude" value="$&(EXCLUDE)">
+Match: $(METHOD)
+Format: $(FORMAT)
+Sort by: $(SORT)
+<br>
+Refine search:
+<input type="text" size="30" name="words" value="$&(WORDS)">
+<input type="submit" value="Search">
+</font>
+</form>
+<hr noshade size="1">
+<strong>Documents $(FIRSTDISPLAYED) - $(LASTDISPLAYED) of $(MATCHES) matches.
+More <img src="/htdig/star.gif" alt="*">'s indicate a better match.
+</strong>
+<hr noshade size="1">
+$(HTSEARCH_RESULTS)
+$(PAGEHEADER)
+$(PREVPAGE) $(PAGELIST) $(NEXTPAGE)
+<hr noshade size="1">
+<a href="http://www.htdog.org">ht://Dig $(VERSION)</a>
+</body></html>

Modified: projects/wiki/skins/Devmo.php
===================================================================
--- projects/wiki/skins/Devmo.php	2007-10-19 08:20:22 UTC (rev 4798)
+++ projects/wiki/skins/Devmo.php	2007-10-19 08:27:40 UTC (rev 4799)
@@ -100,18 +100,15 @@
 	</div>
         
         <!-- search box -->
-		 <form name="searchform" action="<?php $this->text('searchaction') ?>" id="searchform">
-	      <input id="searchInput" name="search" type="text"
-	        <?php if($this->haveMsg('accesskey-search')) {
-	          ?>accesskey="<?php $this->msg('accesskey-search') ?>"<?php }
-	        if( isset( $this->data['search'] ) ) {
-	          ?> value="<?php $this->text('search') ?>"<?php } ?> />
-	      <input type='submit' name="go" class="searchButton" id="searchGoButton"
-	        value="<?php $this->msg('go') ?>"
-	        />&nbsp;<input type='submit' name="fulltext"
-	        class="searchButton"
-	        value="<?php $this->msg('search') ?>" />
-	    </form>
+		 <form name="searchform" action="http://localhost/mediawiki/index.php" id="searchform" method="GET">
+			<input type="hidden" name="title" value="Search"/>
+			<input type="hidden" name="config" value="">
+			<input type="hidden" name="restrict" value="">
+			<input type="hidden" name="exclude" value="">	 
+		     	<input id="searchInput" name="words" type="text"/>
+	        	&nbsp;
+			<input type='submit' name="fulltext" class="searchButton" value="<?php $this->msg('search') ?>" />
+	    	</form>
 	<!-- end searchbox -->
 </div>
 




More information about the jbossws-commits mailing list