Standard Joomla! 1.5 search results page it’s okey, but I still get questions from clients how to improve that, or just how to show more or less etc.
Standard search component provides basic search functionality. Articles (also in keywords from Metadata) , category and section descriptions, Web links, and contacts can be searched on. But not only because after installing dedicated plugins working with specific extensions like JomSocial, Sobi2, K2 etc. – see here on JED, you will get more search opportunities. What is searched is controlled by the use of search plugins for specific areas. Because all the plugins after default installation are enabled, you can always choose which search plugin enable or disable if you don’t need it.
Show me your module, honey
My first problem was How to show selected modules on Search result page If I didn’t set them to show to all pages. Because default Joomla! 1.5 has only 3 options of indicator of which pages the module has been assigned to:
- All, meaning to all pages on the site (often impractical);
- None, which means the module has not been assigned to any pages;
- Select menu item, which means the module is assigned to some but not all the pages.
Add, Cut and Change me
Second problem was, How to show first thumbnail (or just picture) from an article in the search results. But there is a problem with components/com_search/views/search/view.html.php file which clears the article of any embellishments and styles, including photos.
Thanks Joomla Coders, the Joomla! system allows you override the output of components by creating one or more new view templates and inserting them into your active template directory. This approach to overriding component output allows you to leave the core files untouched; And it’s safe solution, especially when you need to upgrade a CMS core. So all your changes are made to a new file which is segregated from the core component files.
So you can safe change by override a default_form.php file from com_search/views/search/tmpl folder. In this file you’ll find all Search Result Page layout, with all: All words, Ordering etc.
Another trick, try to find line number 133 , in this components\com_search\views\search\view.html.php file, with below code:
$row = SearchHelper::prepareSearchContent( $row, 200, $needle );
If you change value from 200 to 50 – only the first 50 characters of the article (or other content) will be displayed. If I delete this line, I can see all content include photos and style, nice but … there is no limitation of length – number of chars to show.
By the way, have you got any ideas, how to fix it?
But sometimes it’s better to buy… a good solution
DM Articles Filter (joomlaextensions.dmdigital.it ) is a component that lets your visitors filter articles by Section, Category, Title, Meta Tag, Date. Results are displayed in a list of articles linked (with SEF urls) to their content. You can choose to limit results to a particular section or category, and decide which filters are available and which not. I was taking with owner about product and I’ve send him some ideas so probably he will improve it, very soon.
I can not find … yes you can
Sometimes, looking at your own or the client side after the keyword, we can not find a particular article, although we know that this is in the database – certainly not once had to face with that. The default search plugin for Joomla performs a standard search in the articles. A SQL query searches for occurrences of search words in different sections and return the results sorted by relevance without. This method can quickly reach its limits if your site contains many pages. For more relevant results, it is possible to use the method FullText Search (full text) provided by MySQL. This method indexes the contents of articles by assigning a weight to each word. When searching, the most relevant results returned first. The method of full-text works more efficiently on large volumes of data.
Therefore, in situations when the website has a large number of articles worth to use FullText-Content (www.jjsworld.fr ).A GPL Joomla 1.5 plugin witch allows FullText search method in your website, author just changed the query used to search . By now search results are sorted by relevance, improving user experience.
Before using : Total: 3 results found.
After using plugin FT-C: Total: 6 results found.
As you can see, it’s working very good.
Summary
As you could read, we’ve made some nice improvements to the design and navigation, making for our clients easier to find the information presented on your web page.