================================================================== Snippet-title: get_posts v2.0 Creator: Graham Keellings E-mail: pivot@keellings.com Website: http://www.keellings.com/software/pivot.php Creation date: 13th December, 2005 Sentosa Island, Singapore ================================================================== Content of zipped file: ----------------------- snippet_get_posts.php readme_get_posts.txt (this file) Usage: ------ 1) unpack this package in your extensions/snippets/ folder. 2) place a [[get_posts]] tag in any post which you make, or any or of your template files (e.g frontpage_template.html). 3) rebuild the FrontPage(s). Description: ------------ * Outputs HMTL for a list of posts in the given weblog and categrory, by the * given author, one per line, as URLs with the post title as the URL text and * the post's permalink as its destination. * * Visit http://www.keellings.com/blog/_demos/get_posts.php to see it * in action * Parameters: ----------- * * If parameters are invalid or no posts are found, then the string * given in parameter noMatchString is returned (may be an empty string). * * @param string author - pass an author's name to restrict * selection, or '*' for all authors, * or '.' for 'author of current entry' (for * use in your entrypage_template.html * @param string weblog - pass '.'for the current blog, '*' for * all blogs, or a blog title like 'my_blog'. * @param string category - name of category to which posts must belong * Can be passed as '*' to mean all. * @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 for none. * @param string noMatchString - This will be returned if there are no * posts for the given month. * @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)" * @param int maxEntries - show at most this number of entries, as links. * If the 'maxEntries' parameter is negative, * the snippet will output this many full * entries, suitable for a front page, * rather than this many links * (default = 0, meaning show all) * @access public * @return string HTML as specified by the parameters. * * History: * * v 2.0 2006/09/06 Singapore * - if the 'maxEntries' parameter is negative, the snippet will output this * many full entries, suitable for a front page, rather than this many links * * v 1.9 2006/07/02 Holland by [AP] * changes by Albert Plomp , http://www.albertplompict.nl/ * - fixed error: Fatal error: Call to a member function on a non-object * - added extra option $showAuthor to be able to show/hide the * name of the author when $author = 'all'; * i.e. '