Posts tagged: Blogs

The Googlifier: WordPress Widget Alternative for Google+

Nerd Vittles has been not only a fan but also a user of WordPress for the better part of this century. So it only made sense to contribute a little something back once the opportunity presented itself. Now that Google Plus has released the first iteration of an API, it became fairly easy to extract all of your Google+ content and import it into any current WordPress blog. Rather than offering a plugin or widget that requires constant maintenance, today we’re providing an open source toolkit that lets you automatically and regularly grab your public Google+ content and add it to your new or existing WordPress 3.2.1 blog. Here’s a screenshot of our sample blog using the WordPress twentyten template. We set this up in less than an hour on a hosted platform using cPanel with Fantastico, an application installer which is available on thousands of hosted platforms around the world. Our favorite for new bloggers is Lunarpages for as little as $4.95 a month.

The hidden beauty of this project is that others can take our open source code and transform the same Google+ content into other templates as well. For example, it would be pretty simple to turn your Google Plus feed into something that looked more like the new Facebook Timeline Layout:

Or you might prefer something more like Flipboard or Google’s new secret project that transforms Twitter content into a customized social news magazine:

But, for today, we want to concentrate on WordPress and show you how easy it is to assimilate your Google+ content into a new or existing blog. Down the road, it would be pretty easy to use The Googlifier to grab the public feeds of your Favorite Google+ Circle and assimilate all of that content into a Best of Google+ Blog. But let’s save that project for another day.

Prerequisites. There are some basic components of both Google+ and WordPress that you’ll need to have in place before using The Googlifier. On the Google front, for openers you’ll obviously need a Google+ account. You no longer need an invitation. Just sign up here. You’ll also need your Google+ account ID which is the long string of numbers displayed in the web link when you access your Google+ Profile:

Last, but not least, you’ll need a free Google+ API key. This lets you grab a JSON feed of your Google+ public posts up to 1,000 times per day. You do NOT need an OAuth Token to download your public Google+ content!

On the WordPress side, The Googlifier is expecting to find a working WordPress 3.2.1 blog. You also need command-line access to run The Googlifier scripts. This can also be done using cPanel. Be advised that we have not tested this application with prior releases of WordPress! We would caution you to be very careful doing so if you have a working live blog. As frequent readers of Nerd Vittles already know, we provide the same advice on introducing new software as we do for those contemplating a new marine aquarium. Always have two platforms: one for display and one to test whether your new fish have cooties. If you choose the all-in-one approach, sooner or later you’ll probably end up with a bunch of dead fish. You’ve been warned. :wink:

The good news is that, once you have obtained your Google+ credentials and have the proper WordPress platform in place, using The Googlifier requires zero technical skills. Set a few defaults once, run a couple scripts at regular intervals, and you’re done. If you’d like to add Categories to each of your blog posts, that is easily accomplished after you import your Google+ content by simply editing your posts while logged into WordPress with your admin credentials.

Getting Started. Now we’re ready to download the software. If you have SSH access to your WordPress blog, log in and change directories to the default directory for your blog. Then issue the following commands:

wget http://mundy.org/googleplus/googlifier.zip
unzip googlifier.zip
rm googlifier.zip

Next, you need to insert your Google+ credentials in wm-getfeed.sh. Edit the file using the command: nano -w wm-getfeed.sh. Near the top of the script, you’ll see the following two lines:

acctid=”12345″
apikey=”67890″

Replace 12345 with your Google+ Account ID. Replace 67890 with your Google+ API Key. Be careful to preserve the quotes on each side of the two entries. Once you’re finished, save the file: Ctrl-X, Y, and Enter.

Now make sure your credentials work by running the app and agreeing to the license: ./wm-getfeed.sh. If you see ERROR 400: Bad Request, then there’s an error in your credentials.

Next, you need to edit wm-readfeed.php using the same extended nano syntax shown above. On line #15, insert your blog URL in place of ours. Be sure to preserve the trailing /. Save the file and then run the script to populate your blog with your latest Google+ public postings: ./wm-readfeed.php.

