Who Needs Widgetifyr.com

I’ve been trying to find people to take a look at our tool and get their input. I sent out a request to Jeff Chandler the WordPress Tavern (WPTavern) to take look at our tool. He obviously didn’t get the idea of our tool. Which was an eye opener for me. I realized that we haven’t really made it clear who might get some use out of our service.

Who doesn’t need out service.

First I’ll go over who the tool is not for. If you have never messed around with PHP then this tool is not for you. However I would say that you should remember our tool in case you want to hire someone to create a custom widget for your site or need to have one modified. It’s pretty easy to find someone who has some experience with PHP, but not so easy to find someone with experience creating a WordPress widget for PHP. Our tool lets a PHP programmer (or even a tinkerer) with no WordPress experience create a widget in less time that it would take to find all the documentation that they would need.

If you are use to messing around with PHP and just need a quick widget for you’re blog and you only have one blog you want to use it on then you can just use the Executable PHP Widget plugin or for a lot of things you can just use the standard text widget. For some widgets you might just be able to use text widget. The text widget let’s you embed some html in the a widget which sometimes is all you need.

Who might find our service useful

If you find yourself hacking away at functions.php or widgets.php then you’ve found out that you need to be very careful about the auto updater as this wipes out your changes. Most of these type of changes can be extracted and put into a widget and our tool makes this very easy.

Another time you might want to use our tool is if you find yourself creating a executable widget on every blog you create. It’s easier to create a stand alone widget in this case and again our service can help here.

If you have a service of your own and you want to have people use a WordPress widget to access some part of your service then our tool can really help you. You don’t need to learn anything about WordPress. You can just create the PHP code to access your service and then in a few minutes you can turn it into a WordPress widget. Also if WordPress changes then as we update our tool you can create a new widget easily for your original code. For example WordPress will be updating it’s API with version 2.8 and we already have a way for you to create your Widget in the pre 2.8 way as well as the new 2.8 way.

Blellow Wordpess Group Message Display Widget

I created a widget to display the messages from the Wordpress Dev group on new site called Blellow. If you want to show messages from another group you can change the $group variable. You can display any number of messages you’d like by changing the $maxposts variable.

Blellow

Blellow

<?php
/*
Plugin Name: Blellow
Plugin URI: http://www.widgetifyr.com
Description: Blellow Group Tracker
Author: Glenn Bennett
Version: 1.0
Author URI: http://www.widgetifyr.com

*/

// We're putting the plugin's functions inside the init function to ensure the
// required Sidebar Widget functions are available.

function widget_blellowgroup_init()
{
/* Your custom code starts here */
/* ---------------------------- */

/* Your Function */
function blellowgroup()
{

/* Your Code ----------------- */

$group = "wordpress";
$maxposts = 5;
$url = "http://blellow.com/groups/$group/dashboard";
$xmlurl = "$url.xml";
$messages =  simplexml_load_file($xmlurl);

// Here we'll put a loop to include each item's title and description
$i=0;
echo "<ul>";
foreach ($messages as $item)
{
echo "<li>" . $item->body . "</li>";
$i++;
if($i == 5)
{
break;
}
}
echo "<li><a href=\"$url\">More updates...</a></li>";

echo "</ul>";

/* End of Your Code ---------- */

}

/* -------------------------- */
/* Your custom code ends here */

function widget_blellowgroup($args)
{

// Collect our widget's options, or define their defaults.
$options = get_option('widget_blellowgroup');
$title = empty($options['title']) ? __('Blellow Group Tracker') : $options['title'];

extract($args);
echo $before_widget;
echo $before_title;
echo $title;
echo $after_title;
blellowgroup();
echo $after_widget;
}

// This is the function that outputs the form to let users edit
// the widget's title. It's an optional feature, but were're doing
// it all for you so why not!

function widget_blellowgroup_control()
{

// Collect our widget options.
$options = $newoptions = get_option('widget_blellowgroup');

// This is for handing the control form submission.
if ( $_POST['widget_blellowgroup-submit'] )
{
// Clean up control form submission options
$newoptions['title'] = strip_tags(stripslashes($_POST['widget_blellowgroup-title']));
}

// If original widget options do not match control form
// submission options, update them.
if ( $options != $newoptions )
{
$options = $newoptions;
update_option('widget_blellowgroup', $options);
}

$title = attribute_escape($options['title']);

echo '<p><label for="blellowgroup-title">';
echo 'Title: <input style="width: 250px;" id="widget_blellowgroup-title" name="widget_blellowgroup-title" type="text" value="';
echo $title;
echo '" />';
echo '</label></p>';
echo '<input type="hidden" id="widget_blellowgroup-submit" name="widget_blellowgroup-submit" value="1" />';
}

// This registers the widget.
register_sidebar_widget('Blellow', 'widget_blellowgroup');

// This registers the (optional!) widget control form.
register_widget_control('Blellow', 'widget_blellowgroup_control');

}

add_action('plugins_loaded', 'widget_blellowgroup_init');

?>

I still need to figure out how to display the user name. The Bellow API lookes very much like a work in progress, but as they add new features I’ll be updating the widget.
Obviously I used our tool to create this widget and as our system gets impoved so will this widget.

To guest on WordCast

Dave over at the wordcast podcast has asked me to be on his show at some point. I’ll let you know when that will happen.