================================================================== Snippet-title: slink v2. Creator: Graham Keellings E-mail: pivot@keellings.com Website: http://www.keellings.com/software/pivot.php Creation date: 6 Nov 2005, Sentosa Island, Singapore ================================================================== Content of zipped file: ----------------------- snippet_slink.php readme_slink.txt (this file) Usage: ------ 1) unpack this package in your extensions/snippets/ folder. 2) create your snippet_slink.dat file, as described below 3) place a [[slink]] tag, with the appropriate parameters, in your Entry Page template, whereever you want the output to appear(generally, after [[body]] and before your entry footer) 4) rebuild the FrontPage(s). Description: ------------ * A snippet to make it easy to insert frequently used URLs into your posts * (or even into templates). Parameters: ----------- * This snippet uses the file 'snippet_slink.dat' in your snippets directory, * which you provide. * * Each line consists of 3, possibly 4, entries, separated by a vertical * bar '|' (configurable). * * Each line should have either: * || * or * ||| * e.g e|eBay|http://www.ebay.com * or g|Graham's Pivot Snippets|http://keellings.com/software/pivot.php|Check regularly for more new snippets * * Note: The , which is what will actually be shown on the * web page, can be left blanks, or enetered as * and it will take the same * value as the name, * e.g google|google|http://www.google.com * * The is any descriptive text you want, which will appear as a popup * bubble when the reader hovers his cursor over the link. * * IMPORTANT: the is not yet implement, but will be "Real Soon Now". * However, you can add add it to your snippet_slink.dat now and it will magically appear in your blog as soon as I can get the code fixed * (watch out for v2.0 :-) * * @param string shortCut - a shortcut for the URL which you wish to enter, * e.g 'family', 'google', etc The snippet will try * to find this in your snippet_slink.dat file * (Note: comparison is not case sensitive) * @param string separator - if, for some reason, you want to use vertical * bars in snippet_slink.dat (perhaps in your ), * pass a different character in this parameter. * Of course, the character which you can choose * can only appear as a separator; otherwise, * you deserve the unexpected results which you get :-) * Default = '|' * @param int tooltip - Show the corresponding tooltip for 'shortCut' * if one exists in snippet_slink.dat. * 0 = don't show * 1 = show (Default) * * * @return The requested HTML, as specified by the parameters. * History: * * v 2.2 2006/20/10 Singapore * - output an empty AT Tag for any images, so that web page will validate. * I could allow this as an entry in the data file, but the obvious place is * just after the image, which would displace the tooltip, so that users * (even those with no images) with tooltips would have to edit their data * files. So I will wait until requested to support that. The important thing * is that even an empty string will validate as ALT text. * * v 2.1 2006/05/19 Singapore * - Tidied up the external file access mechanism * - Cretaed an on-line demo to be sure th snippet is thouroughly tested * - some minor fixes * * v 2.0 2006/01/28 Sentosa Island, Singapore * major rewrite, thanks to lieeu * Now supports various combinations of