logo
  • Home
  • About
  • Plugins

Subscribe to Articles

WLTC Plugin Competition: WP Update Message

Author: andrew Category: Developing for WordPress, Plugin

Thursday
Jun 18, 2009

The latest plugin to be entered into the competition blog is WP Update Message. I quite like this plugin because it isn’t something that I had thought of myself. What it does is to give you the ability to add a styled message to a page or post to explain that you have updated it and what has changed.

I won’t go into the options as they are made pretty clear through the screenshots on the WLTC plugin page, but I think they are comprehensive. If you really wanted something different I think the options would cover anything you might want to change.

I really like the idea of making update messages very visible. The following screenshot shows just how visible they are:

wp-update-shot

What this plugin does is really very simple so there isn’t a lot to analyse. I did have one problem though. Although it is made clear that it should work on both posts and pages they box to enter a message never appeared on my post page (Version 2.8).

I think you also need to wonder about the necessity of a plugin for creating a box with text in. If you know your CSS this is easily accomplished without much trouble, and, you have to ask if you will need to change your posts so often that you even need a defined way of doing this.

If you think you will, and either don’t know enough CSS, or don’t want to mess about then this is a pretty good plugin for accomplishing a box with some text in though, so give it a try.

  • Comments
  • Read Entire Post
HTML 5 Gallery 4

I’ve been interested in HTML 5 for a while, especially for theming. Now there is a gallery of HTML 5 sites so you can see, not only that it is viable to use right now, but also see how the specs are being interpretated in the wild.

Visit the HTML 5 gallery. There are some great sites on there already.

Where next for premium themes?

Author: andrew Category: Themes

Monday
Jun 1, 2009

The GPL debate seems to be abating now with the conclusion that buying a theme means paying for support, or, for those that are simply not going to release under GPL that they will live with the consequences of being left out of official channels. Is this the final solution though?

The big question is where can premium theme authors go now? The problems are clear. Selling a theme means giving the purchasers all the power. You hand over the files and trust that, because they paid for it, they won’t want to give to others for free or worse make a few tweaks and claim it as their own. This is the problem that paid-for themers need to solve, but is the solution a legal or a technical one?

Resolving the whole GPL question through a test case would be a great first step. Everyone has a different opinion of it including the opinion that it is entirely unenforceable. Sure, themes will still need to be GPL licensed to get into the new GPL licensed paid-for theme repository, but that hasn’t stopped themes selling so far and I doubt it will in futre.

The second option is to find a clever way of building themes so that they key components do not need to licensed under GPL. This is a simple enough matter really and it surprises me a little that so few people have done it. All it takes is a set of generic processing classes that operate on the data that is passed to them so they could work on any platform. The theme can then be used to create a bridge between WordPress and the classes. They wouldn’t be able to directly connect to WordPress by creating admin pages but they could do a lot that would make it pointless releasing the theme without them.

Finally you can go one better: a hosted theme solution.

There is one very good reason why a hosted solution isn’t a great idea and that is security. WordPress doesn’t have a template engine as such, it just processes raw PHP. Hosting PHP files means using eval to run the code or including files from an outside source, something that many hosts turn-off for security reasons, so as it stands this isn’t a goer. However, if a templating language was available, and I have no doubt that one could be created as a plugin relatively easily, this would all change.

Imagine a solution where you sign-up to a hosted theme solution. All you need is a monthly subscription and the plugin. From there you get access to a massive number of premium themes. But more than that, you also get the means to modify those themes online (think Squarespace), upload new images, change the font’s and layouts in fact anything you could ever want, and see those changes reflected on your site.

Theme developers get to sell themes without the problem of redistribution as a code would be needed to even download the files, all the key functionality would be on the hosted server and not downloaded by the user ever, users get advanced tools for altering themes, probably more advanced than could be built for WordPress alone and the issue of GPL just goes away.

Perhaps there is a fourth option, if you have any other ideas I would love to hear them, perhaps things will just go along as they always have without a definite answer or solution. It is even possible that the new GPL paid-for themes area on WordPress.org will kill off any themes that are not part of it. The only thing I am sure of is that it isn’t over.

  • 5 Comments
  • Read Entire Post
MU for all 1

The news coming out of WordCamp SF is that WordPress.org and WordPress MU will be merged, albeit at an undefined point in the future.

I know at least one person who will want to point out that Habari already has single and multiple blog support in the one package.

Adding classes to comments

