Documentation
Installation
Go to Extensions -> Manage -> Install page, upload distribution package you've previously downloaded and click Install. Before you enable extension you must setup it first.
For plugins: Go to Extensions -> Plugins, find the desired plugin and open its settings. Setup accordingly and only then enable.
For modules: Go to Extensions -> Modules, find the desired module and open its settings. Setup accordingly and only then enable.
For components: Hover your mouse over Components menu item, find the desired component and go to Options page. Setup everything accordingly and don't forget to check Permissions tab.
License ID: Enter anything in License ID field, if it is present in extension options.
NOTE: Standard content search plugin will be disabled automatically on first plugin run or you may do it manually by yourself.
Additional result data
NOTE: Code below is just an example and can be different in your case. Operation itself requires some coding knowledge or help of the professional programmer.
This plugin returns additional data, which can not be displayed automatically due to Joomla restrictions. To display them you need to change your search results template, so it could use additional data:
- parent_name — Parent area name: Articles, Archived or taken from plugin settings.
- parent_link — Parent area link: all article categories or archived article month.
- category_name — Article category name.
- category_link — Article category link.
- delimiter — Area and category delimiter taken from plugin settings.
- thumb — Article image taken from Image tab.
Here's a simple example on how to enable thumbs in search results. First of all, set Show Thumbs to Yes in plugin settings. Then copy default search results template file from:
components/com_search/views/search/tmpl/default_results.php
to:
templates/your_template/html/com_search/search
Then edit it and add somewhere inside foreach() clause these lines:
<?php if (isset($result->thumb)) { ?>
<img class='result-thumb' src='<?php echo $this->escape($result->thumb); ?>' />
<?php } ?>
$result->thumb property is a link to article image, which should be put in SRC attribute of IMG tag. Using the same example you can add thumb to any search module or component. The only thing, that might have to be changed is $result variable — it can be $item, $search or whatever particular extension uses. Class name can also be changed with any name you like.
Same goes to author names. Again you need to edit above mentioned template file and add somewhere inside foreach() clause these lines:
<?php if (isset($result->author)) { ?>
<span class='result-author'><?php echo $result->author; ?></span>
<?php } ?>
Using these two examples you can add area and category name and link to make your search results better and more user friendly. Unfortunately, there's no easier way to do this due to Joomla limitations.
Using areas
This plugin adds several search areas besides standard Articles area. They allow your visitors to fast-limit search results:
- Archived articles — Search in archived articles only.
- Featured articles — Search in featured articles only.
- Field areas — Limit search area to selected article fields (title, alias, author etc).
Combination of areas works in a very predictable way. For example, if Archived and Search in Article Titles selected, it'll search in titles of archived articles only. If no area selected, all articles will be searched, including archived and featured if enabled in admin.