Nurturing coder's tan

c: | m: | f: /

Programmers are a breed unto their own. Pains me to admit I am one, but it gives me something to do. Every now and then I lend a small part of my brain to my hands, which dutifully tap out something resembling software; usually PHP / HTML / Javascript / CSS or some other script-based language such as awk.

I’m also a Textpattern Developer/geek. In case you’ve not heard of it, it’s an awesome, lightweight open-source Content Publishing System for making websites that are easy to create and maintain. I’ve written a truckload of sites using it and have contributed a fair few free plugins — under the pseudonym “Bloke” — to the uber-friendly community too. As you’d expect, my Txp code’s often random in nature, since randomimity is the spice of creation.

If you like my code and find it useful, feel free to show your appreciation with something from my UK Amazon wish list (or US) or donate to the Stef Dawson community coding pot, either via paypal.me/stefdawson or by following the Donate button below to PayPal. Thanks!

ied_plugin_composer

An update to the amazing ied_plugin_composer plugin from Yura Linnyk. Now uses the standard plugin template (plus some neat CSS mods by net-carver), supports Textiled help, Library + Admin only plugins, AJAX support, compressed plugins, minimal rollback/restore and a few other niceties.

If you want to create a plugin for Textpattern, this is the tool for you.

smd_access_keys

Ever wished you could easily restrict access to an entire Textpattern URL? Or part of a page? Or a file download? Now you can. Generate access keys for any URL and limit the number of permitted accesses to that resource and/or the time period that resource is available. An access token is generated (as part of a tamper-proof URL) that can be shared with your visitors to unlock premium content or time-limited promotions. Inkeyredible.

smd_admin_themes

Take Textpattern admin side themes to the next level with this beastie. Import, export, update, share, manage, and edit themes with ease through a graphical interface. You may also decide to set all your authors to have the same theme, or to use different themes for certain privilege levels, or even allow authors to choose their own (selected from a configurable subset of installed themes). Skin-a-rific.

smd_article_stats

Ludicrously simple client side article body/excerpt word count plugin for Textpattern, with an admin-side panel as well. There’s not much else to say about it so I’ll use this space to tell you about my collection of wildebeest. There’s Jeff, Colin, Maisie, Chan, Lucy and Derek and they’re all lovely in their own special way, though the garden’s a bit full. The neighbours complain about the noise, but Colin knows a man who can fix that. He’s a bit of a dark horse is our Colin.

smd_at_work

Although it pains us to do so, sometimes you just have to take your website down for maintenance. Make it easy on yourself with this plugin, which adds a handy toggle preference to flick your site between online and offline states at the flick of a switch. Also shows a natty reminder at the bottom of the admin screen all the time your site is in maintenance mode. Never inadvertently leave your site off-air again. It’s uptime-taculous.

smd_babel

Permit language translations directly from the Admin side of your Textpattern site. Strings for any installed languages in your site – for core or any installed plugins – can be manipulated or altered, then exported as Textpacks for distribution.

smd_bio

Give your users the ability to store more info about themselves than the boring old defaults. Department? Add a dropdown. Bit of blurb? Add a text area. Preferred place to be punched? Add a radio button set. Favourite A-Team episode? Add a text input box. Yes, the plugin that does for users what glz_custom_fields does for articles. Pimp your authors: they deserve it.

smd_browse_by

Sometimes you want faster filtering of your articles, images, files or links than by typing alone. Enter this plugin which adds a dropdown select list above the Search box to permit rapid filtering by Txp Category. Also adds a Section dropdown on the Articles panel. Filtration is thus yours (plugin based on lam_browse_by).

smd_calendar

A complete calendar and event manager for Textpattern. Each event can be scheduled, repeated, omitted, or cancelled and you can specify national holidays too. A suite of tags (including a conditional tag) allow you to build simple or complex date and event-based websites. No need for any new tables or paraphernalia in Txp because each event you wish to display on your calendar is a standard Textpattern article, so you can use standard tags to output event details. It’s calendarific.

smd_countdown

Show visitors exactly how much time they have left. Not necessarily until they die, but until some web-based event of your fashioning. Could be time until the next chapter of your book is released, could be the time until a competition expires. Use the time features of Txp articles to your advantage and tell people when things happen. Pimp-my-site-dot-com.

smd_crunchers

Library of compression / decompression algorithms. Adds tar, zip, gzip, and bzip2 mechanisms; some of which are not available in all server setups.

