• This is something that I’ve been wanting to do for a long time, and once I took the time, it was a very simple process. Designed for ease on the user-level (so that people will actually take advantage of it) and headache-relief on the author-level. Hope you like it! I’d love to see some of the “big names” convert their plugins to support it.
    WP Plugin Update Detect
    ©2004 Ryan Meyers

    User Download: pluginupdate-user
    Author Download: pluginupdate-author
    Anyone want to know when their favorite plugins have been updated? I know that I do! And even more so, I want users of my plugins to know when I’ve fixed the hundreds of critters running around in them.
    With the few plugins that I’ve released for public use, it’s been amazing how many tech support e-mails that flood in each day. While a real bug-report is a great help (thanks Janice!), often it’s something that’s already been fixed. Users aren’t checking the home pages for updates, miss or don’t read the posts on the hacks forum, and thus have no idea that a brand new, better version of your plugin is available for their consumption. This is my attempt at making that process a little bit easier.
    Users, please note that adding support for update won’t break plugins that don’t support it. Authors, please note that adding support for update won’t break your plugin on users that decide not to utilize it. It’s an optional component on both ends, but one that’s worth taking advantage of, I think.
    Once a supported database of WordPress plugins (a la Firefox extensions) is created, this feature could possibly reach new levels of ease, speed, and usability. As it is, I think that it will achieve its simple purpose with a small footprint, since the files it will be retrieving will be a few bytes in size.
    ==========================================================
    FOR WORDPRESS USERS:
    Installation requires editing one file: wp-admin/plugins.php
    1) Open wp-admin/plugins.php in your editor
    2) Find:
    if ( preg_match(“|Version:(.*)|i”, $plugin_data, $version) )
    $version = $version[1];
    else
    $version =”;
    3) After, add:
    // BEGIN PLUGIN UPDATE ADD-ON
    if ( preg_match(“|Update:(.*)|i”, $plugin_data, $update) )
    {
    $update = $update[1];
    $update = trim($update);
    if ($u = @file(“$update”)) {
    $u = implode(”,$u);
    $u = trim($u);
    $v = trim($version);
    if($u != $v){
    $updatelink = ‘
    $updatelink .= $plugin_uri[1];
    $updatelink .= ‘”>’;
    $updatelink .= ‘Update Available: (‘;
    $updatelink .= $u;
    $updatelink .= ‘)
    ‘;
    $description[1] .= ‘
    ‘;
    $description[1] .= $updatelink;
    }
    else
    {
    $updatelink = ”;
    }
    }
    else{
    $updatelink = ”;
    }
    }
    else
    { $update =”;}
    //END PLUGIN UPDATE ADD-ON
    4) Upload wp-admin/plugins.php
    5) Update those plugins!
    ==========================================================
    FOR PLUGIN AUTHORS:
    The trick to making this the best it can be for users is a consistent format. You can alter the code on your end to a certain extent, but the idea is for users to easily be able to detect updates to your plugins. Keep it simple!
    1) Upload plugin-update.php to your WordPress root.
    2) Add a Custom field called ‘Current Version’ with a value relative to your plugin’s development to each of your WordPress posts detailing their development.
    3) Add the following line to your plugin source (replace 99999 with the ID for the post mentioned above:
    Update: http://www.yoursite.com/yourwpinstall/plugin-update?p=99999
    ===========================================================
    A NOTE FOR AUTHORS OF PLUGINS:
    In an effort for mass-usability, I’m proposing that plugin authors that desire their plugins to be easily updated distrubute the following instructions with their plugins and/or distribute this file:
    /************************************
    ** **
    ** TO TAKE ADVANTAGE OF UPDATE **
    ** DETECTION, PLEASE CONSIDER **
    ** MAKING THE FOLLOWING ADDITION **
    ** TO YOUR WORDPRESS INSTALL **
    ** **
    *************************************
    OPEN FOR EDITING : wp-admin/plugins.php
    FIND :
    if ( preg_match(“|Version:(.*)|i”, $plugin_data, $version) )
    $version = $version[1];
    else
    $version =”;
    ADD THE FOLLOWING CODE AFTERWARDS :
    // BEGIN PLUGIN UPDATE ADD-ON
    if ( preg_match(“|Update:(.*)|i”, $plugin_data, $update) )
    {
    $update = $update[1];
    $update = trim($update);
    if ($u = @file(“$update”)) {
    $u = implode(”,$u);
    $u = trim($u);
    $v = trim($version);
    if($u != $v){
    $updatelink = ‘
    $updatelink .= $plugin_uri[1];
    $updatelink .= ‘”>’;
    $updatelink .= ‘Update Available: (‘;
    $updatelink .= $u;
    $updatelink .= ‘)
    ‘;
    $description[1] .= ‘
    ‘;
    $description[1] .= $updatelink;
    }
    else
    {
    $updatelink = ”;
    }
    }
    else{
    $updatelink = ”;
    }
    }
    else
    { $update =”;}
    //END PLUGIN UPDATE ADD-ON
    */

Viewing 3 replies - 1 through 3 (of 3 total)
  • This is interesting, Ryan. I would expect it to work with whatever Craig has in mind for a plugin archive.
    Did you cross-post to the plugin-dev mailing list?

    And when you’ve written a plugin but don’t have a (public) blog?

    Thread Starter RyanM

    (@ryanm)

    ringmaster: It would take some very minor mods, I’m sure… I didn’t cross-post, I’ll do that now…
    Zarniwoop: i could write a pretty simple script to accomodate, assuming that you do have some public webspace…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Calling All Plugin Authors!’ is closed to new replies.