Category — Web Dev
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]
wordpress, Picasa, web development 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.
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!
Web Development, Wordpress, Wordpress plugin, iPhone, iPod Touch November 24, 2008 No Comments
Quick MovieWidget Update
For anyone that cares, I updated MovieWidget to support the latest Amazon searching features.
Not a big deal, but hey, that’s what I did last weekend.
Also, I’m in the process of adding MovieWidget to the Wordpress Plugin database for easy automatic update capabilities. Then I’ll also be able to tell if anyone actually uses this thing! :)
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!
Wordpress, web development, PHP, CURL, file_get_contents, JSON November 22, 2008 No Comments
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.
Picasa, Wordpress, Google November 22, 2008 1 Comment
Hug A Developer
SNIFF. If only this were a joke…
Funny, Web Dev, Software Development September 12, 2008 No Comments
Google Chrome
I won’t take a bunch of time telling you what Google Chrome is about. Rather, I’ll give you a quick bullet list of neat features and let you go out on your own and get the details.
- Its fast. VERY fast.
- It has crash control - one tab won’t crash the whole thing.
- Tabs can be ripped off to their own window or merged back into the bar.
- Incognito mode - a “no record” type of web browsing, which is great for accessing sensitive or confidential information on shared resources (think web banking at work, web mail at a conference, accessing your company’s CRM system at one of those public PC’s at an airport, etc.)
- Application shortcuts to make web apps feel more like desktop apps
- A minimal interface so that the content is the focus, not the browser
- and more.
Its still a beta version and has a few issues - for instance, while writing this post, the entire browser crashed, not just one tab. So much for crash control! To be fair, it wasn’t my web app that crashed. It was the browser itself - so, crash control on tabs wasn’t supposed to solve that kind of thing. Again, its a beta. As such, it is very promising.
My overall feeling about it - WOW, is that fast. Every page seems to load 20-50% faster anecdotally than anything in FF or IE, and the minimal interface is really nice (a bit similar to full screen tabbed browsing, but that’s OK).
I have a few concerns too:
- How long will they actually continue developing it?
- Spell checking doesn’t seem to be integrated yet - I LOVE integrated spell check in FF
- There is no plug-in mechanism yet (AFAIK…)
- Will this derail Google’s long time support of FF? They did just renew their commitment to it, but is another browser really necessary? I love FF and wish they would have simply worked with that initiative to improve FF to be everything that they wanted to achieve with Chrome.
- Google has its own agenda (ad revenue), and sometimes things seem out of touch with that goal. With FF as a non-affiliated browser, why the need for Chrome? They give some answers, but none that ring true enough to warrant a separate branch from FF, in my opinion. It makes me wonder what evil plans they have lurking in the wings. To be certain, Google has long been the Jedi to Microsoft’s Sith, but (in my best Yoda voice) - “The Chosen One, Google may be. Still, too clouded its future is.” Google has been trying to become a viable and complete computing platform, hoping to drive Microsoft out of its stranglehold on PC computing. But, once it is successful, what evil things will it start to commit? Some would say the evil has already started… To borrow a line from The Dark Knight - will they be the hero long enough to see themselves become the villain?
Only time will tell.
But, if they clean up a few of the gaps that currently exist as compared to FireFox, Chrome may actually be an extremely viable third option. After all, its from Google. They usually don’t make things that suck.
Chrome, Google, Google Chrome September 2, 2008 No Comments




