==================================================================
Snippet-title: skeleton v1.7
Creator: Graham Keellings
E-mail: pivot@keellings.com
Website: http://www.keellings.com/software/pivot.php
Creation date: 25th August 2005, Glenrothes, Scotland
==================================================================
Content of zipped file:
-----------------------
snippet_skeleton.php
readme_skeleton.txt (this file)
Usage:
------
1) unpack this package in your extensions/snippets/ folder.
2) use it as a basis for a new snippet which you want to code,
adding and deleting code as you wish.
Description:
------------
I don't know if this is of any use to anyone...
I created it when I noticed that many of my snippets had similar
core functionality.
You can treat it as an example, if you are just learning snippet
coding - although I certainly do not claim to be any sort of expert.
Alternatively, you can use it as a basis for any similar snippet.
It accepts parameters to indicate desired author, weblog and category,
allowing for wildcards, and loops through all entries selecting
only published entries which match the desired author, weblog and category
(feel free to add further checks, e.g for date, etc).
Once you have located each entry, simply add your code; an
example is given of how to generate an HTML URL with the text
being the title of the post and the destination being the
permalink of the post.
For coding, I highly recommend the freeware PHP Designer 2005
available at http://www.mpsoftware.dk
* History:
*
* v 1.7 2006/08/25 Singapore
* - fixed bug with $author:
* if ($entry['user'] = $author)
* should be:
* if ($entry['user'] == $author)
* (compare, not assign)
* - reintroduced the make_filelink() workaround
*
* v 1.6 2006/03/01 Singapore
* - pass $Current_weblog and entry code (snippet_uid) to main part for dynamic
* usage, if needed. Explained this in the Pivot Wiki
*
* v 1.5 2006/02/17 Sentosa Island, Singapore
* - change all output '
' to '
' for W3C validator compliance
* - added 'version control'
* - added kludge to work on non "Live Pages"
*
* v 1.4 2005/12/27 London, UK
* added an $author parameter
*
* v 1.3 2005/11/05 Sentosa Island, Singapore
* added a $dateFormat parameter and some minor bug fixes ($Current_weblog
* not declared global) and spelling errors.
*
* v 1.2 2005/09/22 Munich, Germany
* added some code in comments which can be uncommented to show new snippet
* authors which data fields are available to them.
*
* v 1.1 2005/08/31 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/07/04 Kouvola, Finland
* initial version