deactivate_plugins not working in my register_activation_hook function

I just figured out for myself, after not being able to get the deactivate_plugins function to work and not finding any helpful documentation on it, how to prevent my plugin from being activated under certain conditions.
My new workaround is to use die() in my register_activation_hook, under the desired condition. Now, I know you are not supposed to put any output in your register_activation_hook function, but it just works perfectly for me. It successfully stopped the activation of my plugin, and it even put the text from my die statement nicely into the box at the top that tells the user that the plugin could not be activated. I had also tried using wp_die() but it really did die with nothing on the screen but my message in a box. I liked it better just using die().
In my install function I put:

global $wp_version;
if (version_compare($wp_version, "2.6", "<"))
	die("This Plugin requires WordPress version 2.6 or higher");

This way people can only install my plugin if they are not running a really old version of WordPress.

Fixed lots of bugs in my TERRIBL Widget

Oooops…  So maybe I released this first version too quickly. There were quite a few bugs in my TERRIBL Widget that resulted in the links being empty (I guess it really was a Terrible Widget ;-). I just released version 1.1.11.02 that fixes all these bugs but not before 30 people downloaded the broken one (I hope they upgrade to the fixed version).

Please leave a comment on this blog if you have any feedback or suggestions. I am now working on a built-in Feedback form which I hope to release in later revisions of all my plugins.


Added My TERRIBL Widget to the WordPress Repository

I added my new TERRIBL Widget to the WordPress Repository yesterday and it was accepted today. It’s a simple plugin that tracks every HTTP_REFERER to your site so that you can see where your traffic is coming from.

There is also a Widget included that will display a list of in-bound links. This is a maintenance-free way for you to link back to those sites that already link to you. It sure make link trading easy!


XML Sitemap Generator for WordPress

I used to use the Google XML Sitemaps plugin by Arne Brachhold for SEO. Then a friend got me to try out WordPress SEO By Joost de Valk and it seemed like a good SEO tool until I noticed today that it had duplicated my site name in the HTML header’s TITLE tag. After not finding any easy way to turn off that “feature” I just disabled the plugin and switched back to the Google XML Sitemaps plugin I used before. I works well and has all the features in need, plus it’s easy to configure, easy to use, has really good support documentation.

the Google XML Sitemaps plugin

New Menu Links in the WordPress Admin.

WordPress Admin Menu

RelatedPosts on WordPress Admin Menu

I added a menu to the WordPress Admin with a few helpful link for those users that don’t take the time to read instructions before installing and then hunt around for a way to use what they just installed (Anthony). I am now using some new CSS tricks that I just learned from a friend (Anthony again) the other day to style the admin pages for my next release.

I got over 100 downloads just yesterday and now have over 400! It seems like I get a  lot more downloads when ever I release an update, as though everyone who has already downloaded it is then downloading the update. I think I’ll release this last update (1.1.10.28) and then take a break for a little while.


Added “Relate by Category” to Widget options

Widget Screenshot

New Screenshot of Widget

By request I have added the option of relating post by Categories as an alternative to Tags. And I changed the name again. The plugin is now called “A Related Posts Widget – ELI”. I stuck my name in there at the end so that people who know me and want my plugin would have a way to tell the one I wrote from all the others. I also added a screenshot to the plugin download page via the readme file.

F.Y.I. – Now more than 200 downloads!


Over 100 Downloads

A friend of mine installed this plugin yesterday and found that there was a conflict with some PHP code in another widget he already had installed. After taking a look at the other code I noticed that the function query_posts changes what posts I would expect to see returned by the have_posts function. So I added the wp_reset_query function to the start of my code so that my widget wouldn’t gab the wrong posts. Then I added it again at the end so I wouldn’t trip up any other plugin developers in the same way.

We got a record 51 download yesterday alone and now have over 100 in all, which is surprising for me since it’s only been available for three days and I have not even promoted it.

I’m thinking of changing the name again and dropping the whole acronym thing all-together (nobody seems to like it). But I still want the plugin name to stand out in some way. Any feedback would be appreciated and don’t forget to rate my plugin on the WordPress Plugins Page


WordPress accepted my plugin

I got the plugin into the WordPress repository yesterday and I’ve already made lots of changes to it. First, I changed the name to POSTALLORBUST which stands for “Posts On Sidebar That Are Listed and Linked Organically Related By Using Same Tags”. Then I made the widget into a PHP Class and added some basic options to it. I had already had 26 downloads after only one day so I thought I should make this plugin a bit more useful. Unfortunately changing the name of the plugin does not change the name of the repository directory or the directory it installs into. Anyway, you can now download this plugin directly from within the WordPress admin (it you can find it) and receive update as they come out.

Don’t forget to rate it in the WordPress Plugin Directory


My First WordPress Plugin

So I made a new plugin for WordPress call SPOSTARBUST which stands for “Show Posts On Sidebar That Are Related By Using Same Tags”. That is basically what it does although I am using it on the Footer Area of this site because the Sidebar doesn’t show up at all on single posts or pages in the Twenty Eleven Theme, and I wrote the widget to only show itself if you are on a single post. Anyway, it’s a rough draft and I’m just going to try and submit it to WordPress as is and make updates to it later.