A New Year, a new you, a new coat of paint on the old website

Testing…TESTING! Is this thing (still) on? Why yes it is. I know there has been exaggerated reports of my demise. I’m still here. Still kicking. Still coding.

I’ve decided to start off 2015 with a fresh design for the site. And maybe get back into writing about some of the cool projects I’ve been working on for the past few years. The new look is based on the WordPress Free Theme Flat. I’ve added some tweaks of my own to a child theme. More functionality to come over the next few weeks.

So where have I been? What have I been doing with my time? Over the past few years I’ve gone deep into WordPress plugin development. I was working for a major WordPress plugin vendor (not going to name them here but you can check out my LinkedIn profile if you are curious). During my tenor there I was responsible for development and supported for up to 26 plugins. I learned so much about how to write plugins to work across the wide range of hosting environments. How to be efficient with coding and how to get along with site running many dozen other plugins. I learned some valuable knowledge about WordPress Multisite as well as BuddyPress. So really want to bring that back to my own plugins.

Speaking of my own plugin. I’m in the process of rewriting parts of my Media-Tags WordPress plugin to work better within the new Backbone.js Media system used with WordPress. Lots of good changes coming soon.

In other WordPress directions I’ve fallen in love with WooCommerce. Thinking back to the early days of WordPress commerce engines (again not going to name names). I can remember having to literally hack the plugin to get things to work per the client needs. And hoping the client never ever upgraded. With the new WooCommerce 2.x it feels more like BuddyPress. Lots of way to override even the smaller elements. Not to mention tons of template files you can add to the theme to override the default action. There is one area I tend to dislike related to Variable Products managements. I’m working on an add-on of my own. Hope to announce it soon.

Besides my fallback WordPress projects, I’ve been working some in Swift, the new Apple language. As many have stated it does remind one of JavaScript in some of the syntax. But yet it is very powerful for creating apps. Speaking of JavaScript I’ve also been playing with Node.js. I’m very very excited about the potential there. First thing I thought of when playing with the modules is “someone ought to write a CMS in Node.js”. Well a few have started. The most promising is PencilBlue. They actually state in the documentation they want to replace WordPress. Lofty goal. I’ll need to find some time and join the development group. See if I can bring in some of my WordPress knowledge.

Other than coding related things. We are still discovering parts of North Carolina. Still have not made the road trip to Asheville. We both miss Texas and especially our friends in Austin. I miss all the friends and contacts from the Refresh Austin and WordPress Austin groups. As well as SXSW Interactive being in my backyard. I’ve tried getting into the local WordPress group as well as other groups in the Triangle. They just seem a little too cliche-ish to me. I’ll try again this year.

On a personal note we moved into a beautiful home last year. The new neighborhood is great as well as the neighbors who actually come over and visit. Unlike the previous neighborhood where we were renting. The neighbors just could not be bothered to say hello to you. We even have a neighborhood book club I joined last year. I’m the only male in the group and was apprehensive. I thought I would be getting into some Harlequin Romance and Jane Austen type reads. But we have read some very interesting books. So I’m looking forward to some nice reading outside of my own tracks this new year.

Well that is about all for the update. I hope to be posting regular. I already have some other posts in the queue I’ve worked on. Just need to polish and publish.

Media Tags 2.2 plugin for WordPress Released

Over this past week I added quite a few features to the famous Media Tags plugin for WordPress. The list below details many of these new features

  1. Added a new tab to the Media Upload popup box. Anyone familiar with WordPress Post or Page entry is familiar with the popup provided to upload images and other media files. In this popup if you wanted to search for items using the handy Media Tags it was not possible. Now the user is provided with a new Tab labelled ‘Media Tags’. When the tab is clicked the user is presented with a listing of all Media Tags used on the site. Along with the Media Tag name there is a use could in the far right of the listing. This count if greater than zero is a link and will filter the Media Library (another Tab) listing for items from that Media Tags group.

    Below is a screenshot of the new popup tab.

    Media-Tags New Upload popup tab

    Media-Tags New Upload popup tab

  2. More control over the permalink prefix. The Media Tags plugin works with the WordPress Permalink rewrite system to provide ‘pretty’ URLs for the archive. For example if you have some media loaded and tagged on your site for say ‘Texas’. The you can display these items in an archive type listing by using the URL http://www.mysite.com/media-tags/texas/ This format should be familiar to most users of WordPress since Categories and Tags or handled in much the same way. This feature was added in Media Tags version 2.0 and has received much acclaim from the users. The problem is the prefix ‘/media-tags/’ was hard-coded into the plugin. I have a few users request a way to alter this prefix. Other than suggesting they edit the config file for the plugin there was not a good solution.

    So I starting thinking I would just build my own admin page where the user can set this permalink prefix. But I hated having to build a new admin page just for the one setting. Well over the weekend I found the solution of solutions. Why not just add my own field to the WordPress Settings -> Permalink page. This turned out to be quite easy using the new Settings API introduced into WordPress 2.7.

    Below is a screenshot of the new Media Tags Permalink option. The new field just below the standard Category and Tags fields.

    Media-Tag Permalink Slug Prefix

    Media-Tag Permalink Slug Prefix

  3. Playing nice with other plugins. I’ve used the Google Sitemap XML plugin for quite some time and generally install it by default onto any client site I’ve worked on. This is one of those plus plus plugins that can only help your site. Recently I had to figure out a way to include non-WordPress pages into the XML sitemap output. This is actually very easy to do as the plugin authors have provide a nice hook to allow this.

    So my next enhancement to the Media-Tags plugin was to include the Media Tag archives into the Google Sitemaps XML output. This feature is quite powerful since it just adds juice to Google content harvesting. Not wanting to hard-coded this feature into the plugin I ended up building that admin interface I mentioned in the previous point. There is only one option on the page (more to come soon). A simple Yes/No box to include/exclude the Media Tags archive from the Sitemap XML output. I assume most people will wan this but also know there is always the possibility some may now.

    Below is a screenshot of the new Media-Tag admin interface. Look for this under the standard WordPress Settings section.

    Media-Tags Admin Page

    Media-Tags Admin Page

  4. Along with the above mentioned new features I also cleaned up some code related issues. Most of these are under the covers cosmetic items and not related to any screen changes.