Author: andrew Category: Developing for WordPress

Friday
May 29, 2009

A couple of days ago I was trying to add classes to comments using WordPress 2.7+ filter comment_class. I ran into a little confusion which I thought could tie someone up and though I should share it.

To start with here is how it works:

add_filter( "comment_class" , "add_class" , 10 , 4 );
 
function add_class(  $classes, $class, $comment_id, $page_id){
 
//get the comment object
$_comment = get_comment($comment_id);
 
//do stuff with comment
 
//add our new class
$classes[] = "newclass";
 
//send the array back
return $classes;
 
}

This is all simple enough, and works without issue. But it isn’t doing quite what it appears to be doing, and this is where the confusion comes in.

When the filter is actually run it does indeed pass those four variables ($classes, $class, $comment_id, $page_id). However, in the function that calls the filter, and the function that calls that function, the comment_id and page_id are optional. They set themselves to Null if a value isn’t given. When this whole chain begins the comment_id and page_id are not actually passed to any of those functions, so although the filter is sending them, their value is Null.

In the example above that isn’t a problem because get_comment checks to see if the comment_id passed was empty and if so goes off and grabs the comment from a global variable. So it does return the right comment. But if you wanted to use the comment_id or the page_id to grab a value that you have saved somewhere else (in one of your own options, or perhaps you are getting a custom field) this could confuse matters. It won’t work.

So, to sum it all up. If you want the comment_id or the page_id you need to get the comment, as shown above, and then get those values from the comment. You cannot rely on the filter passing those values.

  • Comments
  • Read Entire Post

WLTC Plugin Competition: WP-Devel

Author: andrew Category: Plugin

Tuesday
May 26, 2009

So the next plugin entered into the competition is WP-Devel.

What this plugin does, quite openly (i.e. this isn’t a criticism) is take the functionality provided by three plugins and package it up a little better using the fourth:

  • http://wordpress.org/extend/plugins/wp-debug/
  • http://wordpress.org/extend/plugins/debug-queries/
  • http://wordpress.org/extend/plugins/show-template/
  • http://wordpress.org/extend/plugins/wordpress-admin-bar/

It provides a massive amount of debugging information (when you are viewing public pages and logged in as an admin) including:

  • Show template file viewing
  • Display page/query load times
  • Display all queries executed w/ load times
  • Show all phpinfo
  • WP_Query and WP array values
  • Included files
  • Included functions
  • Declared classes
  • HTTP Headers
  • Defined constants
  • Current cookies
  • Values in $_SERVER
  • Values in $_ENV
  • Values in $_SESSION
  • Values in $_POST
  • Values in $_GET
  • Values in $_REQUEST

To be honest though it provides far too much information. Getting the information is all well and good but I couldn’t even find some of my classes in the list. It is hard for me to see how I could use this more effectively than a simple var_dump of the one thing I actually needed to see.

It isn’t really fair to criticise this plugin for that though as these things all came from somewhere else. That is the real reason why I wouldn’t rate this plugin in a competition.

A key reason that I decided to rate all the plugins myself is that I wasn’t happy with last year’s winner. Not because the plugin was bad, it wasn’t. By all accounts it was a good a plugin. But much of the code and ideas had already been done. Sure they were done in a longhand manner, sometimes by altering the theme, but I saw nothing new in it, and that is what I want: new, original, interesting, and complete.

This plugin isn’t as useful as last year’s winner (WP Comment Remix). Partly because it is aimed at the very people who know how to get at the information themselves anyway and partly because there are far fewer folks who would use this functionality, no matter how good it is, than would be interested in fancy commenting stuff.

I don’t think I’ll use it for developing my theme, and I don’t think it is going to score well in my rating of the competition, but I would be interested to hear from anyone who has used this, or the plugins that were collected together to make this, and found it to be useful.

  • Comments
  • Read Entire Post

Theme Typography

Author: andrew Category: Themes

Monday
May 25, 2009

Over the past few months I’ve looked at a look of themes. This has inspired me to try and produce a ‘premium’ theme of my own and I’ve started on what I consider to be the most important part: typography.

The basics of typography are clear: font-family, font-size, color, margins, baseline rhythm, etc. But there is more to it than that. To that end I have a few questions about your experiences with themes.

Firstly I want to know what areas of typography have you found lacking in the themes you have used? One area I have always wanted to see, and so will build in to mine is the option to style introductory paragraphs separately (paragraphs with the class ‘introduction’ that kick of a post).

Second, do you prefer control (i.e. sheer number of changeable variables) or automation (you enter a few values and the rest is calculated for you)?

Finally, are there any standard blocks of HTML that need styling? I don’t mean simply paragraphs, I mean html with specific classes. For example:

<p class="introduction"></p>
 
<blockquote>
<p class="quote"></p>
<p class="author"></p>
</blockquote>
 
 
<blockquote class="pullquote">
<p></p>
</blockquote>
 
<div class="aside">
<p></p>
</div>

What I really want to do with this theme is to move the art of theme options one step on from where it is now. This is not an easy task, but I think it is possible with your help.

  • 5 Comments
  • Read Entire Post
Pause… for thought for the day 3

Ryan has kicked off a doozy of a GPL fight over at WP Tavern which has started to become a little heated. So my thought for the day is this:

Until the way that GPL applies to WordPress themes has been tested in court, to the extent necessary to introduce clarity, there is no way of judging the validity of any opinions. I shall therefore henceforth refrain from consumption of or input into any discussion thereof.

I suggest you do the same, if only for a more pleasant world.

WLTC Plugin Competition: Max Image Size Control

Author: andrew Category: Developing for WordPress, Plugin Tags: Media, Plugin, WLTC

Thursday
May 21, 2009

The next plugin in the WLTC Plugin Competition is the Max Image Size Control plugin. The concept behind this plugin is that it lets you choose the image sizes that WordPress generates when you upload the image based the post or category the image belongs to.

Although the author doesn’t explain their intention in the WLTC post I suspect this is a direct reaction to all those magazine style themes where one size image is used in one place and another size in another place. It is a good idea and it works pretty well.

At first glance the interface can mislead you into thinking it is more limited than it is. The following screenshot shows the plugin’s option page which is accessed through the settings menu:

screenshot-1

The first time you use this it appears as though you can only set one value for a list of posts and a list of categories; however, when you create the first override and save it, another duplicate of this appears beneath it to override other posts or categories with a different size.

The plugin is still at version 0.1.1 which suggests to me the author still has some work in mind for the interface, and this is a good thing as it is a tad clunky.

For one thing you do need to look up ID numbers which aren’t used much any more. Once you start considering the alternatives for the interface you quickly come to the point that overriding image sizes for individual posts is probably easiest done from within the post screen itself. It is a pain to open another window, find the ID, create the override and go back to editing.

Having said all that though the instances where you want to override the size for a specific post are probably few. Most likely you would use categories anyway so this is a minor issue at best.

Aside form these small niggles though the plugin works exactly as advertised. The following image was uploaded with only one value overriden; the width of the medium size image was set to 638px. It has been resized to that dimension.

darktrees_resize_sample

A fairly simple plugin, based on a solid evolution of an existing function, that works as advertised. What more can you ask for?

  • 3 Comments
  • Read Entire Post

WLTC Plugin Competition: ImageShack Offloader

Author: andrew Category: Developing for WordPress, Plugin Tags: imageshack, Plugin, WLTC

Tuesday
May 19, 2009

The next plugin added to the Weblog Tools Collection plugin competition blog is ImageShack Offloader. This plugin uses image hosting service ImageShack to host your images (as well as them being uploaded to your own site) and automatically replaces the the image URL with the imageshack URL so you can simply turn it off when you no longer want to use ImageShack.

I have never been a big fan of hosting images in other places, but the way this plugin works, by replacing URLs on the fly seems a good compromise.

Unfortunately I just couldn’t get this to work. I tried it on a few blogs and nothing ever reached ImageShack. There isn’t an obvious reason why, I got no errors, so for now it will have to remain unreviewed.

If you’ve tested it yourself and it worked then please let me know what your thoughts are of it.

  • 6 Comments
  • Read Entire Post
Older Entries

Recommended

WP Remix Banner

Archives

  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007

Tags

2.7 2.8 Admin Advertising Air Blogging blogs Cache Cliche Coding Comments Content Types CSS Curry Death development Disqus Features Habari image Interview Licensing Modes Monday Poll New Features Organisation Personal Platform Plugin Plugin-Practices plugins Plugin update Poll premium Readers Reviews Search Simplification Snippets Spam Themery Themes tools User Interface Widgets WLTC

Copyright 2009 Fun with WordPress - All Rights reserved.

Wordpress theme by: WPUnlimited