BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Module Requests => Topic started by: Daynjer on April 04, 2008, 01:47:23 pm
-
Basically just an update from the 0.4.x Nano.php to work with the current SVN version. I have tried it in the past few hours with Temar's 0.4 to 0.5 module, but no matter what I type, I am just given the help page for Nano.php. That would be awesome and very widely used IMHO! 8)
-
that is prob caused by commpre as its on longer passed to modules. I have already fixed mine and will post later when i get home.
-
here u go
Edit: Posted Wrong 1 (old 1 from dif directory)
-
Thanks a million Temar! dbl-bump
Edit: Working great now! Org is feelin the lub. ;D
-
search routine still acts bugged....
To [tunderclash]: nano anima
Tunderclash: 9 nano formulas found :: click to view
To [tunderclash]: "anima of maddening wrath"
Tunderclash: /tell tunderclash .help
To [tunderclash]: nano "anima of maddening wrath"
Tunderclash: 585 nano formulas found (displaying only 1-200) :: click to view (page 1 of 4)
Tunderclash: 585 nano formulas found (displaying only 1-200) :: click to view (page 2 of 4)
Tunderclash: 585 nano formulas found (displaying only 1-200) :: click to view (page 3 of 4)
Tunderclash: 585 nano formulas found (displaying only 1-200) :: click to view (page 4 of 4)
any ideas?
and this is using yours, no mods done...
-
A few orgmates have told me that they have seen similar problems with the search. I personally haven't seen it, but from the explanations I have heard, sounds like same results as clash. :-\
-
Hi everyone.
I took a look at the search function and noticed that the current implementation is doing a "contains any of these words" search.
So technically clashbot's lookup is good because the results either contain "anima", "of", "maddening", or "wrath".
I think what you're looking for is more along the lines of a "contains all of these words" search.
In that type of search clashbot's example would return just one item, the one that matched all the words.
If that's what you want then its a simple change in one line.
Change
$ftext = (!$ftext ? "name like '%$ip%'" : $ftext." or name like '%$ip%'");
To
$ftext = (!$ftext ? "name like '%$ip%'" : $ftext." and name like '%$ip%'");
-
tried what you suggested, new results:
To [tunderclash]: nano anima
Tunderclash: 9 nano formulas found :: click to view
To [tunderclash]: nano "Anima of Maddening Wrath"
Tunderclash: No matches found.
-
ok, removing the quotes on that one, caused it to work correctly..thanks
To [tunderclash]: nano anima
Tunderclash: 9 nano formulas found :: click to view
To [Tunderclash]: nano "anima of"
Tunderclash: No matches found.
To [Tunderclash]: nano 'anima of'
Tunderclash: No matches found.
To [Tunderclash]: nano anima of
Tunderclash: 9 nano formulas found :: click to view
To [Tunderclash]: nano anima of maddening
Tunderclash: 1 nano formulas found :: click to view
To [Tunderclash]: nano anima of maddening wrath
Tunderclash: 1 nano formulas found :: click to view
-
I took a look at the search function and noticed that the current implementation is doing a "contains any of these words" search.
Not if they use "" around the search words, then it'll match the whole string instead of each word. Unless someone decided to remove that bit from the script, but that's how it works in the original.
One issue (been mentioned before here (http://bebot.link/0-4-x-customunofficial-modules/updated-nanos-php-for-0-4/), search is Your friend) could be the problem with the ยค I used in the first script. It doesn't work properly on some system, replace it with @ and see if it helps.
-
yeah wolf, I tried that first. That did not change anything, and had quite a big post in the original thread that you mentioned that on. The quotes did not matter before or after, changing that search routine from "or" to "and" and removing the quotes fixed the problem in my case.