Category — Blogging

Support Wikipedia

Have you ever used Wikipedia? I do – all the time.

If you don’t contribute articles, information or services to them in direct proportion to your usage, please consider giving a small donation to help them stay afloat and advertisement free.

Wikipedia has changed the face of collective global information. While it certainly has some flaws, the overall benefit to humanity is quite considerable. Do your part and pitch in where you can!

Wikipedia Affiliate Button

December 31, 2008   No Comments


WordPress Plugin Generator

This is a neat tool if you like to mess around with WordPress Plugins.

plugingenerator

Its a Plugin Generator that will generate a customized code skeleton for your newest plugin idea – pretty neat!

The little web app asks you a bunch of questions, like what the plug in should be named, does it require saved settings, etc. and then it spits out a tidy zip file that contains a new plugin.php file along with any other files that are required based upon your answers.   It supports a number of neat options, like making a new DB table, Shortcodes, Filters, Admin Menu Integration, etc.

Of course, the resulting code doesn’t DO very much – its just the structure that you need to make a plugin.  You have to add the actual functionality with your coding wizardry.  Still, this is a nice way to make sure that you’ve covered all your bases when writing a new plugin.  It simply shortcuts the process of Idea -> Reality, which is always welcome in my book.

Check it out!

UPDATE:  Check out the new URL:  http://www.funwithwizards.com/ for the latest version and some other cool tools!

December 15, 2008   2 Comments


Postcasa Accepted on WordPress.org!

My Postcasa plugin for WordPress for easily embedding Picasa slideshows in your blog has officially been accepted at the WordPress Plugin Database and will be hosted there from now on.

Of course, you can always access the latest information on my local Postcasa Page but you can also visit its official Plugin Page hosted at the WordPress Codex. Now that it is officially hosted there, you’ll also be able to automatically update the plugin from within Wordpress as new versions are released. Pretty cool stuff!

Dang, how I love WordPress!

December 3, 2008   3 Comments


A New Way to Put Picasa Slideshows in Wordpress

My original post on this topic got a lot of traffic, so it seems that people are interested in this topic.

As a result, I’ve written a new Wordpress plugin called Postcasa to help people add a simple Picasa Slideshows inline to their posts.

It is extremely simple to use. All you have to do is put the Picasa RSS link between this simple shortcode, and the plugin does the rest.

Example:

[postcasa]http://MyRSSurl[/postcasa]

easily becomes:

Head on over to the Postcasa homepage to get the code and peruse the options! Adding Picasa slideshows to your posts has never been easier!

Examples of what’s possible:

[postcasa size=small]http://MyRSSurl[/postcasa]

[postcasa width=100 height=100 align=center]http://MyRSSurl[/postcasa]

[postcasa size=small align=right bgcolor=0fb2c3 showcaptions=yes]http://MyRSSurl[/postcasa]

November 26, 2008   No Comments


WPTouch: A Custom Wordpress Theme for the iPhone Browser

With the use of the iPhone and iPod Touch growing every day, maybe it makes sense to have a special view of your blog optimized for their included browser.

My blog as seen through WPtouch

My blog as seen through WPtouch

The iPhone and iPod Touch web browsing feature is pretty neat (from what I’ve seen), yet a full sized blog site is still a bit hard to see even in horizontal mode.

Enter WPtouch.

WPtouch formats your Wordpress blog with an iPhone specific (and reminiscent) theme, complete with Ajax loading articles and effects. The theme only appears to users who are viewing your online masterpiece from an iPhone or iPod touch.

Of course, it can only go so far – Flash, etc still won’t work on the iPhone.  Shame on you two, Adobe and Apple.  Can’t you work your crap out and stop screwing up the world this way?

Anyway, I digress.  Installation of WPtouch is a snap: simply upload the plugin folder to your webhost and enable it from Admin’s plugin screen.  After it is enabled, you can cruise on over to the Admin Settings -> WPtouch screen to set the various options that the theme supports.  Settings include the icons you want the theme to use verification of certain compatibility issues with the plugin’s capabilities.  Once you are satisfied, simply save your options to fully enable the new theme.

