.

Pivot stuff - introductionSnippetsDownload statisticsPollTo Do listFor snippet authorsA heartfelt plea



[[random_entry]]Demo: hereReadMe: here
Selects one or more (user specified number, which can alos be random) random blog entries and returns either their URL (permalink) or the text of the entries (title/subtitle/introduction/body), as specified by the parameters.

The user may optionally specify a blog, author or category to restrict selection.
Download: here ( 1332 so far)Rating:
Rate (Ratings: 4 / 5 - Votes: 5)
Relased: 26th June, 2005Last update: 17th Oct, 2008

[[searcher]]Demo: hereReadMe: here
This snippet will add a URL to your entry which, when clicked, gives the same result as if a user had submitted a search term to the search box and clicked "go". The search term will be whatever you pass as a parameter to the snippet.

Although intended for use in entries, it could be used elsewhere.
Download: here ( 445 so far)Rating:
Rate (Ratings: 3.25 / 5 - Votes: 4)
Relased: 15th May, 2006Last update: 17th Oct, 2008

[[how_searched]]Demo: n/aReadMe: here
Add this snippet to a page and if the viewer reached it through a search engine, it will output some text, if you wish, about the search engine and the keywords used, formatted as you wish.

It can also, optionally, store this information to a file, to be preocessed later, probably by my [[snippet_show_how_searched]].