Media Tags Future Enhancements

Still on my list of features to add in some upcoming release is Media-Tags Cloud. This is still one of the most requested options for the sidebar. Still working on that code. Trying to follow some of the code written for the built-in WordPress Tags. pretty ugly stuff. Has to be a better way.

Other than the Media Tags Cloud I don’t have any big changes planned for the plugin. Then again the three features mentioned in this post were not planned at all. Just something that hit me on Friday that I started working toward.

So if there is a feature you just think would make the Media-Tags plugin rock for your blog please consider leaving a comment below.

Donations

If you enjoy using the Media Tags plugin or any of my other WordPress plugins, please consider making a donation to show your support. Anything is appreciated. Thanks.

See the Media-Tags Project page for up to date information regarding the Media-Tags plugin

Media Tags 2.0 released

Today I would like to finally release to the wild the totally rewritten Media-Tags plugin version 2.0. The Media-Tags plugin 2.0 has been completely rewritten to use to WordPress Taxonomy system for storing related media-tag information. As a benefit to this rewrite the user now has a new Media Tags management interface located under the Media section. Via this Media Tags management interface users can better manage the media tags used on the site. Deleting, renaming and adding new media tags is now quite simple. The Media Tags for the attachment are still display both under Media and the media popup on the editor screen as before. Continue reading

Media Tags 2.0 Beta

Today I’d like to release the first public beta of the Media Tags plugin. This is an exciting change and almost complete rewrite to the core plugin code.

For anyone downloading this beta please be aware this is a beta version and subject to change in the near future. Also since this is a beta it is recommended NOT to use this on a production system. User beware! If you do download the plugin and test if please using the comment form below to mention any issue you have with the new plugin. I can only test thing to a certain level with my own client sites.

This new beta has been tested on WordPress versions 2.7.1 and 2.8 only! At this time I’ve not tested the new Media-Tags Management interface on any lower version of WordPress.

Continue reading

Media tags plugin

Note: This post remains available to discuss the original 1.0 version of the Media Tags plugin. As of July 15 2009 version 2.0 of the Media Tags plugins has been released. Please refer to the update post https://www.codehooligans.com/2009/07/15/media-tags-20-released/ for information on changes to the use of the plugin.

Working on a client project recently I needed to extract 2 attachments uploaded from a post and display these along with the post title into the sidebar on another page. I’ve done this a few times before and always sad to say a little different. Probably the best solution is to name the ‘special’ attachments using some defined naming convention like image_sidebar_1.jpg, image_sidebar_2.jpg, image_sidebar_x.jpg. This works but can get ugly if you even want the client to follow your instructions on the naming conventions.

I’ve figured out a better way. With my latest plugin you can now add tags to your media attachments. I write ‘media’ because this does not just apply to images. You can tag Word document, PDF documents basically anything you upload via the standard WordPress Media upload tool.

Here are some screenshots:

The media tag input field is displayed directly on the media form.

Usage

So now you can tag you media files. But how do you actually use the tags? How to you actually access attachments that have ‘x’ tag? Excellent question. And your answer is below.

As part of the plugin I also wrote a function to be used in your template. To follow the example I started this article with I need to display 2 of the 5 uploaded images in the sidebar. My first step was to upload the images and tag the two special images with ‘sidebar’.

Now I use the function get_media_by_tag(). I pass the tag I want to access, in this case ‘sidebar’ and the ID of the post parent. What is returned is an array of attachment items. This array is similar in fact to the return object when calling the WordPress get_posts which is partly what the function does.

Download the Media-Tags plugin via the WordPress.org plugin repository

Future plans

I’ve already starting thinking of some enhancements for the plugin. Which include a tag management screen and other utility functions. If you have any other needs post them here in the comments.