Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
kadabram
Hangin' Around


Joined: Oct 29, 2007
Posts: 30

PostPosted: Sat May 09, 2009 10:26 am Reply with quote

Hello,

I downloaded and installed RavenNuke. Its Search module is quick and efficient. I wonder if it could be possible to change a little bit the code?

In Web_Links, I would like to be able to perform a search for urls, or for words that are in the urls.

To perform this, another module (KWSearch) uses the following code (after changes ; initially, it didn't):

Code:
case '4': 

        // links
        $query = "SELECT lid, title, description, url FROM ".$prefix."_links_links WHERE lid=".substr($doc_id,1);
        $res = $db->sql_query($query);
        while($row = $db->sql_fetchrow($res)) {
        $docs[$doc_id] = strip_tags($row[1]." ".$row[2]." ".$row[3]);
        }
        break;


I tried to adapt the code to the Search module (not KWSearch module, but original RavenNuke Search module), but couldn't. Do you have an idea for this RavenNuke Search module?

Thanks.

Have a nice day!


Last edited by kadabram on Sat May 09, 2009 12:19 pm; edited 1 time in total 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Sat May 09, 2009 10:55 am Reply with quote

Have you tried to install KWSearch?

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
nuken
PostPosted: Sat May 09, 2009 11:01 am Reply with quote

I installed version 0.91 and had to change a few lines to get it to work.

lib/Kwindex.lib.php, find on line 182

Code:
if (sizeof($doc_ids) > sizeof($docs))


         die("KwIndex: add_document: ".

             "'document_sub' returns too many documents");



Change to:
Code:


//if (sizeof($doc_ids) > sizeof($docs))

         //die("KwIndex: add_document: ".

          //   "'document_sub' returns too many documents");

 
kadabram
PostPosted: Sat May 09, 2009 12:12 pm Reply with quote

Hello nuken,

Yes, I did. "KWSearch" is very good, but it is not as good as the RavenNuke version of "Search", because, for some words, KWSearch doesn't return any result (and, for the same words, "Search" find them).

The best would be to mix KWSearch and Search Wink

BTW, thanks for sharing the changes you made on this script.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©