================================================================== Snippet-title: previous_in_category v1.4 Creator: Graham Keellings E-mail: pivot@keellings.com Website: http://www.keellings.com/software/pivot.php Creation date: 2 Oct 2005, London, Uk ================================================================== Content of zipped file: ----------------------- snippet_previous_in_category.php readme_previous_in_category.txt (this file) Usage: ------ 1) unpack this package in your extensions/snippets/ folder. 2) place a [[previous_in_category]] tag, with the appropriate parameters, in your Entry Page template, whereever you want the output to appear(generally, after [[body]] and before your entry footer) 3) rebuild the FrontPage(s). Description: ------------ * This snippet returns a 'quick list' of titles of previous entries, in the * same category as the entry currently showing on the entry page, as * specified by the parameters, as URLs with the text being the title of the * entry and the link being the permalink of the entry. * Note that this snippet has no effect on pages other than an entry page. * * Simple example of an entrypage: * * Quote: * Title of an article * * Hi this is an article! Bla bla bla bla bla bla bla bla * bla bla bla. Hi this is an article! Bla bla bla bla bla * bla bla bla bla bla bla. Hi this is an article! Bla bla * bla bla bla bla bla bla bla bla bla. Hi this is an * article! Bla bla bla bla bla bla bla bla bla bla bla. Hi * this is an article! Bla bla bla bla bla bla bla bla bla * bla bla. Hi this is an article! Bla bla bla bla bla bla * bla bla bla bla bla. * * Comments * * Wow nice article! * * Related articles * * First related article (5 comments) * Second related article (0 comments) * Third related article (2 comments) * * It is the purpose of this snippet to generate the "Related * articles", which are, in fact, the previous N (in this case 3) * entries in the same category (or categories). * * Visit http://www.keellings.com/blog/_demos/previous_entries.php to see * it in action Parameters: ----------- * @param string weblog - pass '.'for the current blog, '*' for * all blogs, or a blog title like my_blog * @param string introText - this will be printed before any 'related' * entries - but only if there are any, * otherwise it will not be printed * (see parameter 'noMatchText'). * @param string noMatchText - This will be returned if there are no * 'related entries' * @param int numPrev - the number of previous related entries for * which quicklinks should be generated * (default = 3) * @param string catText - if the entry was posted to multiple * categories, then this will be used to * format the name of the category which is * printed before each related entry of that * category. * If you pass '*' then the category name * will not be printed at all; if you pass * an empty string, then the category name * will be printed. If you pass anything else * it will be treated as a two part string, * separated by a vertical bar '|'. The first * part will be printed before the category * name and the second after. This is useful * for HTML tags, e.g '

|

'. Of c