Put Your Head in the Clouds - It's Easy!
The installation for this plug-in is easy. Just follow the steps below.
- Download: Grab the latest version from the plug-in repository on SourceForge.net ...
am_search_cloud_plugin (plug-in for b2evo v1.8.x & v1.9.x)
- Unzip & Upload: Unzip the file into the "/plugins" folder of your v1.8.x or v1.9.x b2evolution installation. It will make a folder called "am_search_cloud_plugin", which you need to upload to your b2evolution server, putting it into the same "/plugins" location.
- Install the Plugin: In the back-office, head to the "App Setting" -> "Plugins" tab. In the "Available Plugins" list, you should see "AM Search Cloud". Click [Install] in the "Actions" list, on the right. BOOM! It's installed.
- Add the Skin Tag: Next, you tell your skin where you want the cloud to show up. To do this, edit your skin's _main.php file and add the following PHP code. (If you're not sure where to put it, a good starting point is right before your "bPosts" DIV. If you're putting inside of existing PHP tags, you don't need the PHP tags included here.)
PHP:
| <?php $Plugins->call_by_code( 'am_srchcloud', array( |
| |
| ) ); |
| ?> |
BOOM! You're done. How simple was that?
Tweaking the Code
Settings (Back-Office)
There are some settings you might want to modify or play with, in the back-office. Head to the installed plug-in and click the little 'paper & pencil' icon in the "actions" column (far right). This allows you to edit the plug-in settings. Those settings are described below.
- Cache Lifetime: Length of time (in minutes) that the search terms in the cloud will be cached for. This saves server resources for high-traffic blogs. Defaulted Value: 60
- Max Length: Maximum number of characters for a particular search string. This provides a mechanism to truncate very long search strings and keep them from 'breaking out' of their containing block elements. Defaulted Value: 0 (displays the full string)
- Filter Words: This is a comma-separated list of objectionable words you may wish to filter out of search strings. This provides a means to keep profanity and other such words out of the search cloud. Defaulted Value: No Filtering
- Filter Character: If 'Filter Words' is enabled, this is the character that is used to replace the characters contained in the filtered word. Defaulted Value: * (e.g., 'cuss word' becomes '**** ****')
Parameters (Skin Tag)
There are a bunch of parameters (all defaulted if you utilize the skin tag in the code above) which control a variety of things. Rather than discuss each one, we've put a complete skin tag below, with all of the parameters defaulted. (You can copy/paste THIS code into your skin's _main.php file, in place of the one above, and modify values as you see fit).
PHP:
| <?php $Plugins->call_by_code( 'am_srchcloud', array( |
| 'blog'=>'', |
| 'limit'=>40, |
| 'title'=>'<h3>Search Cloud</h3>', |
| 'order'=>'rand', |
| 'show_once'=>true, |
| 'before_all'=>'<div id="search_cloud">', |
| 'after_all'=>'</div>', |
| 'block_start'=>'<ul>', |
| 'block_end'=>'</ul>', |
| 'before_each'=>'<li>', |
| 'after_each'=>'</li>', |
| 'hover_title'=>'Searched #count# times - Read it!', |
| ) ); |
| ?> |
Recent comments