Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

Limit Search Categories returned

Quote Reply
Limit Search Categories returned
I'm trying to figure out how to limit the categories that are displayed in the search results. I've got alot of categories that I do not want to display and have set a db column of 'display' = 'y' or 'n'.

How do I keep the display=n categories from appearing in the $category_results?

Thanks,

Regards,
Clueless

Last edited by:

Clueless: Oct 4, 2003, 9:23 PM
Quote Reply
Re: [Clueless] Limit Search Categories returned In reply to
In admin/User/PHP/Search.inc.php, in the _query_ni() function, find;

Code:
if (strlen($cond)) {
$query .= ' WHERE ' . $cond;
}

You would try replacing this with;

Code:
if (strlen($cond)) {
$query .= ' WHERE ' . $cond . " AND display = 'y'";
}

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Limit Search Categories returned In reply to
Thanks Andy,

It works like a charm. Smile

Regards,
Clueless