================================================================== Snippet-title: recent_months v1.5 Creator: Graham Keellings E-mail: pivot@keellings.com Website: http://www.keellings.com/software/pivot.php Creation date: 5 May 2005, Vienna, Austria ================================================================== Content of zipped file: ----------------------- snippet_recent_months.php readme_recent_months.txt (this file) snippet_get_posts_for_month.php Usage: ------ 1) unpack this package in your extensions/snippets/ folder. 2) place a [[recent_months]] tag, with the appropriate parameters, in any of your template files, whereever you want the output to appear. 3) rebuild the FrontPage(s). Description: ------------ * IMPORTANT: this snippet requires at least Pivot 1.3 to work correctly. * On previous versions the last 2 parameters will be ignored. * * Outputs HTML with three links "this month/last/month/2 months ago" (text is * user definable by parameters), defaulting to this month. Each of the links * causes a list of post titles fopr that month to be output as URLs, leading * to the individual posts. * * Visit http://www.keellings.com/blog.php to see it in action * * Output might look something like this: * * Summary: This month Last month 2 months ago <--- click to change month * * My first post <--- these are the titles of the * Sun zoom spark <--- posts as URLS, linked to each * Web core, web core <--- individual post. * My head is my only house unless it rains * Yet another boring post * ----------------------------------------------------------------- * * Parameters: ----------- * @param string weblog - pass '.'for the current blog, '*' for * all blogs, or a blog title like 'my_blog'. * @param string introText - for instance "

Summary: " - will * be printed first * @param string monthsText - your texts for the three months, separated * by '|'. The defult is * "This month|Last month|2 months ago" * @param string noPostsText - for instance "Nothing happened" - will * be printed if a month has no posts * @param string outroText - for instance "
" - will be * printed last * @param string formatString - each line will be preceded by the entry * date formatted by this string (passed to * the PHPdate() function. e.g. y-m-d * Leave blank (default) for none. * @param string separator - This will be output between each URL. For * instance, passing '
' will put each * URL on a separate line, for a more formal * appearance, whereas ' ~ ', will run them * together, sepearted by ' ~ '. * Why not experiment? (default = '
') * @param int showCommentCount - if 0, then the number of comments will not * be shown. If 1 (default), then the number * of comments will be shown after the title, * but only if non-zero * e.g, 'Boring entry (13 comments)' * if 2, then the number of comments will * always be shown, even if zero * e.g, 'I won the lottery (no comments)' * The texts are taken from your language file * e.g "Anschluss des Sudetenlands (4 Kommentare)