Textpattern CMS Plugins: Introducing smd_featured

admin-ajax

Continuing my series on Textpattern CMS plugins, today is the turn of smd_featured. This plugin by Stef Dawson, a Textpattern core developer, extends the administration side of Textpattern by adding an extra tab through which featured articles can be selected and subsequently displayed on the front end with a selection of new smd_featured-specific Textpattern tags.

This plugin is another code-only extension, so no FTP upload is required. Download the plugin from Stef’s website, and copy + paste the contents of the .txt file – which looks like this (trimmed for brevity):

# Name: smd_featured v0.50
# Type: Admin/Public plugin
# Quickly label and display featured articles for your site's home / landing pages
# Author: Stef Dawson
# URL: http://stefdawson.com/
# Recommended load order: 5
# .....................................................................
# This is a plugin for Textpattern CMS - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# .....................................................................
YToxMjp7czo0OiJuYW1lIjtzOjEyOiJzbWRfZmVhdHVyZWQiO3M6NjoiYXV0aG9yIjtzOjEx
OiJTdGVmIERhd3NvbiI7czoxMDoiYXV0aG9yX3VyaSI7czoyMjoiaHR0cDovL3N0ZWZkYXdz
b24uY29tLyI7czo3OiJ2ZXJzaW9uIjtzOjQ6IjAuNTAiO3M6MTE6ImRlc2NyaXB0aW9uIjtz
[...]
X3VuZmVhdHVyZV9jb25maXJtID0+IEFyZSB5b3Ugc3VyZSB5b3Ugd2FudCB0byByZW1vdmUg
dGhpcyBhcnRpY2xlIGZyb20gdGhlIGZlYXR1cmVkIGxpc3Q/CnNtZF9mZWF0X3VubGFiZWxs
ZWQgPT4gW3VubGFiZWxsZWRdIjt9

…into the box in the Admin → Plugins tab. Click or tap Upload, then click or tap Install to confirm. Finally, click or tap No on the toggle the status to active. The plugin is now installed. The fun starts when you switch to the Content tab and note the new Featured articles tab on the right side:

Google ChromeScreenSnapz009

This tab shows your articles in tabular form. Clicking or tapping articles will toggle their status from un-featured to featured. When one or more articles are featured, this then opens up lots of customisation options with the new smd_featured-specific tags:

  • <txp:smd_featured />
  • <txp:smd_featured_info />
  • <txp:smd_unfeatured />
  • <txp:smd_if_featured>

Note the format of the new tags. They all begin <txp:, which Textpattern interprets with its tag parser, and the part immediately after the colon identifies the plugin to which it relates. At a high level, the <txp:smd_featured /> and <txp:smd_unfeatured /> tags are largely equivalent to the <txp:article /> tag, but will parse articles that are flagged as featured or un-featured instead of from a given section.

The <txp:smd_featured_info /> tag outputs additional information that can optionally be applied to each featured article. Finally, the <txp:smd_if_featured> tag is a conditional tag that can detect whether a given article is featured. All of these tags are explained in full by Stef at his website, and I’d be doing a disservice to him by repeating it parrot-fashion here. If this is a plugin that appeals to you, I recommend you check out the link above for more information.

Looking for quality Textpattern Hosting? Look no further than Arvixe Web Hosting and use coupon TEXTPATTERN for 20% off your first invoice!

Tags: , , , , , , , , , , , , , | Posted under Textpattern | RSS 2.0

Author Spotlight

Pete Cooper

Pete Cooper has been using Textpattern since 2005. Textpattern is his preferred CMS weapon of choice. Its logical and flexible approach to content management makes Pete happy, as does its lightweight core and helpful user community. Pete's website - petecooper.org - runs on top of Textpattern and chronicles his day-to-day experiences from his home near the Atlantic in north Cornwall, United Kingdom.

Leave a Reply

Your email address will not be published. Required fields are marked *