================================================================== Snippet-title: toc v1.0 Creator: Graham Keellings E-mail: pivot@keellings.com Website: http://www.keellings.com/software/pivot.php Creation date: 19 Nov 2005, Sentosa Island, Singapore ================================================================== Content of zipped file: ----------------------- snippet_toc.php readme_toc.txt (this file) Usage: ------ 1) unpack this package in your extensions/snippets/ folder. 2) place a [[toc]] tag, with the appropriate parameters, whereever you want the output to appear. 3) rebuild the FrontPage(s). Description: ------------ * Creates HTML output with titles of blog entries as hyperlinks to their * permalink, optionally filtered by category or start letter or summarized by * month. * * If number of entries for category exceeds a user defined threshold then an * alphabetical listing is forced. * * Visit http://www.keellings.com/blog/_demos/toc_short.php * and http://www.keellings.com/blog/_demos/toc_long.php to see * it in action Parameters: ----------- ATTENTION: There is a problem at the moment, whereby the weblog parameter *MUST* be passed by name e.g 'my"blog'. The values '.' and '*' do not seem to be working. I am trying to debug this, but since the snippet can still be used I have decided to release it. Watch out for v2.0 "Real Soon Now" (tm) * @param string weblog - pass '.' for the current blog (default), '*' * for all blogs, or a blog title like 'my_blog'. * @param string category - list only entries of the given category, or all * categories if omitted or set to *. * @param int threshold - if there are more than this number of matching * entries they will not all be shown on one page; * instead one page per initial letter will be * generated (even if it has more than * on a page) and links to entries beggining with * each letter will be generated at the top and * bottom of the generated page. * (default = 50) * @param string endWords - To avoid long lists of titles starting with the * same common words, like 'I', 'the' and 'A', use * this parameter, to shift these words to the end * of the title, so that "The big bang" becomes * "big bang, The". * The first character of this parameter is the * separator for the word list which follows, * e.g ',the,a, an' means that the words 'the', * 'a' and 'an' should go to the end. * Note that the words are checked case * insensitively, so if you specify only 'the', the * snippet will also match 'The'. They are also * checked as whole words, so that 'the' does not * match 'they' or 'there' (see parameter 'deliniters'). * Note also that the separator which is the first * character will also be placed before the word * which is moved to the end(and followed by a * space), so that a parameter of ',the,an,a' turns * 'the big bang' into 'big bang, the'. * @param string delimiters - if parameter 'endWords' is specified, then this * string specifies the charcters which should be * considered as word delimiters. *