Hello
I'm wondering if it is possible to exclude gallery items from the search results when using the local search facility... I'm using Gallery 1.1.1 at the moment.
I have looked at the forums and some people mention to try: to put this in the template to exclude items from the search engine, but I have tried this but it didn't work. I tried this on both the page itself and also in the template within the gallery settings.
I've unticked the 'cachable' and 'seachable' options in the actual page that the gallery is showing, but this doesn't help because the search results aren't displaying that page but rather an unformatted listing of photos directly from the gallery database.
I will be interested to see if there is a fix for this.
Thanks.
SOLVED - How to exclude Gallery from local search results
- Darwin Web Design
- Forum Members
- Posts: 212
- Joined: Tue May 30, 2006 3:12 am
SOLVED - How to exclude Gallery from local search results
Last edited by Darwin Web Design on Mon Jun 21, 2010 12:27 pm, edited 1 time in total.
Re: How to exclude Gallery from local search results
The only way to do it is to edit the modules/Gallery/Gallery.module.php file, and comment out or remove the entire SearchResult method. Search results will still be stored in the database, but they should get skipped over when it comes time to display them.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: How to exclude Gallery from local search results
Actually, Ted is incorrect.
It's quite easy to do, without modifying any PHP code. This question has been asked and answered before. All you have to do is modify the search result template in the Search module.
It's quite easy to do, without modifying any PHP code. This question has been asked and answered before. All you have to do is modify the search result template in the Search module.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: How to exclude Gallery from local search results
Yeah, he's right. I forgot about the obvious way to do it...
http://forum.cmsmadesimple.org/index.ph ... #msg203179
http://forum.cmsmadesimple.org/index.ph ... #msg203179
- Darwin Web Design
- Forum Members
- Posts: 212
- Joined: Tue May 30, 2006 3:12 am
Solved - How to exclude Gallery from local search results
Thank you for your help, this worked perfectly. Sorry I didn't find this myself when searching the forums.