================================================================== Snippet-title: top_searches v1.0 log_search v1.1 Creator: Graham Keellings E-mail: pivot@keellings.com Website: http://www.keellings.com/software/pivot.php Creation date: 04 September 2006, London, UK ================================================================== Content of zipped file: ----------------------- snippet_top_searches.php snippet_log_search.php readme_top_searches.txt (this file) Usage: ------ 1) unpack this package in your extensions/snippets/ folder. 2) place a [[log_search]] tag on the page where you have your search results appear - this is defined in Admin/Weblogs on the first page under "Extra page". 3) place a [[top_searches]] tag, with the appropriate parameters, in any of your template files, whereever you want the top_searches to appear (side bar, page top or bottom, etc) Syntax: [[top_searches:::]] See description of parameters below. 3) rebuild the FrontPage(s). Description: ------------ * A pair of snippets, one of which records the search terms which people use * to search your blog, and the other of which you can use to display * the most commonly used search terms. * Parameters ([[log_search]] has none, these apply to [[top_Searches]]): ---------------------------------------------------------------------- * @param int showCount - show this many search terms (top X) default = 5. * Each term will be shown on a new line (
). * @param string text - the actual text which will be output for each * entry. * You can use %term% to represent the search term, * %num% to represent the number of searches and * %url% to represent the URL leading to your search. * Use HTML and/or CSSo format the output. * E.g. if user have only searched my blog for * two search terms 'beer' and 'truth' and * this parameter is * "Someone searched for %term% a total of %num% times
" * Then the output will look like * Someone searched for beer a total of 38 times * Someone searched for truth a total of 2 times * Default value is '%term% (%num%)
' * * Examples: * This is used to format a URL which links to the * search for each search term, one per line, * showing the number of searches in brackets: * [[top_searches:%term%(%num%)
]] * This does the same, but applies a CSS class * defined in your CSSile to the link: * [[top_searches:%term% (%num%)
]] * And this does the same, but shows the number of * searches as a 'tooltip' when the user hovers * his cursor over the link: * [[top_searches:%term%
]] * Examples: [[top_searches]] [[top_searches:10:

%term%(%num%)

]] [[top_searches:10:

%term%

]] * History: (top_seacrhes) * * v 1.1 2006/09/06 Singapore * - fixes from Hans' code review * - log file path changes as from Pivot v1.40, which will be any day now. * - make the seach url multi weblog safe * * v 1.0 2006/09/04 Singapore * initial version *