| Make Your Joomla Search More Useful |
|
| Thursday, 22 February 2007 | |
|
The other day I'd been doing some testing on the search features for client's site and I came up with some interesting results. This website, based around sports, was pulling up results headed "Mambo", "PHP.net", "MySQL.com".
I'd forgotten something really simple ... by default Joomla comes with the "Search Newsfeeds", "Search Weblinks" and "Search Contacts" mambots published. If you never get around to deleting all the newsfeeds and weblinks, they'll then turn up in the search results.
So, I unpublished those mambots, and also those the called "Search Sections" and "Search Categories". I figure that people are looking for individual content items rather than general folders on a subject.
A small change, but hopefully it will speed up the search results and also make them more useful.
Comments (40)
![]()
Hacking the search
written by Zorro, February 26, 2007
Hi Steve,
sure, no problem. In /components/com_search/search.html.php: Find line 126, replace 'any' with 'all'. Find line 215, replace 'any' with 'all'. Also, in /components/com_search/search.php: Find line 102, replace 'any' with 'all'. That should do it. These line numbers are for Joomla 1.0.12. Not pretty, hacking the core code, but someone's gotta do it. written by Anthony .K, March 17, 2007
hi can u guys tells me about how to make advanced search in my website , coz i cant find a module that include an advanced search in it.
Thankx written by Anthony .K, March 19, 2007
Hey Steve
Im looking for a "advanced" search that have extra features / requirement for now is only to add one condition : search in or or or (please refer to my webssite : www.debii.curtin.edu.au) without this condition, the search function will grab information from all of above. So the first thing is i should try to figure out set this condition filter to limit the search result. Thank you written by Anthony .K, March 20, 2007
hi Steve
thx for your advice , im already look on those site , and yes it doesn't have search module that im looking for , but if u would like to know what im looking for , please visit this site : http://forge.joomla.org/sf/search/do/search this kind of search that im looking for , if u have any idea pls let me know , coz i really need this kind of module thanks for your time Steve i appreciate that written by ouija, March 28, 2007
is there any way to get the search to exclude certain content and/or catagories/sections?
The reason being is i have a section that basically has random facts that are displayed on my main page, and are not accessable through any menus and I don't want users being able to pull them up using the search as the do now... is there any way to exclude/include specific content catagories/sections from the search? also, does anyone know what the parameter "Set Itemid" in the search module does? I thought this was my solution, but not sure how to use it and cannot find anything in regards to what that function is for... Just curious written by ssekazinga Noble Julius, April 27, 2007
Hey Guyz gone thru the previous comments ok what am looking at right now is searchinh by Image or Displaying images in my search results, do u have any idea baout that!?
JNS Technology Uganda written by Audra, May 05, 2007
Hi - I'm wondering if anyone can assist me..........
I have changed the search component's options as needed (same as mentioned in 2nd ost here - ( to all and alpha) - the search page comes up ok, with radio boxes cheecked accordingly, But if I enter the search term directly into tnot eth module and hit eth button - when the search page comes up - it has doen a different default searc (all instead of any) although the boxes are checked correctly.I am wondering if I need to change defulats eslewhere and have worked through th bot and module to do this as much as I could - but to no avail Audra
Hacking the Search Module
written by Zorro, May 21, 2007
Audra (and Jean who asked me via e-mail - I'll get back to you via mail):
To have Joomla's built-in search module use the "all" setting, you'll have to hack it as well. Open modules/mod_search.php and go down to the very bottom where the input form is set up. As the last statement within the form, enter That should make the search module behave. Those who use templates with hard-coded search fields will have to change their template's index.php file accordingly. Kind regards, Zorro
Argh.
written by Zorro, May 21, 2007
The comment component swallowed the code I was trying to post.
For your convenience, I have made a file that replaces the original modules/mod_search.php file. It is identical to the Joomla 1.0.12 file but contains the additional line before the closing form tag. It is available at: http://www.nitsche.org/mod_search_hacked.txt You can rename it to mod_search.php and overwrite your existing file with it. Kind regards, Zorro written by Darlene, June 11, 2007
I am trying to search the actual directory I made with dmdocuments component. The only search option included is for title a description. I want to search the html files in the directory is there any way to select search a particular directory instead of content items.
Thanks for any help. written by Rachel, June 28, 2007
Hi, I seem to be having trouble with the Joomla 1.0.4 search component. I could have sworn, once it was published, that all results I had checked off in the Site Mambots returned correctly. Now it seems that only Category results are returned. No newsfeeds or content display as results. I have not made any changes since then so I'm not sure what is going on. Any advice? Thanks!
written by Nikolas T, July 03, 2007
Is there aany mambot / module to allow search to a specific category / section?
written by Audra, July 05, 2007
Hi Zorro - just found your reply post from may - fantastic simple solution adding that line into my search module - Thanks a million
(Sorry was slow to thank you written by nemo, August 16, 2007
Hi, does anyone know the changes you can make to the search module to be able to search through virtuemart items and not just the article pages?
written by Seren, September 11, 2007
At the top of this page it is said that "Joomla! doesn't support search strings longer than 20 characters". Is there a way to increase the number of characters, say to 30?
written by Walter Stinnett, September 11, 2007
I tried to do a search on text within a component but no results were returned. Is there a way to configure the default search component to return results from components, extensions, etc?
written by Rana Chand, December 10, 2007
Hi you all guys....I am looking a joomla Meta Search Engine component just like similar as http://www.dogpile.com/ meta search engine. I have not found any single joomla web site who develop and implement Meta Search Engine...Please if any help on this very serious problem...I want to develop a Meta Search Engine component for our joomla web site...
Thanks .... written by Kane, January 13, 2008
Someone please assist. When I do a search on my site it no longer returns any results. Could some one assist me in trouble shooting it
written by eric1, February 26, 2008
where we can looking for good search componet content alpa betical like 0-9 and A to Z like http://www.lyrics007.com/ thanks.
written by Guy, April 07, 2008
Great. I never knew I can disable searching in Newsfeeds and Weblinks. I didn't know how to move it .
Thanks for the advice. written by aimz, May 02, 2008
hey can anyone please telme how to display previously searched data?/? i ave been stuck on this, please help!
written by smithveg, May 04, 2008
Previous search data? I think you need to have another modules to track the visitors search text in order to do so. I got no idea... Hopes this's a hint for you.
I'm seeking they way to make the mod_search in advance, to have a dropdown just beside the mod_search textbox. See. How i customize the com_search to have a dropdown at http://www.homelink.com.my. But i do not sure how to customize a dropdown into mod_search. Any ideas? written by Pio, May 08, 2008
hi people,
pls how can i set my search engine. I would like to put the search button at the same high of text but i can't find the file to change this setting. Do you know how i can? written by Snichols, May 14, 2008
Hi,
Has anyone managed to hack the earch engine module so that it only searches one specific category. If so do you have the code. This is driving me nuts! Steve
...
written by chris2005, June 09, 2008 Hi Steve, Is there a 1.0.15 version too? Regards, Chris written by crissy, July 25, 2008
Hi,
I would like to ask if there is a way I can customize my joomla search by date? thanks in advance. written by benc, September 14, 2008
has anyone done this for J1.5? can somebody post the code? thanks.
written by sagar2, September 28, 2008
how to implement alphabetical and 0-9 search in joomla?
thanks in advance written by fufu, September 28, 2008
Hi ,
I see the question is already here, but can some one give us the code to search in a given section? do I have to duplicate module to do it in more than one section with not the same modules printed on left side as example? written by Mekonnen, October 06, 2008
Hi all,
Can I add two opetions to joomla default search say with web and the Site So that when my user selects web it searches the word using google and when selects site it searches in my web site only? Any help please Thanks written by kaspar, October 12, 2008
Hi Steve,
I have gone through the above question and answer, i hope you would solve my issue. My Question: I need to display my site content only like - keyword name, key content, my site url path . I hope you would solve my issue. I am using joomal_157 ( latest version ). It has some default search with category, section and static page. I don't want joomla default search option. i want the output like myyogaonline this site. Write comment
|




Another useful thing is to change the default setting from "any words" to "all words" - nobody searching for "joomla templates" would want results for "joomla" OR for "templates", right?
Unfortunately, this has to be done by hacking the core code in components/com_search/search.html.php.