Finally, access your blog using a web browser and make certain the content looks right. If the images are too large, you can adjust them in the settings section at the top of wm-readfeed.php. Make certain to preserve the correct proportions between the width and height entries. As installed, your Google+ posts will only be imported once into WordPress. If you’d prefer to overwrite your entries each time you run the PHP script, then set the variable $overwriteposts to true. Be aware that this may cause issues with search engines because the links to your posts will change each time you rerun the PHP script and delete the previously imported posts.

We also recommend you install the free (for non-business use) FancyZoom app for WordPress. This lets users click on images in your blog to enlarge them automatically. You can try it out here or in our Demo Google+ Blog. If you decide not to use FancyZoom, then you may wish to set $click2photoalbum to true. This will allow users to access the Google+ photo album associated with certain posts by clicking on the displayed image.

Automating The Googlifier Imports. Once you’re satisfied that the imports are working correctly, it’s simple to automate the process so that it runs regularly to gobble up your Google+ content. For those using cPanel, you’ll find a Cron Jobs option on the main screen. What we want to do is schedule the wm-getfeed.sh script to run every hour at one minute after the hour. And then schedule the wm-readfeed.php script to run every hour at three minutes after the hour. That way you’ll always have the latest content on your blog. Here’s the way a sample cron entry should look. Just substitute your account name on your cPanel host for ward, and you’re all set. Unless you want to be bombarded hourly with email confirmations, add > /dev/null to the end of the commands (not shown in the sample below).

And One More Thing… We saved the best for last. One of the drawbacks of Google+ has been the lack of support for in-line images such as you see in this blog posting. With The Googlifier, it’s now a thing of the past. You can embed as many images as you like in any posting at any place you like except in the first line of the posting. Just enclose image links in {curly braces} within your Google+ posting, and The Googlifier will handle the rest. Here’s a quick sample:

A Word About Open Source Development. The real beauty of open source code is that you have an opportunity to improve what’s been provided. We hope you not only will do so but also will share your improvements with the rest of us. Just post a comment below using your real email address which won’t be published. We will contact you to obtain your code which we’ll be happy to host on Nerd Vittles for everyone to enjoy.

A Word About Versions. This is version 1.0 software so don’t assume it’s finished or error-free. Check this post regularly to download new updates as they are finished. The comments below or update notices appearing just below here will attempt to explain what has been added, changed, or improved. Enjoy!

Originally published: Monday, October 24, 2011




Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.


whos.amung.us If you’re wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what’s happening. It’s a terrific resource both for us and for you.


 
New Vitelity Special. Vitelity has generously offered a new discount for PBX in a Flash users. You now can get an almost half-price DID and 60 free minutes from our special Vitelity sign-up link. If you’re seeking the best flexibility in choosing an area code and phone number plus the lowest entry level pricing plus high quality calls, then Vitelity is the hands-down winner. Vitelity provides Tier A DID inbound service in over 3,000 rate centers throughout the US and Canada. And, when you use our special link to sign up, the Nerd Vittles and PBX in a Flash projects get a few shekels down the road while you get an incredible signup deal as well. The going rate for Vitelity’s DID service is $7.95 a month which includes up to 4,000 incoming minutes on two simultaneous channels with terminations priced at 1.45¢ per minute. Not any more! For PBX in a Flash users, here’s a deal you can’t (and shouldn’t) refuse! Sign up now, and you can purchase a Tier A DID with unlimited incoming calls for just $3.99 a month and you get a free hour of outbound calling to test out their call quality. To check availability of local numbers and tiers of service from Vitelity, click here. Do not use this link to order your DIDs, or you won’t get the special pricing! After the free hour of outbound calling, Vitelity’s rate is just 1.44¢ per minute for outbound calls in the U.S. There is a $35 prepay when you sign up. This covers future usage and any balance is fully refundable if you decide to discontinue service with Vitelity.
 


Some Recent Nerd Vittles Articles of Interest…

Ringbinder theme by Themocracy