Welcome! Log In Create A New Profile

Advanced

Defined domain search

Posted by emoore6326 
Defined domain search
June 14, 2012 12:13AM
First I want to say "This is AWESOME!". This program is so close to perfect, it ain't funny! the finger smiley

What I need is this. I have multiple categories. However, I need to put the search on individual sites where the search will ONLY pull in that particular sites info. I know it is a matter of defining the url, which I have done with <?PHP $urls = $_SERVER['HTTP_HOST']; ?>. I thought if I would replace all the $domain strings in the search function page, it would do it, but it does not.

Any help you can offer is greatly appreciated.
Re: Defined domain search
June 14, 2012 12:55AM
I just figured it out. Here is what I did for those of you who want to do the same thing...

- Opened search.php
- Added at the beginning of file: <?PHP $urls = $_SERVER['HTTP_HOST']; ?>
- Found the script: $search_results = get_search_results($query, $start, $category, $type, $results, $domains);
- Replaced it with: $search_results = get_search_results($query, $start, $category, $type, $results, $urls);

That's it! Now it is only pulling in the results for that single domain. Hope someone else finds this useful.
Sorry, only registered users may post in this forum.

Click here to login