smd_each

Allows you to iterate over variables and process each one with a Textpattern form. Very useful for processing user input from an HTML form or simply looping over variables in the Txp core. Counting sheep is best done with a separate plugin, though.

smd_faux_role

On-the-fly role alteration so you can experience the admin side as your other users will see it. Adds a drop-down to the admin side either on its own tab or permanently on the screen. Very useful for testing purposes since it means you don’t have to create a whole bunch of accounts of varying user levels just to see how/if things work as you expect. Mmmmmmm MyAlterEgo.com.

smd_fuzzy_find

Offer Txp site visitors alternative results for search terms they supplied and mis-spelled or didn’t quite type correctly. Not perfect, but pretty reasonable fuzzy logic that usually has a good stab at working out what you meant to type. Fuzz-tastic.

smd_horizon

The Textpattern universe is usually limited to traversing visible, posted articles. Not any more. See what is coming over the horizon with this plugin. Tease your audience with any info (even images) from future articles or take a different course of action when you reach the end of a series of articles. The plugin is an enhancement for the link_to_next/prev and if_first/last tags.

smd_if

Generic conditional logic for doing if this AND that in Textpattern. Compare article id, image, category, section, custom field, url variables, server variables, txp:variables, php variables, files, links, pretty much anything you can get your grubby mitts on. Use operators like begins with, ends with, contains, in, equals, not equal, greater than, etc and compare your fields to any other fields, or fixed text. It’s condition-mungous.

smd_lately

Show people what’s hot and what’s not on your Textpattern site. List the most viewed articles by popularity, or show a visitor what they’ve been looking at, or what they’re missing that others have been looking at. It’s advertainment.

smd_lib

A library of common functions that glue together various smd_ plugins.

smd_macro

Frustrated with Textpattern tags not quite doing what you want? Do you or your clients hanker after a mega-tag that simultaneously generates a gallery, counts article words and pets your rhinoceros for you? Hanker no more: create your own virtual tags with this handy plugin and assign optional attributes to them which you can insert into the macro definition at runtime. It’s macro-magical.

smd_multi_choice

A select… case construct for Txp that allows you to compare one variable against a series of values, taking a different action against each match. A default action takes care of the case when none of your options match the input, and you can perform multiple tests for the same action or ‘fall through’ to subsequent tests. Switch-a-rooga.

smd_pagicle

Automatically split long articles into bite-size hunks which visitors can navigate between using a stylable pager. Split by text, regular expression or on particular tags. The whole article is loaded in one go; the various pages are simply hidden from view via jQuery magic. It’s page-chompingly handy.

smd_parent

Grabs the parent category from any given child in the Txp category tree. With large hierarchies you are not restricted to grabbing the ‘root’ element but can go any number of levels up the tree to find the category info.

smd_prefalizer

Ever wondered exactly what’s stored in your Txp prefs table? Wonder no more. Use this interface to browse, alter, create or delete preference settings until the novelty wears off. Go-go gadget pref screen.

smd_prognostics

Ever been hacked or had your Textpattern files compromised by a rogue script or attacker? Keep tabs on your precious file system with smd_prognositcs which monitors your site’s files for suspicious activity and alarms if things change. It’s the Peeping Tom of plugins.

smd_pullquote

On magazine and e-zine sites, sound bites and pullquotes are all the rage. The idea is to pull out a bit of the body text and style it in a side bar or breakout box to give visitors a flavour of what the article is about. This plugin does just that by allowing you to mark up your Textpattern articles such that quotes are automatically pulled out. Options are available to omit words to make the quote snappier and to pick random quotes from the entire article.

smd_qr_code

smd_query

If you ever hanker over raw SQL access to the Txp database but just can’t face embedding PHP code in your pages, this plugin is the go-between. Throw some SQL at the plugin and iterate over the returned rows to make lists, tables, whatever. Joins and complex gubbins like that are all supported if you need them. Optional result set pagination is available too. Querylicious.

smd_random_banner

As its name suggests this one selects random images or banner adverts. With a host of options for including or excluding banners using various article-based criteria, your pages will never be boring again. It also supports banners such as Flash or movie files, and even audio!

smd_random_text

Put a little spice on your page with some random text. Not totally random like ‘‘ (though you may choose so), it merely selects one or more items randomly from a list. That list may be made from a variety of sources in your Textpattern universe: a user-defined list, a database column, a file, a Txp variable, a Txp field or a URL variable. Static pages are so last week.

