Professional Web Developer, Apprentice Photographer
Feedback can be offered via this forum thread on the official Textpattern forums.
pnh_mf is a plugin for the popular Textpattern blog software and CMS that adds a simple way to incorporate microformats into your website.
Microformats, if you haven't encountered them, are a collection of defined ways of using the XHTML tags and attributes you have always used in order to model data in a way that can be picked up and interpreted by a variety of tools (like saving vcards for importing them into other applications). And that there is one helluva sentence.
Version 1.2 - Released 3/18/2007 - Made compatible with Textpattern 1.0.4
Version 1.0 - Released 6/25/2006 - Added support for the hReview microformat and made some minor bug fixies to hCard and elsewhere.
Version 0.8 - Released 1/23/2006 - Includes new admin side 'Useful Tags' helpers and some minor bug fixes.
Version 0.5 - Released 1/15/2006 - Initial Public Release.
All of these tags can be used in either templates ('pages'), snippets ('forms') or in article bodies, but cannot be used in comments. Unless otherwise stated, all attributes for each tag have been shown in the example usage.
This microformat is used to designate a relationship between the owner of a document and the person being linked. See the spec page for valid values for defining such relationships.
<txp:pnh_mf_xfn rel="contact" href="https://placenamehere.com">Chris</txp:pnh_mf_xfn>
<a href="https://placenamehere.com" rel="contact">Chris</a>
This tag also supports the following standard attributes: id, class, title
This microformat provides a standard way of describing a contact and follows the vcard standard. This is quite a flexible format that can be used to identify everything from an AIM screen name to a person's birthday. The pnh_mf_hcard tag is a bit less flexible but can include all of the attributes shown in the examples.
The pnh_mf_hcard tag can accept one or more addresses via the pnh_mf_adr tag. See below for details of pnh_mf_adr usage.
<txp:pnh_mf_hcard name="John Doe" href="http://john.example.com/" orghref="http://example.com/" org="Example Group, LLC" email="john@example.com" imghref="https://placenamehere.com/temp/butters.gif" worktel="(555) 555-WORK" hometel="(555) 555-HOME" celltel="(555) 555-CELL" workfax="(555) 555-0FAX x123">
<txp:pnh_mf_adr type="home" />
</txp:pnh_mf_hcard>
<div class="vcard"><img src="https://placenamehere.com/temp/butters.gif" alt="photo" class="photo" /><a class="url fn" href="http://john.example.com/">John Doe</a><div><a href="http://example.com/" class="org">Example Group, LLC</a></div><div class="tel"><span class="type">Work</span>: <span class="value">(555) 555-WORK</span></div><div class="tel"><span class="type">Home</span>: <span class="value">(555) 555-HOME</span></div><div class="tel"><span class="type">Cell</span>: <span class="value">(555) 555-CELL</span></div><div class="tel"><span class="type">Fax</span>: <span class="value">(555) 555-0FAX x123</span></div><div><a class="email" href="mailto:john@example.com">john@example.com</a></div>
<div class="adr"><div><span class="type">home</span> Address</div></div>
</div>
The adr microformat is used to designate an address and is taken from a subset of the hCard standard.
<txp:pnh_mf_adr streetaddress="9 Happy St." extendedaddress="Apt. 3" locality="Somecity" region="NJ" postalcode="12345-6789" country="U.S.A." />
<div class="adr"><div class="street-address">9 Happy St.</div><div class="extended-address">Apt. 3</div><span class="locality">Somecity</span>, <span class="region">NJ</span> <span class="postal-code">12345-6789</span><div class="country-name">U.S.A.</div></div>
This tag also supports the type attribute for use in conjunction with pnh_mf_hcard.
This is used to define an event that can be extracted and imported into any calendaring application that supports the iCalendar standard.
If no values for human readable start and end dates are provided they will be generated based on the entered values of dtstart and dtend.
Please be aware of expectations on hCalendar dates, particularly concerning end time values and its exclusivity.
<txp:pnh_mf_hcalendar summary="SXSW" location="Austin" href="http://2006.sxsw.com/" dtstart="20060310" start="March 10" dtend="20060320" end="19, 2006">
A Description
</txp:pnh_mf_hcalendar>
<div class="vevent"><a class="url" href="http://2006.sxsw.com/"><abbr class="dtstart" title="20060310">March 10</abbr> - <abbr class="dtend" title="20060320">19, 2006</abbr> - <span class="summary">SXSW</span> - <span class="location">Austin</span></a><div class="description">
A Description
</div></div>
Detailed documentation to come. In the mean time see the microformats.org site and the plugin help inside the Textpattern admin area.
The reTag microformat offers a standard way of designating a link as a “tag” for the current document.
If no href is defined a link to Technorati will be used.
<txp:pnh_mf_tag>textpattern</txp:pnh_mf_tag>
<txp:pnh_mf_tag href="http://del.icio.us/tag/textpattern">textpattern</txp:pnh_mf_tag>
<a href="http://technorati.com/tag/textpattern" rel="tag">textpattern</a>
This tag also supports the following standard attributes: id, class, title
The reLicense microformat offers a standard way of designating a link representing a license (CC, GPL, etc.) for the current document.
<txp:pnh_mf_license href="http://creativecommons.org/licenses/by-nc-sa/2.0/">by-nc-sa 2.0</txp:pnh_mf_license>
<a href="http://creativecommons.org/licenses/by-nc-sa/2.0/" rel="license">by-nc-sa 2.0</a>
This tag also supports the following standard attributes: id, class, title
this microformat marks up something something.
This microformat is only in the working draft stage and may change in the future.
<txp:pnh_mf_geo lat="0.1" long="0.2" />
0.1 0.2
<span class="geo"><span class="latitude">0.1</span> <span class="longitude">0.2</span></span>
Last Updated 03/18/2007