1
jfmoore
Search only one module
  • 2004/11/11 15:31

  • jfmoore

  • Quite a regular

  • Posts: 360

  • Since: 2004/6/6 5


I would like to have a version of search.php which would search only one module--or, when the search box comes up, it would have only the one module checked. Then, you could invoke whatever search_xx.php from whatever module if you wanted to search only that module.

The other modules should be available, also, just in case, but unchecked.

Would this be hard to do?

JFM

2
Mithrandir
Re: Search only one module

xoops-root/search.php:
if (empty($mids) || !is_array($mids)) {
    unset(
$mids);
    
$mids array_keys($modules);
}

find that around line 114 and change it to
if (empty($mids) || !is_array($mids)) {
    unset(
$mids);
    
$mids = array(id_of_module); //replace with your desired module's ID
}


and around line 45:
$mid = isset($mid) ? intval($mid) : 0;

change it to:
$mid = isset($mid) ? intval($mid) : id_of_module//replace with module ID of your desired module

3
jfmoore
Re: Search only one module
  • 2004/11/12 4:55

  • jfmoore

  • Quite a regular

  • Posts: 360

  • Since: 2004/6/6 5


Useful information. Thanks!

JFM

Login

Who's Online

337 user(s) are online (238 user(s) are browsing Support Forums)


Members: 0


Guests: 337


more...

Donat-O-Meter

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

Latest GitHub Commits