smd_remote_file

Allows you to handle remote files (such as those you host on file sharing sites) via the Textpattern Files panel. Very useful if you don’t have the bandwidth to offer large videos and mp3s on your own server.

smd_short_url

Automatically offer visitors the option of using site.com/article-ID as a shortcut for your real article titles. Optionally generate the canonical link tag for search engines to find and index. It’s canonicaisical.

smd_slimbox

This beastie is based on Christophe Beyl’s lightweight lightbox clone and is the precursor to the smd_gallery plugin. It rips images by category or ID out of the Txp database, using all manner of nefarious logic to allow lists of images to be created. These are then thumbnailed and put into navigable pages ready for Slimbox/Litebox/Thickbox etc to take over and display them in their full glory.

smd_style

Unsheath the full cromulence of your Textpattern stylesheets and present more than one to the world, optionally parsing Txp tags inside the stylesheet itself. Then allow your visitors to switch between them willy-nilly until their eyes glaze over, while a cookie tracks their favourite theme and optimizes the load order to suit their viewing experience. It’s switcheraneous.

smd_tabber

Create your own custom admin-side menu structure to augment the Textpattern default tabs. Assign a page/stylesheet to each tab and put your HTML markup, content, Txp tags, smd_macros, etc in the page to have it all appear on your new tab. I am your tabface.

smd_tags

Taking a fresh look at tagging and taxonomy in Textpattern, this plugin will enable you to tag / categorise articles, images, files and links as much as you like. It’s like a souped-up combination of rss_unlimited_categories and tru_tags. Define, list, filter and query tags that are related to other content. Optionally link tags to categories and/or allow site content editors to create tags on the fly. It’s tag-tacular.

smd_textile_bar

Display a toolbar above the textareas on the Write panel to aid with inserting Textile syntax to format content. Supports usual bold, italic, headings, superscript, subscript, lists, images, blockquotes, code, acronyms and custom form shortcode tags.

smd_thumbnail

Textpattern is restricted to one full-size and one thumbnail per image. If you wanted more you traditionally had to do it yourself, employ a third party script or let the browser (or CSS) scale the images for you. But now there’s another way. This plugin allows you to define unlimited, physical, thumbnail profiles for any image and create them all automatically on image upload/replacement. No more stretching, no more scaling, just as many thumbs as you wish. Public-side tags allows you to display any of the sizes, just like the native tags. Thumberlina.

smd_user_manager

Textpattern’s built-in author management is a little nebulous. Not any more. This plugin enhances your powers to search, filter and manage not only your users but also their permission groups and what each privilege level can do within Txp. Make new priv groups, or new priv areas and assign users to them, all from a single interface. All users can also manage their own profile info (and it integrates with smd_bio and smd_prognostic’s password strength meter). Privilicous.

smd_where_used

Keeping the admin side tidy can be a bit of a chore, especially when revisiting sites and updating them. To help keep on top of things, use this plugin to search for things you are not sure are still in use. If there are no references to that item in the Textpattern database you can delete it and keep your admin side less cluttered. Bliss.

smd_wrap

Wrap stuff with stuff. Most Txp tags come with built-in wraptag/class/break attributes but if they don’t, or you want to conditionally display content that may be optional, this plugin steps in. Though similar to adi_wrap it supports txp:else so you can display alternative messages if the contents are missing. It also permits transformations to be applied to the enclosed data, for example change case, linkify, sanitize, format date, strip tags, split/combine, textile, etc. Happy clappy snappy wrappy.

smd_write_cats

Ever get halfway through writing an article and realise you need a new category for it? Instead of visiting the Categories tab and worrying about refreshing your article so the new ones show up, just type a new category (or two, or three) in the box this plugin provides. The categories will be created and immediately assigned to the article when it is saved. SuperCatiFragilistic.

smd_xml

Grab any well-formed XML document from the web and extract hunks of it to display on your website. You could get twitter info, a list of delicious links or any other data you can get your mitts on. You can also optionally step through your records page by page or limit the content to those at the start or end of the document. If it’s XML, it’s fair game.

Source code

If you’d rather scrabble amid the ones and noughts, you’ll need to step into the view source page.

Legacy software

If, for some inexplicable reason, you need a prior version of a plugin, it can probably be found on the plugin archive page.

Experimental software

If you’re feeling brave, or fancy skateboarding into volcanos, you can test out some of my beta code. It can be found on the plugin beta page.