================================================================== Snippet-title: on_this_day v1.4 Creator: Graham Keellings E-mail: pivot@keellings.com Website: http://www.keellings.com/software/pivot.php Creation date: 19 May 2005 ================================================================== Content of zipped file: ----------------------- snippet_on_this_day.php readme_on_this_day.txt (this file) Usage: ------ 1) unpack this package in your extensions/snippets/ folder. 2) place a [[on_this_day]] tag in any of your template files (I recommend placing it in frontpage_template.html, just before [[subweblog:standard]] ). 3) rebuild the FrontPage(s). Description: ------------ This tag returns HTML code with text = title and a hyperlink to the entry for entries posted "on this day", up to a user specified maximum number of years ago. Parameters: ----------- * @param string beginText - If any entries are found, then this text will be * written to the generated HTML before the entries * (e.g, '

On this day...

' * @param string endText - If any entries are found, then this text will be * written to the generated HTML after the entries * (e.g, '
') * @param string noMatchText - If no entries are found, then this text will be * written to the generated HTML between beginText * and endText (neither will be written if this * parameter is empty) * (e.g, '

In previous years..

'apparently * nothing interesting happened on this day.' * Pass an empty string '' if you don't want to see * anything * @param string weblog - This really *should* be specified. If not, or if * passed as '*', the snippet will attempt to use * the current blog, failing that, the first blog * found * @param int maxYears - Only output entries up to this many * years old. * History: * * v 1.4 2006/05/19 Singapore * - fixed to make it work correctly with Pivt 1.30 RC2. It was not generating * correct URLs owing to a workaround required for a previous Pivot version * which had to be removed for 1.30 (undid v1.3 of the snippet) * - added 'version control' * * v 1.3 2006/02/21 Sentosa Island, Singapore * - work around a known Piovt problem with snippets which call make_filelink() * * v 1.2 2006/01/16 Sentosa Island, Singapore * - local variable $db clashed with global variable * - change all output '
' to '
' for W3C validator compliance * - added 'version control' * * v 1.1 2005/10/21 London, UK * fixed a problem pointed out by Matthias D in another snippet, which was * based on this one. If parameter $weblog is '*', we need to use a real * weblog when calling some Pivot functions or accessing some Pivot data. * * v 1.0 2005/04/18 London, UK * initial version