Difference between revisions of "Zmud WikiSearch"

From AvatarWiki
Jump to navigation Jump to search
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Image:Wikisearch.jpg|right]]This trigger opens your webbrowser to an AvatarWiki search of your selected text when you choose an option from the right-click menu. This is a very simple implementation. I'll work on a more advanced one that removes leading articles (the, an, a), as well as another minor improvement.
+
This trigger opens your web browser to an AvatarWiki search of your selected text when you choose an option from the right-click menu. It also removes articles (the, an, a) at the beginning of search terms as per wiki standards.<BR>
 +
[[Image:Wikisearch.jpg]]
  
 
== Code ==
 
== Code ==
  
 
''Copy each line individually and then paste them into zMud:''
 
''Copy each line individually and then paste them into zMud:''
  <nowiki>#MENU {Search for '%selected' On AvatarWiki} {#URL http://avatar.melanarchy.info/wiki/Special:Search?search=~"%selected~"} ""</nowiki>
+
<nowiki>#ALIAS wiki {#URL http://avatar.melanarchy.info/index.php/Special:Search?search=~"%1~"} "wikisearch"</nowiki>
 +
  <nowiki>#MENU {Search for '%selword' on AvatarWiki} {#URL http://avatar.melanarchy.info/index.php/Special:Search?search=~"%selword~"} "wikisearch"</nowiki>
 +
<nowiki>#MENU {Search for '%selected' on AvatarWiki} {#VAR wikistring ~"%selected~";#IF {%begins( @wikistring, "an ")} {#VAR wikistring %remove( "an ", @wikistring)};#IF {%begins( @wikistring, "a ")} {#VAR wikistring %remove( "a ", @wikistring)};#IF {%begins( @wikistring, "the ")} {#VAR wikistring %remove( "the ", @wikistring)};wiki @wikistring} "wikisearch"</nowiki>
  
 
== Usage ==
 
== Usage ==
  
To use it, just select some text in the mud, right click on it and choose the "Search for 'x' on AvatarWiki" option.
+
Just select some text in the mud, right click on it and choose the "Search for 'x' on AvatarWiki" option. For single word searches, just right click the word, no need to select it.<BR>
 +
 
 +
You can also do manual searches by typing wiki followed by your search term in quotations.<br> EX: <tt>wiki "search requirements"</tt>
  
 
== How It Works ==
 
== How It Works ==
  
 
[[Category: Zmud Scripting]]
 
[[Category: Zmud Scripting]]

Latest revision as of 15:25, 19 February 2007

This trigger opens your web browser to an AvatarWiki search of your selected text when you choose an option from the right-click menu. It also removes articles (the, an, a) at the beginning of search terms as per wiki standards.
Wikisearch.jpg

Code

Copy each line individually and then paste them into zMud:

#ALIAS wiki {#URL http://avatar.melanarchy.info/index.php/Special:Search?search=~"%1~"} "wikisearch"
#MENU {Search for '%selword' on AvatarWiki} {#URL http://avatar.melanarchy.info/index.php/Special:Search?search=~"%selword~"} "wikisearch"
#MENU {Search for '%selected' on AvatarWiki} {#VAR wikistring ~"%selected~";#IF {%begins( @wikistring, "an ")} {#VAR wikistring %remove( "an ", @wikistring)};#IF {%begins( @wikistring, "a ")} {#VAR wikistring %remove( "a ", @wikistring)};#IF {%begins( @wikistring, "the ")} {#VAR wikistring %remove( "the ", @wikistring)};wiki @wikistring} "wikisearch"

Usage

Just select some text in the mud, right click on it and choose the "Search for 'x' on AvatarWiki" option. For single word searches, just right click the word, no need to select it.

You can also do manual searches by typing wiki followed by your search term in quotations.
EX: wiki "search requirements"

How It Works