Easy-peasy.

Taking your new look and feel for a spin however is a different matter completely.  While there are some iPhone emulators out there, only one that I know of semi-accurately mimics the actual web browser by making an iPhone User Agent setting available.  This is essential to actually see the changes that WPtouch makes to your blog.

The problem is that to use the accurate emulator requires using a Mac.  If you happen to be one of the enlightened few (haha, cool your jets, I’m writing this on a PC!) cruise on over and download iPhoney, a nifty little Mac app that allows you to emulate the iPhone right from your desktop.  You can even “rotate” the phone to see what landscape view looks like.  Pretty neat!

Sorry – PC users need not apply.   If you have nary a measly hunk of Cupertino Lovin’ readily available for use, try iPhoneTester instead.  Not as cool (no user agent switching, etc.), but it gives you an idea of what your regular theme will look like on the iPhone.  Even with this, for the full experience, you’ll need Safari on your PC.  Yes, I did just say that.

Of course, if you are an Apple Fanboy who ISN’T locked into a long term relationship for RIM Blackberry devices and therefore addicted to free-basing their direct push MS-Exchange crack, you can just fork over yer cash and get a darn iPhone.  Lucky buggers.  Last option is to bug one of your cooler friends to let you borrow their iPhone.  Who knows, you may even get a subscriber out of the deal! :)

Either way, remember that your normal theme will still be the go-to look for all other browsers, so if you surf back to your blog from your normal Firefox, IE or Chrome, it should all look as it did sans-WPtouch.  Only the iPhone and iPod Touch users will see the new theme.  WPtouch even gives them the option to switch back to your normal theme if for some reason that is preferable.

Overall, this is a great idea for a Wordpress plugin and I’m fairly impressed with the apparent quality of the software.  It seems very professional, is easy to use and did what it was supposed to do on the first try.  In my book, that goes a long way, and always will!

I’ll post again with any other info as it become apparent.

In the meantime – a big shout out to Dale and Duane for their great work!

November 24, 2008   No Comments


Having PHP Problems With JSON and file_get_contents()?

Chances are your webhost doesn’t allow this type of access for security reasons.

If you are even remotely handy with PHP, there is a very simple fix:  Using CURL.

First, open the PHP file that is giving you the problem (make a backup of the original, just in case!).

Second, add this function to the file (make sure you do it outside of any other function definitions, and preferebly before you use it in the rest of the file…):


// function to replace file_get_contents()
function new_get_file_contents($url) {
$ch = curl_init();
$timeout = 10; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_ e x e c($ch); // take out the spaces of curl statement!!
curl_close($ch);
return $file_contents;

}

Then, search through your file for “file_get_contents” and then replace those words with “new_get_file_contents”. In a nutshell, you are replacing the original function that doesn’t work on your webhost (file_get_contents() ) with one that WILL work on your host (new_get_file_contents() ).

I usually leave a commented out copy the original line in the source, so that I can easily go back to the original if necessary.

So, for example:


$myVar = file_get_contents($url);

becomes:


// $myVar = file_get_contents($url);
$myVar = new_file_get_contents($url);

Pretty easy! I’m not sure that this will work in all situations, but I have yet to find a place where it doesn’t work. I was easily able to replace file_get_contents() with CURL in about 5 minutes in altPWA, an excellent Wordpress Plugin for adding Picasa photos and albums to your blog.

Nice and easy!

November 22, 2008   1 Comment


More Picasa Wordpress Goodness

A while ago, I wrote an article on how to put a Picasa slideshow into Wordpress.  It helped some folks, so I’ll post more information here.

