Extension talk:RigorousSearch
Add topicGroß- Kleinschreibung ignorieren
[edit]In der aktuellen Version wird auch zw. Groß- und Kleinschreibung unterschieden. Wenn man das nicht möchte muss folgendes geändert werden:
SpecialRigorousSearch.php (Zeile 265):
von
" AND old_text LIKE '%" . $pattern . "%'";
in
" AND CONVERT( old_text USING latin1 ) LIKE '%" . $pattern . "%'";
--Schneller2000 05:45, 16 May 2007 (UTC)
In der Version 1.0.1(aktuelle Version am 16.03.2011) wird nicht zwischen Groß- und Kleinschreibung unterschieden, obwohl die Zeile 265 so aussieht:
" AND old_text LIKE '%" . $pattern . "%'";
die normale Suche ersetzen
[edit]Wenn die normale Suche durch die RigorousSuche ersetzt werden soll, gehen Sie wie folgt vor. (ich beschreibe es am Skin Monobook):
in der Datei skins/MonoBook.php:
in Zeile 169:
von
<?php $this->text('searchaction') ?>
in
<?php echo str_replace("\$1", "Spezial:RigorousSearch", $this->data["articlepath"]) ?>
Zeile 170:
von
name="search"
in
name="pattern"
Um nur einen Suchbutton zu haben ändern sie bitte in Zeile 175-176:
von
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>" /> <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>" />
in
<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>" />
--Schneller2000 05:45, 16 May 2007 (UTC)
Ignore capitals
[edit]Translated English description of changing built in search engine and capital filter.
In the actual version there is made a difference between normal characters and capitals. When you want to change this you have to change the next rulse of code:
SpecialRigorousSearch.php (line 265):
from
" AND old_text LIKE '%" . $pattern . "%'";
to
" AND CONVERT( old_text USING latin1 ) LIKE '%" . $pattern . "%'";
Replace the built in search function
[edit]When you want to replace the built in search engine by the SpecialRigorousSearch one, you need te take the next steps. These steps are taken for the MonoBook skin.
In the file skins/MonoBook.php:
in line 169:
change
<?php $this->text('searchaction') ?>
in
<?php echo str_replace("\$1", "Special:RigorousSearch", $this->data["articlepath"]) ?>
line 170:
change
name="search"
in
name="pattern"
To have only one searchbutton change next lines: line 175-176:
change
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>" /> <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>" />
in
<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>" />
show text as a result too?
[edit]is it possible to show the textstring where the search has found a result? like the original fulltext search?
=> yes, i think this is possible, but the programmier complexity ist to much, for me to day ;) --Schneller2000 10:39, 24 May 2007 (UTC)
neuen Artikel anlegen nach Suche
[edit]eine Aufforderung wie in der orginal Suche kann man auch hinzufügen. Da steht, wenn es den Artikel nicht gibt:
=> Wenn du dich mit dem Thema auskennst, kannst du selbst den Artikel „XX“ verfassen
die erreicht man auf folgende Art:
in dieser Datei folgendes ändern (ich gehe von der originaldatei aus):
Zeile 74: hinzufügen
$newArtikel=0; $newZaehler=0;
Zeile 199 : einfügen
//hinzugefügt von Schneller2000 // um Artikel nach der Suche automatisch anzulegen foreach($hits as $hit) { if (Strtolower($hit)==Strtolower($pattern)) { $newArtikel=1; } } //vor der suche die Möglichkeit einräumen das man einen neuen Artikel anlegt if ($newArtikel==0 && $newZaehler==0) { $out .="Wenn Sie sich mit dem Thema auskennen, können Sie selbst den Artikel [[".$pattern."]] verfassen<br><br>"; $newZaehler++; }
So das wars schon. Keine Garantie obs klappt. Kann gerne auch ins englische übersetzt werden. Bei Fragen stehe ich gerne zur Verfügung
- In wich file do i put these lines, because that is not clear. I can make an english translation, no problem. Sypie, MacWiki.nl
Rigorous Search on Sidebar.
[edit]Do you know how you could add the Rigorous Search to a sidebar applet? I would like to display both the normal search and the Rigorous Search within my wiki sidebar.
justin.edwards at gmail.com.
- I don't know how, though I think mods to the skin would to it. But I would recommend not doing it -- rigorous search offers nearly nothing over a regular search for most people, and is a major resource hog. The only way I use it is with a link from my admin page which searches for "
http://
" links into my wiki. JohanTheGhost 14:40, 5 June 2007 (UTC)
- It will also search the inside of a string eg: if I have the word IT_User_Policy and I do a normal search for "User" the rigorous search will return it and the normal search will not. I have modified my MonoBook.php to have both of the Searches thanks to the post above and bablefish :). On a side note, the only think I found that the rigorous search is case sensitive, would you know a way to remove this??? Thanks again for your help.
- I use LIKE for the search, and according to the manual this is only case-sensitive if one of the operands is BINARY -- so maybe your database has BINARY fields??? Try changing LIKE to something else, like MATCH. JohanTheGhost 17:48, 7 June 2007 (UTC)
- @justin.edwards: I know how: go to the File skins/MonoBook.php: you take the steps under "die normale Suche ersetzen" -> this is the german version of the steps. But the codelines are the same as in the english-version. greetings --Schneller2000 10:52, 11 September 2007 (UTC)
Do this to allow everyone to search.
[edit]Replace this:
SpecialPage::SpecialPage('RigorousSearch', 'patrol');
with this:
SpecialPage::SpecialPage('RigorousSearch');
and replace this:
if (!$wgUser->isAllowed('patrol')) {
with this:
if (0) {
Todu 13:27, 26 November 2007 (UTC)
What license?
[edit]You have written that you have the copyright. But what license do you distribute this under? GPL? Todu 23:48, 26 November 2007 (UTC)
still support on this extension?
[edit]Is there still support on this extension? There are a few questions i have that are not clear yet.
Weiterleiten zum Suchresultat / Redirection to Searchresult
[edit]Auf meiner kleinen mediawiki page werden die Seiten jeweils über folgendes Konstrukt angesprochen: /index.php?title= (z.b. index.php?title=Special:RigorousSearch). Die RigorousSearch Extension linkt, nach Eingabe einer aber direkt auf index.php?pattern=test&searchx=Search&ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1
Wie/Wo kann ich das umstellen/konfigurieren? DANKE!
On my mediawikipage I use the following construct to handle pages: /index.php?title= (e.g index.php?title=Special:RigorousSearch). Your Extension links directly to index.php?pattern=test&searchx=Search&ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1
Wherea&How can I change this? THX in advance!
--DataCore 07:47, 4 June 2009 (UTC)
MediaWiki 1.18 / 1.19.0
[edit]This extensions does not work with MediaWiki 1.18 any more since $wgMessageCache has been removed. See mediawiki.org. --Ralfk 17:23, 6 November 2011 (UTC)
- Can be solved by just disabling the setting of $wgMessageCache in about line 95
global $wgMessageCache;
/*$wgMessageCache->addMessages( array(
'rigoroussearch' => 'Rigorous search'
));*/
SpecialPage::addPage( new SpecialRigorousSearch );
- getting the same issue [obviously] trying to upgrade to 1.19.0. what is it that line you're commenting does exactly? i can't seem to figure it out based on the $wgMessageCache manual page. is it safe to comment it out?
- Hi there, I can confirm the extension is having trouble on newer MediaWiki releases (1.24 at least); I did try to disable the $wgMessageCache setting but unfortunately the extension won't work. Is anyone able to update it so it'll run on MediaWiki <= 1.18? Thanks everyone