The most basic Textpattern plugin ever gets better
I’m not sure whether this is necessary or not, given the enhanced Textpattern <txp:thumbnail /> tag (for more info, visit the TextBook Project). At the very least, this gave me an opportunity to test the Textpattern plugin template from zem and file download tags in Textpattern using a very small text file, so here it is:
File:
bau_article_thumb-0.2.txt
Size:
Category: textpattern-plugins
created:
modified:
Downloads: 1213
Thanks to Manhog for adding attributes to this plugin to extend the functionality with CSS for version 0.2. (Whether this plugin is necessary or not with the revised txp:thumbnail plugin, I’m not sure. Check the default thumnbnail tag before using this one. I just haven’t had time to test it out yet.)
Syntax
The thumbnail tag has the following syntactic structure…
<txp:bau_article_thumb />
Attributes
Tag will accept the following attributes (note: attributes are case sensitive):
- class=�?style rule�? (CSS style rule)
- align=�?class name here�? (IMG align attribute)
Example
The tag should be used in an article form to output the thumbnail for a single image associated with an article. For multiple images, try the zem_article_image plugin.
<txp:bau_article_thumb class="thumbs" align="right" />
Preview Your Links
Particletree has come up with a script (Preview Your Links with Unobtrusive JavaScript) to automatically reveal the file type of download links.
Now, if anyone is able to adapt the client-side javascript from particletree to a server-side php plugin for Textpattern, that would be fantastic. I can imagine a plugin that determines the file type from the file name variable and modifies the anchor class based on the file type.
Perhaps the particletree team might be interested in pulling this off, as they happen to be Textpattern users themselves. If I have the time and the inclination, I might attempt this myself, as a tutorial in PHP and MySQL coding. But don’t hold your breath.
|
posted Thursday August 11, 2005