1
geronimo_nd
How to improve search results

How to improve search results to show not only the category name from a module for example xdirectory but to show the business name to.

2
zyspec
Re: How to improve search results
  • 2010/8/31 17:10

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Which version of xdirectory? (and a link to where to download it would be helpful)

3
geronimo_nd
Re: How to improve search results

http://www.easy-share.com/1912115146/xdirectory.rar
here is the link for download beacose i dont know i download it like yelow pages module but it iz a xdirectoryoz version on the picture
Thaks for innteres

4
zyspec
Re: How to improve search results
  • 2010/9/1 21:04

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Make a backup of your site and database before making any changes.

It looks like there's a couple of problems in the ./include/search.inc.php file that should be 'fixed'.

1) Change line 46 from:
$sql .= "(l.title LIKE '%$queryarray[$i]%' OR c.title LIKE '%$queryarray[0]%' OR t.description LIKE '%$queryarray[$i]%')";

to
$sql .= "(l.title LIKE '%$queryarray[$i]%' OR c.title LIKE '%$queryarray[i]%' OR t.description LIKE '%$queryarray[$i]%')";


2) Change line 36 from:
$sql "SELECT l.lid,l.cid,l.title,l.submitter,l.date,c.title,t.description FROM ".$xoopsDB->prefix("xdir_links")." l LEFT JOIN ".$xoopsDB->prefix("xdir_cat")." c ON c.cid=l.cid LEFT JOIN ".$xoopsDB->prefix("xdir_text")." t ON t.lid=l.lid WHERE status>0";

to
$sql "SELECT l.lid,l.cid,l.title AS linktitle,l.submitter,l.date,c.title AS cattitle,t.description FROM ".$xoopsDB->prefix("xdir_links")." l LEFT JOIN ".$xoopsDB->prefix("xdir_cat")." c ON c.cid=l.cid LEFT JOIN ".$xoopsDB->prefix("xdir_text")." t ON t.lid=l.lid WHERE status>0";


3) Change line 57 from:
$ret[$i]['title'] = $myrow['title'];

to
$ret[$i]['title'] = $myrow['linktitle'];


This should improve your search results and also display the business name instead of the category title.

5
geronimo_nd
Re: How to improve search results

Thanks But my line 57 is $i++: counter.I just added the last line before $i++. If somebody have same problem with same serch.inc.php file. It is now working like a charm and it would be nice to know if there is a way to add more something like part of the text of the description field or phone number. And one more thing the module is adding a listing id [lid] from like 1350 and in admin page have just a field where you can input the nuber and than edit the add. It would be nice to have some listing on admin index.php. And it would be nice if a field could be added for a user to put the link of his website and a resoult to be outputed like
<a target='_blank'><a name="fb_share" type="button_count" share_url="www.USER-SITE.co.url" >Podeli</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"> </script></a>
facbook like Link And to add a my site url and print it on facebook with his add.
Thanks for you time.

Login

Who's Online

148 user(s) are online (96 user(s) are browsing Support Forums)


Members: 0


Guests: 148


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits