Archive for the ‘Function’ Category

Pods WordPress Plugin

January 30th, 2010 by Keith from shrewdies | No Comments | Filed in Function
The Pods WordPress plugin is driving me crazy.

Mad with admiration one minute, mad with frustration the next.

It’s like breaking your leg when you jump around to celebrate a lottery win. Fantastic find – frustrating failings.

Let me say first, that so far, I believe the potential of this plugin is tremendous. I’m just letting off a bit of steam here because the excitement of finding a truly great WordPress plugin is making me emotional about the rough edges. I am certain those rough edges can be easily smoothed. The proof of the pudding will come in a day or so, when I complete my replacement toolbar.

The developers describe it as:

WordPress evolved.
Pods is a CMS framework for WordPress.
It’s a plugin that sits on top of WordPress, allowing you to add and display your own content types.

I see it as a Rapid Application Development (RAD) tool that could change the way we look at plugins.

Why am I so pleased with this gem?

For months, I have been looking for an easy way to work with extra data tagged onto WordPress. With a background in relational database planning and management, it is frustrating to have to workround things like usermeta & WordPress options. Also, I like simple but comprehensive forms to manage linked data, and it is daunting to have to code a relational database application to integrate with WordPress.

I can see that it can be done. Simple:Press forum is a prime example of integrating a rich database application into WordPress, but it has a scary amount of code and complex field relationships, with little in the way of generic routines that can be adapted for other applications.

Other tools I have seen, only allow simple flat file manipulation, and would need a lot of adapting to tackle relationships. Enter Pods – an easy way to add relational tables as separate applications, or linked into WordPress users or posts. Amazing potential, and amazingly easy to use.

So what are the problems?

Not much if you are familiar with coding, and do not mind getting your hands dirty.

  • The user guide is very poor in examples, and I suspect some of it is out of date, as the plugin is still on a steep development curve.
  • The forum, and the guide, have been radically pruned recently, so just as you think you have found an answer to something – click – 404 not found!
  • Pods has a great way of attaching code to fields called helpers, but the names of these have been changed in the latest release, so many of the example packages do not work. However, it is very easy to find and replace on these, so very easy to fix – I’m just surprised it should be necessary.

So that’s a very brief introduction to Pods. I’ll go and finish the toolbar, then go through some code over the next few posts to show you just how easy it is to build an application. Early days yet, but I think this might be the answer to my nightmare about the lack of good, well-structured example plugins.

Tags: , , ,

WordPress Theme Functions

January 9th, 2010 by Keith from shrewdies | 1 Comment | Filed in Form, Function
Functions and options bring flexibility to WordPress themes, but can they also over-complicate?

Flexibility is second only to speed in terms of theme importance.

There are risks when theme functionality goes too far, so you need to know where to draw the line.

Your WordPress theme is the face of your website – your front of house, if you like. Just like the real world, front of house has to present your features and benefits in your best light, and it has to direct visitors efficiently by providing comprehensive, consistent, accessible navigation.

Recent trends are to added customization options, and increase functionality. Feature that used to rely on plugins, especially custom RSS feeds and header/footer code, are now options in many themes.

Disappointed Digression
This Analytics problem highlights why my plea for keeping functionality out of themes is more than me being tetchy. A good Google Analytics plugin would recognize the need to track external links and include the necessary code. I believe at least one does this, but I will review them later. Managing the code is much more than just pasting the basic script into a box, and I believe it should be left out of themes.
If theme authors want to emphasize the importance of Google Analytics (or anything else) they can easily incorporate some Admin warnings without bloating the code for all users.

I was reminded of this today when I checked my Google Analytics, and realized the external tracking code[1] was missing. I always used to add this type of code manually to footer.php. It is very easy to do, but you must remember to change it whenever you change the theme.

To avoid disruption whenever I changed theme, I started using plugins to manage Google Analytics code, and other footer additions. Today, I realized that I can easily go to the theme options for this, and dispense with a plugin. That is tempting, as reducing plugins usually means a faster website. However, I’m not convinced that the theme option is the right place for this.

If I change my theme, I lose functionality. This cannot be right. If it was a WordPress standard, then I might accept that using an out-of-date theme could cause loss of functions. However, there is no standard here, so even if the new theme allows footer code to be added, I still have to remember to copy and paste it to the new theme.

I do wish theme authors would focus on polished presentation and nifty navigation. Give me CSS options and layout options, but please leave the functionality to the plugin authors. Better still, just move your functionality to your own plugin or integrate the features from a popular plugin that performs the same purpose.

WordPress Theme Functions: Next Steps

As we are all stuck with an undisciplined way of adding code to footers, unless WordPress produces a standard, we must ensure that we manage change properly. Footer code is easiest when managed with a plugin. If you want to save a little loading speed, use the theme options or theme editor, but be sure to have a proper change procedure for applying new themes. Such a change procedure covers preparing for and checking all theme dependent functionality, and I will write more on this later.

WordPress Theme Functions: References

Tags: , ,

Simple:Press Forum Simplified

January 1st, 2010 by Keith from shrewdies | 1 Comment | Filed in Function
I’ve simplified the Simple:Press forum today – by deleting it!

A drastic measure, but a timely one.

Don’t be misled – it is a fantastic plugin. In fact more than a plugin, it is a very special application. But sometimes, you have to take a hard decision to ensure you efficiently fulfil your purpose.

Community websites are the best way to explore, expand, and exploit your web business opportunities. A forum emphasizes that sense of community, so am I mad to get rid of it?

To understand, you need to be clear about the purpose of your forum, and clear about your alternatives.

I chose the forum route because I was unhappy with the limitations of commenting. My research told me that Simple:Press Forum was the best option for a WordPress site. However, I did not want to stop WordPress comments as they are popular with many people.

Moderating comments and a forum becomes tedious as conversations become fragmented and spam control is totally different. Keeping web pages “on-topic” with a clear keyword driven focus is as important to visitors as it is to search engines, and having two separate conversation streams makes that focus difficult.

Though the Simple:Press forum offers excellent member management, none of my sites is a true membership site. I encourage contributors to maintain good debates, but membership really equates simply to access rights. In my case, these are simple – visitors either contribute, or they read.

Despite it’s name, Simple:Press is quite complicated. Both from it’s extensive feature list, and ‘under the hood’ it is far from simple.

I realized I could get what I need by enhancing WordPress comments, plus a few other tweaks. I will describe these in more detail later.

For now, it’s goodbye Simple:Press. Nice knowing ya, and when I need a membership site, I know where to look.

Tags: ,

WordPress Plugins – Beginners Nightmare

December 22nd, 2009 by Keith from shrewdies | No Comments | Filed in Function

WordPress plugins are vital for efficiently functioning websites.

WordPress Plugins Structure Nightmare

WordPress Plugins Structure Nightmare

Given their importance, I would expect much more effort going into helping new plugin developers get to grips with plugin structure.
 

The WordPress development team resist adding features to the core if they are not universal requirements and can be dealt with by plugins. This is a good thing, and they have recently announced plans to develop “canonical” (i.e. official) plugins to “address the most popular functionality requests with superlative execution”[1].

Significantly, these will be “the best possible example of coding standards”[1]. But just what are these coding standards that are deemed so important?

The first thing I want to do when I write a plugin is adopt a structure that:

  • Is the most efficient in terms of performance (i.e. no redundant code, especially admin code loaded for all users)
  • Uses core WordPress functions and methods instead of home-grown alternatives.
  • Uses latest functionality and best practice, avoiding deprecated functions and methods.
  • Is familiar to the majority of plugin developers.

It’s the last point that induces the biggest nightmare. Official coding standards[2] focus heavily on inline documentation and formatting[3][4]. This is all very well, but we need good examples that clearly show best practice in how to organize code in modules. Which bits are best in separate modules, and how should they be organized in sub-folders?

It speaks volumes to me that (more…)

Tags: ,

WordPress Comment Control

December 12th, 2009 by Keith from shrewdies | 1 Comment | Filed in Function
WordPress comment control is vital if you want to get the best contributions from your visitors.

The standard WordPress commenting features are very basic. I realize that does not stop thousands of great blogs getting exceptional comments from visitors. However, anything that can help encourage commenting, and make comment management easier, is A Good Thing.

 

WordPress Comment Control

I have found a WordPress plugin that does both these things very well, but why is this so important?

(more…)

Tags: , ,

WordPress Plugin Control

December 4th, 2009 by Keith from shrewdies | No Comments | Filed in Function

My dreams for WordPress plugin control have been realized

After months of planning an installation script (OK – occasionally thinking about planning one!), I have found the ideal plugin to control WordPress Plugins

 

WordPress Plugin Control
If you have setup more than a couple of WordPress installations, or you want to offer an easy way for newcomers to install their own WordPress, you will know how tedious it can become repeating the installation of a list of “must-have” plugins.

Now the only “must-have” plugin is Plugin Central from Vladimir Prelovac. Install that, and anything else you want is only a couple of clicks away.

At last, I have an easy way to save time when I setup my own new WordPress blogs.

More importantly, the web traffic tool that I am currently developing needs some simple instructions for setting up a new WordPress blog. I planned to develop my own plugin to install from a list of recommended plugins, but now I do not have to. I also found an unexpected bonus, as you will see below.
(more…)

Tags: ,

WordPress MU File Editor Revealed

October 18th, 2009 by Keith from shrewdies | 1 Comment | Filed in Function
Many “authorities” will tell you there is no WordPress MU file editor, and give you complicated workrounds to let you edit plugins and themes directly.

This is no longer true.

The latest version of multiuser WordPress has the standard file editor – it just needs to be enabled.

First, a couple of warnings:

  1. Editing themes and plugins directly can render your site unusable. It is vital that you have a backup of the file you are changing, AND file access to your webserver to revert to your backup if needed.
  2. The change will affect all your users who are using the plugin or theme that you are changing

So, there are very good reasons why you should not make ad-hoc changes to plugins and themes. However, if you feel that bypassing version control is occasionally worth the risk, here is how to unveil your hidden file editor.

(more…)

Tags: ,

Commandeer Comments

October 15th, 2009 by Keith from shrewdies | No Comments | Filed in Function
WordPress comments enhance your site when managed properly.

Encourage commenting, and you add effortless content to your site.

Make it hard, and your visitors will walk away

Comment control using spam management plugins is important, but if you don’t encourage commenting you might as well just close the comments and forget the whole thing.

Don’t worry about spam comments. First, think how you can encourage visitors to contribute to your site by way of comments, then worry about weeding out the ones you do not want.

If you run a forum, you might consider doing away with comments altogether. If so, change the default settings in the discussions section, and stop reading this. My view is that the more opportunities you give for visitor contributions, the more those visitors are likely to return – so read on to learn how to commandeer comments to keep your visitors returning.

WordPress Comments Plugins

First to be installed is Quicktagzmilies from Zfen. This makes it so much easier to add HTML code to posts. Much easier than having to type <blockquote></blockquote> etc.

To install this plugin, you have to edit the comments.php file in your theme. This is a bit of a pain, especially as you have to remember to do it if you change theme, but it is worth it. One day I’ll look to see if there is a way to avoid this, but it is very easy to do, so not a priority.

Go to the editor in the Appearance section of the admin area and select comments.php. Find textarea* and add Quicktagzmilies code (it’s shown in the settings screen) as a new line above it: <?php if (function_exists('quicktagzmilies')) { quicktagzmilies(); } ? >

Next, your visitor (now contributor) may want to know if anyone else responds. Subscribe To Comments plugin has been extremely useful, but not updated for a long time. I have opted for a new version, based on the original: Gurken Subscribe to Comments from Martin Spuetz. This is a fairly basic subscription service, so if you find something better, please share it in the comments here, or in the functionality forum. I’d like to see subscribe / watch functionality for comments that gives the same benefits as the equivalent functions in the Simple:Press Forum plugin – could be another project for the future.

Finally, now that you have happy contributors, do you think it fair to deprive them of a little glory? For some reason, WordPress puts nofollow attributes on the links your contributor provides. The merits (or lack of them) for this are beyond the scope of this article, so I’ll just explain the very easy way to stop this. Install NoFollow Free from Michele Marcucci and the problem goes away.

It’s over to you now. How do you comandeer your WordPress comments to work for you? Add your coments below!


*Some themes have more than one textarea. The one you are looking for has an id of comment.

Tags: , , ,

Simple:Press Forum Enhancements

October 15th, 2009 by Keith from shrewdies | No Comments | Filed in Form, Function
The Simple:Press forum plugin is one of the most comprehensive and customisable plugins available for WordPress.

Is that enough for me?

Oh, no! I have to push just that little bit further.

It started some time ago, when I wanted to include a hyperlink in a forum description. I was pleasantly surprised to see that the HTML held up fine in the forum, and links, bold text and other markups were easy to add.

I was less happy when I went back to the Admin pages to make other changes – the HTML screwed up the Admin display, and could not be edited. However, it could easily be re-typed, or edited directly in the database through phpMyAdmin, so, I left things as they were. For a while.

I was tempted to raise this with the support guys at Simple:Press. They have always been extremely responsive, and their own forum is a fine example of the best in technical support. However, a new version was in the late stages of the release process, so I thought I would wait until after it’s release.

A few days later, I had the bright idea of including some AdSense in the description. I was certain that the Simple:Press forum description was no match for the AdSense javascript code. However, I remembered how I had used the Enzymes plugin in the past to make adding AdSense code to posts very easy.

WordPress Enzymes Plugin

This is a fascinating plugin that allows so many ways of manipulating your content that it deserves (and probably needs) a series of articles to do it justice.

In it’s very simple form, it allows you to store data in standard WordPress Custom Fields and refer to them wherever you want.

I’ll cover Enzymes in more detail later. For the forum description, all you need to do is to store the HTML for your description in a Custom Field, and it is easy to display, and easy to edit.

Simple:Press Forum Description Enhancement

(more…)

Tags: , ,

WordPress Plugin For Forum Access & More

October 4th, 2009 by Keith from shrewdies | 1 Comment | Filed in Function
I’m working on a WordPress plugin to ease access to the forum, and other parts of the website.

Easy access to website is always important, but doubly so when you are encouraging members to join and contribute comments and forum posts.

You may see changes to the navigation bar at the top of the page during this week. I’m building and testing new ideas, and I would also like your input.

Purpose of the WordPress plugin

I was inspired by the userbar that is part of this Splix theme. It adds great access and information features to the bar at the top of the page. It does not include all the functionality I need – especially as it has no functions to ease access to the forum. In fact, I was surprised to see functionality like this added to a theme, so I looked at WordPress plugins to see if they offered better solutions.

The one that best suits what I need is DashBar, but it also lacks the forum functions that I need. One advantage is that it is very well written, and can be extended to include other links. However, I wanted to add other features from the Splix userbar, so I decided to build a new plugin to create a functional, attractive access bar.

The purpose of the new plugin is to provide all website contributors, including administrators and casual visitors, with a quick way to see new information that is relevant to them, and a quick way to access that information for viewing or editing.

During this week, you may see two, or possibly three different toolbars as I pool the best ideas from the DashBar and the Splix userbar. I’ll let you know when my WordPress plugin is finished, but there are a couple of issues you can help with…

Help Form This WordPress Plugin

The first issue is a name for the toolbar / userbar / admin bar.

The second issue is that I would really love to hear your opinions on the features that are important to you in a WordPress plugin like this.

Please add your comments below, or discuss this in the WordPress functionality forum.

Tags: , , ,