First of all, I should mention that while the original method still works, as of WP 2.6.2, the “normal” method of embedding Picasa slide shows into a web page seems to work just fine.  This involves getting the embed URL directly from Picasa and adding to the post.  A word to the wise though – you have to add the embed code in HTML mode in the editor.  If you do it in Visual mode, it doesn’t seem to work too well.  Oh well, its a small price to pay, and much easier than my original posted method.

For example if you copy this code from Picasa:

< embed type="application/x-shockwave-flash"
src="http://picasaweb.google.com/s/c/bin/slideshow.swf"
width="288" height="192" flashvars="host=picasaweb.google.com
&RGB=0x000000&feed=http%3A%2F%2F
picasaweb.google.com%2Fdata%2Ffeed%2Fapi
%2Fuser%2Fmilowerx%2Falbumid
%2F5053811777489218721%3Fkind%3Dphoto
%26alt%3Drss" pluginspage="http://www.macromedia.com
/go/getflashplayer">< / embed >

it becomes:

when it is in your post.  Nice!

Alternative Methods for a simple Slideshow

I’ve written a plugin to help folks with this task. Welcome Postcasa, a simple Wordpress plugin to add the slideshow directly from the album RSS feed. Its easy to use and works regardless of if you are in visual or HTML mode.

Other Fancy Picasa Plugins

That said, there are many Wordpress plugins that have been created that work well in their own right.  Most of them put album thumbnails directly into the post (instead of having one picture location that cycles through all the pictures).

Some of my favorite are:

  • kPicasa Gallery – this great plugin is extremely simple to use and has a lot of configuration options.  The one downside to the plugin is (supposedly) that the gallery must be by itself on a page (i.e. it can’t be inline, meaning resident on a page with other information).  A second downside is that the plugin only supports one Picasa username for the entire blog.  You ARE able to specify which albums go on a page, etc. but they must all be from the same Picasa login.   Darn…
  • KB Easy Picasa Web – this plugin is exactly as described.  Its easy.  All you have to do is put the hyperlink to an album in a post, and this plugin replaces the link with the album contents.  Very nice for certain situations.  The only problem is that it puts EVERYTHING in that one post, doesn’t paginate at all, and you can’t set the number of columns to use.  There are some formatting options, but they are fairly limited.  This is nice for someone who doesn’t need a lot of sophistication, and simply wants to “get to it” without having to add any shortcode to posts, etc.
  • GoldenGate – this plugin doesn’t allow you to add an entire album at a time, but it DOES do something that is very unique.  It adds all of your Picasa photos to the MediaLibrary portion of the Wordpress post editor in real time using Google APIs.  This is great for allowing you to store your photos on Picasa, but use them in posts in Wordpress.  Very slick.
  • Shashin – this is one of the members of the Picasa plugin Royal Family.  Its a great plugin and has a bit different behavior than many of the other plugins listed here.  It displays albums as well as the photos themselves as most do, but it also allows you zoom in on any picture using Highslide, which is free for non-commercial use.  The neat thing is that this zoom is in context of the page, not in a page covering popup viewer.
  • altPWA – One of my favorites, this plugin allows using albums from multiple users and also has a bunch of settings to allow you to make the galleries look the way you want them to.  There is one challenge though – it uses the PHP function file_get_contents(), which isn’t allowed by many web hosts.  Since it is made available under GPL, I’ve modified the code to use CURL instead, which is allowed by most hosts.  I’ve sent mail to the original author offering the changed code to him so that his great plugin will be accessible to more people.  Its a very nice piece of work!  A few feature requests: 1) allow a page that displays a number of album roots (i.e. NOT the actual photos, but the actual listing of available albums) to also allow a column display rather than just one after the other and 2) add more CSS around the photo thumbnails so that they can be more easily stylized.  Minor, minor stuff, but desirable in my opinion nonetheless.

As you can see, if you are a Picasa / Google Fanboy like my brother, there are lots of options for integrating your favorite image manager with Wordpress.  Life is good again.

November 22, 2008   6 Comments