Although it is a snippet, it is not Pivot specific, and this functionality can be used on every page on your web site.
Download: here ( 773 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 10th March, 2006Last update: 17th Oct, 2008

[[top_searches]]Demo: n/aReadMe: here
A pair of snippets, one of which records the search terms which people use to search your blog, and the other of which you can use to display the most commonly used search terms.
Download: here ( 372 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 4th September, 2006Last update: 17th Oct, 2008

[[show_how_searched]]Demo: hereReadMe: here
This snippet processes the data file stored by my [[how_searched]] snippet and outputs information about either the lastest searches to find your site, or the most popular.

Although it is a snippet, it is not Pivot specific, and this functionality can be used on every page on your web site.
Download: here ( 677 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 10th March, 2006Last update: 17th Oct, 2008

[[word_cloud]]Demo: hereReadMe: here
Shows the 'word cloud' for your blog. The X (user defined) most commonly used words are shown with the font size indicating how often they are used'. Highly customisable (output sort order, list of words to ignore, etc), see the Read Me for details.
Download: here ( 301 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 2nd October, 2006Last update: 17th Oct, 2008

[[cat]]Demo: hereReadMe: here
A snippet intended to be used in your entries, to provide a link to all entries of a given category.

For instance, you might write this in an entry:
Last night I drank some [[cat:beer]], as is my wont of a Friday.

and the snippet will be replaced by a link to all entries in the category "beer".
Download: here ( 491 so far)Rating:
Rate (Ratings: 3 / 5 - Votes: 3)
Relased: 23rd May, 2006Last update: 17th Oct, 2008

[[hovertext]]Demo: hereReadMe: here
This snippet allows you to include tooltips in your Pivot entries.

If you don't know what a tooltip is, just hover your cursor of the word 'tooltips' on the previous line.
Download: here ( 497 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 30th June, 2005Last update: 17th Oct, 2008

[[backlog]]Demo: hereReadMe: here
Attention: This snippet is depricated. The same effect can now be achieved with the [[subweblog]] tag. See http://forum.pivotlog.net/viewtopic.php?p=66045#66045


I coded this one after someone requested it in the Pivot Snippet Request Forum.

It basically reverses the built in [[subweblog]] by printing the oldest entry first and the newest last. Useful for anything which is to be told in narrative form, like a journey.
Download: here ( 1062 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 31st August, 2005Last update: 17th Oct, 2008

[[on_this_day]]Demo: hereReadMe: here
Returns HTML code with text = title and a hyperlink (PermaLink) to the entry for entries posted 'on this day', up to a user specified maximum number of years ago.
Download: here ( 793 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 20th May, 2005Last update: 17th Oct, 2008

[[recent_months]]Demo: n/aReadMe: here
This one could well be placed at the top of the frontpage. It outputs three links, labelled "this month", "last month" and "2 months ago" (user definable text) and when the user clicks one of the links it will list the titles of all posts made in that month as URLs to the PermaLink of the entry.

When first shown, it defaults to "this month".
Download: here ( 898 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 26th June, 2005Last update: 17th Oct, 2008

[[recent_years]]Demo: hereReadMe: here
Recent_months' big brother, this one is similar, but shows years at a time, instead of months.

It outputs links for a user definable number of year and when the user clicks one of the links it will list the titles of all posts made in that year as URLs to the PermaLink of the entry.

When first shown, it defaults to the current year.
Download: here ( 661 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 1st October, 2005Last update: 17th Oct, 2008

[[toc]]Demo: n/aReadMe: here
Show an alphabetical Table Of Contents for your blog. Not everyone uses their blog as a diary; some use it for its functionality as a Content Management System (I have seen Pivot 'blogs' devoted to recipes). Personally, I like to use whimsical and inventive titles for my posts and my visitors like to browse them and select interesting sounding entries.

By using a parameter which indicates how many entries maximum may appear on a page, you can either display all entries, or only those beginning with a given letter (default ='A') with links to view posts beginning with any other letter.

You can also arrange it so that common words, like 'I', 'The', 'A', 'An ', etc appear at the end of the title, rather than the front, to avoid entries 'bunching up'. E.g, 'The big bang' becomes 'big bang, The'.
Download: here ( 1061 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 19th November, 2005Last update: 17th Oct, 2008

[[google_rank]]Demo: n/aReadMe: here
Not much use to me, but I found some free code which it was easy to 'wrap'in a Pivot Snippet. Returns the 'Google Rank' for a given URL, which is a value between 0 and 10.

For more info visit:
http://www.google.com/corporate/tech.html
http://en.wikipedia.org/wiki/PageRank
http://www.google.com/webmasters/4.html

For example, google.com has a perfect Google Rank of 10; my wonderful site rates an absolute zer0 and pivotlog.net rates a fairly respectable 5.
Download: here ( 835 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 16th December, 2005Last update: 17th Oct, 2008

[[count_down]]Demo: n/aReadMe: n/a
Another request from the Pivot Snippet Request Forum.

It counts down the number of days until a given date (Christmas, your birthday, etc).

Currently, only month and day are specified, so it won't count down the days until your 100th birthday, unless you are 99 years old. If anyone requests such functionality, I will implement it.

As of v1.2, it will also count up from a given date ("Christmas was X days ago").
Download: here ( 1244 so far)Rating:
Rate (Ratings: 3.33 / 5 - Votes: 3)
Relased: 4th July, 2005Last update: 17th Oct, 2008

[[get_posts_for_month]]Demo: n/aReadMe: here
Note to other snippet authors: I call this one from several of my other snippets (in fact, it is not of much use otherwise); feel free to use it as a building block for some of yours.

This snippet outputs HTML for a list of posts in the given month, one per line, as URLs with the post title as the URL text and the post's permalink as its destination.

If parameters are invalid or no posts are found, then the string given in parameter noMatchString is returned (may be an empty string).
Download: here ( 791 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 19th August, 2005Last update: 17th Oct, 2008

[[get_posts]]Demo: n/aReadMe: here
Another request in the forum, but also one that I wanted to code for myself anyway.

This snippet outputs HTML for a list of posts by the given author/in the given blog/in the given category (where all of these can be wildcarded), one per line, as URLs with the post title as the URL text and the post's permalink as its destination, or it can also output complete posts. Optionally, the number of comments for entry can be shown too.
Download: here ( 1467 so far)Rating:
Rate (Ratings: 4 / 5 - Votes: 5)
Relased: 18th December, 2005Last update: 17th Oct, 2008

[[previous_in_category]]Demo: n/aReadMe: here
This snippet returns a 'quick list' of titles of previous entries, in the same category as the entry currently showing on the entry page, as specified by the parameters, as URLs with the text being the title of the entry and the link being the permalink of the entry.

Note that this snippet has no effect on pages other than an entry page (so there is no demo - visit one of my entries to see it in action).
Download: here ( 879 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 18th December, 2005Last update: 17th Oct, 2008

[[archive_summary]]Demo: hereReadMe: here
An extended version of the built in [[archive_list]] which adds a count of the number of posts (user formatable) after each month, unless you pass a certain parameter, in which case it creates links to my [[archived_month_summary]] snippet, whose output I personally prefer to the standard archives.

This one was requested on the Pivot Forum

Important: this currently only works for those who use monthly archives
Download: here ( 910 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 14th October, 2005Last update: 17th Oct, 2008

[[top_commenters]]Demo: hereReadMe: here
A snippet to show those who comment most often on your blog, with, optionally, a link to their website.
Download: here ( 191 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 11th October, 2006Last update: 17th Oct, 2008

[[comments_by]]Demo: hereReadMe: here
This snippet shows a drop down list of all all commenters, and when the user selects one, it shows a list of all entries to which he has commented, as URLs
Download: here ( 173 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 12th October, 2006Last update: 17th Oct, 2008

[[slink]]Demo: hereReadMe: here
A snippet to make it easy to insert frequently used URLs into your posts (or even into templates, allows for a shortcut, a long text and (in v2.0) a tooltip).

Just use something like [[slink: g]] to expand to Check regularly for more new snippets.
Download: here ( 899 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 14th November, 2005Last update: 17th Oct, 2008

[[dart]]Demo: n/aReadMe: here
A simple snippet to Display A Random Text from an array declared within the snippet, or, from v1.1 onwards, from a text file in the template directory.
Download: here ( 637 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 20th February, 2006Last update: 17th Oct, 2008

[[fortune]]Demo: hereReadMe: here
A Pivotization of the classic Unix fortune cookie program, which generates random text
Download: here ( 744 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 23rd November, 2005Last update: 17th Oct, 2008

[[lorem_ipsum]]Demo: hereReadMe: here
A Lorem Ipsum generator, of questionable use, except, perhaps by template designers, since it will be easier for them just to put a [[lorem_ipsum]] tag into their template, rather than 10 or 20 actual paragraphs of text.
Download: here ( 637 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 26th June, 2005Last update: 17th Oct, 2008

[[last_update]]Demo: n/aReadMe: here
This snippet was requested in the Pivot forum and returns the date that you last editted the entry.

The best place to use it is probably somewhere in pivot/templates/_sub_entry_standard.html in the footer line after [[introduction]] [[more]].
Download: here ( 1162 so far)Rating:
Rate (Ratings: 2.5 / 5 - Votes: 2)
Relased: 4th October, 2005Last update: 17th Oct, 2008

[[pooh]]Demo: n/aReadMe: here
This snippet generates an invisible link to your Project Honeypot page; place a [[pooh]] tag in any/all templates and "rebuild all files" and you will generate bait to lead the spammers to your Project Honeypot page (is it just coincidence that my randomly generated page is called "handsome"?).
Download: here ( 655 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 4th September, 2005Last update: 17th Oct, 2008

[[show_ccount]]Demo: hereReadMe: here
If, like me, you use PHPJunkYard's CCount scipt to count your downloads, this snippet will read your data file and will output the X most popular, where you give a value for X.
Download: here ( 710 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 1st March, 2006Last update: 17th Oct, 2008

[[nasa]]Demo: hereReadMe: here
This snippet allows you to place the NASA image of the day on your page with various possibilities of small image (with/without large image popup) or large image.
Download: here ( 705 so far)Rating:
Rate (Ratings: 2 / 5 - Votes: 2)
Relased: 8th October, 2005Last update: 17th Oct, 2008

[[fuzzy_date]]Demo: n/aReadMe: here
Returns the 'fuzzy_date' (or time) corresponding to a given date/time. Useful when added to _sub_entry_standard.html and entrypage_template.html with parameter '.', to show the 'fuzzy' posting date of each entry in your blog.

It returns something along the lines of 'a quarter of an hour ago', 'three hours ago', 'yesterday evening', 'on Thursday', 'last week', etc .
Download: here ( 937 so far)Rating:
Rate (Ratings: 3.33 / 5 - Votes: 3)
Relased: 23rd December, 2005Last update: 17th Oct, 2008

[[new]]Demo: n/aReadMe: here
Possibly the only snippet ever written in the back seat of a Renault Megane on Christmas eve. The idea came to me on the M1 motorway heading north out of London for the Christmas holiday.

Drop this snippet in the definition of an entry on your _sub_entry_standard.html or entrypage_template.html and any entry less than a given number of days old will be marked as "New", either as text, or with an icon. This marking disappears automatically when the entry is no longer new.
Download: here ( 798 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 27th December, 2005Last update: 17th Oct, 2008

[[el]]Demo: n/aReadMe: here
Probably a little too esoteric for most folks, but I did find a use for it :-)

Pass an entry number and some text to this snippet and it will generate a link (URL). The text of the link will be text which you pass, and the tooltip when the user hovers his cover over it, will show the title of the entry.
Download: here ( 87 so far)Rating:
Rate (Ratings: 5 / 5 - Votes: 1)
Relased: 8th February, 2007Last update: 17th Oct, 2008

[[moon_phase]]Demo: hereReadMe: here
Waxing GibbousReturns various information about the current phase of the moon, as specified by the parameter.

For instance, the moon is "Waxing Gibbous" today.
Download: here ( 701 so far)Rating:
Rate (Ratings: 2 / 5 - Votes: 2)
Relased: 25th October, 2005Last update: 17th Oct, 2008

[[zodiac]]Demo: hereReadMe: n/a
A trivial little snippet to return the sign of the zodiac for a given date, or for today.

For instance, today's sign is " Aries".
Download: here ( 624 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 31st August, 2005Last update: 17th Oct, 2008

[[chinese_zodiac]]Demo: n/aReadMe: n/a
Error - desciption not available
Download: here (  so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: -->Last update: n/a

[[stardate]]Demo: n/aReadMe: here
A piece of frippery which will take a date (or "now") and convert it to a "stardate" (whatever that may be ;-)

It will also take the date of the current entry, which is useful for your frontpage and entrypage templates.
Download: here ( 600 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 2nd September, 2005Last update: 17th Oct, 2008

[[ddate]]Demo: n/aReadMe: here
An invaluable snippet which will convert a given date, or today's date, to the Discordian calendar.

For instance, today is " Setting Orange, the 37th of Discord in the YOLD 3180.".
Download: here ( 586 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 3rd September, 2005Last update: 17th Oct, 2008

[[unused_images]]Demo: n/aReadMe: here
A quick & dirty script to find unused images in your Pivot images directory.
Download: here ( 673 so far)Rating:
Rate (Ratings: 1.5 / 5 - Votes: 2)
Relased: 20th February, 2006Last update: 17th Oct, 2008

[[skeleton]]Demo: n/aReadMe: here
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 weblog and category, allowing for wildcards, and loops through all entries selecting only published entries which match the desired weblog, author 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.
Download: here ( 1024 so far)Rating:
Rate (Ratings: 0 / 5 - Votes: 1)
Relased: 22nd August, 2005Last update: 17th Oct, 2008



Pivot stuff - introductionSnippetsDownload statisticsPollTo Do listFor snippet authorsA heartfelt plea

Valid HTML 4.0! Last modified: 21 April 2010    Page loaded in 3.120096 seconds.        This page has been visited 58 times since the great site reorganization of June 2005.