All posts in Code

Add the Google+ button to your blog posts

We’ve all got “share on Facebook” or “Like” or “Tweet this” on our blog posts, but I’ve noticed a lot of people who don’t have Google+ share buttons and it’s incredibly easy to add them if you’re using WordPress.

Open up your functions.php file and add the following lines of code at the bottom of the file:

add_filter('the_content', 'wpr_google_plusone'); 
function wpr_google_plusone($content) 
{ $content = $content.'<div><g:plusone size="tall" href="'.get_permalink().'"></g:plusone></div>'; return $content; } 
add_action ('wp_enqueue_scripts','wpr_google_plusone_script'); 
function wpr_google_plusone_script() 
{ wp_enqueue_script('google-plusone', 'https://apis.google.com/js/plusone.js', array(), null); }

Save your functions.php file and enjoy allowing people to share your posts on Google+

Adobe drops mobile Flash, or are they?

I’m not sure about you, but I’m really not a Flash fan. Despite our Internet lines getting faster and some incredible animation being possible, I just find that Flash is slow, doesn’t always work and hardly ever renders correctly on mobile devices.

Big news last week involved Adobe informing developers that the development of mobile flash browser plugins would be stopped. In other words, Adobe is dropping mobile Flash support, which means Flash will no longer be geared towards mobile devices. If Steve Jobs were alive, may he RIP, he would be smiling from ear to ear.

Here’s a quote:

“Our future work with Flash on mobile devices will be focused on enabling Flash developers to package native apps with Adobe AIR for all the major app stores. We will no longer adapt Flash Player for mobile devices to new browser, OS version or device configurations. Some of our source code licensees may opt to continue working on and releasing their own implementations. We will continue to support the current Android and PlayBook configurations with critical bug fixes and security updates.”

Adobe seems to have changed their focus, initially it was all about stopping flash, but now they’re saying that their development will focus on applications for mobile, expressive content on the desktop and increasing their investments in HTML5 in general.

If you’re interested in reading more information about this directly on the Adobe blog, here’s the link.

CSS Desk: quick and easy CSS testing

I come from a programming background, desktop applications, websites and even some firmware stuff for electronic devices. I love programming, but as a day job it just doesn’t suite me unfortunately. So these days I don’t do too much coding, but from time to time I need to do some web stuff and when it comes to CSS, well, that’s a job for someone else ;)

CSS Desk is a web application I’ve used a number of times as it allows you to test your CSS on the fly instead of saving and refreshing a browser. So, if you need to hack some div structures together and see results quickly, then this application will be of use to you.

I must warn you, this is a great application, but it’s very basic, so I wouldn’t go as far as dealing with transparencies and so forth, and you’ll have to use absolute URLs for certain things, but if it’s something simple, then by all means this application will save you a nice amount of time.

Have you used CSS Desk before?

Good coders..

I seriously love Geek and Poke, some of their cartons are just priceless and I’ve published quite a few here. Anyway, this week’s one is for the programmers, if you’ve ever programmed you’ll probably relate to this in some way, even if it’s when you headed up that team and go a new junior.

Hope you have a good laugh:

Continue reading →

FourSquare launched merchant API

This is fantastic news for merchants, but more so for developers of 3rd party applications for FourSquare. If you’re not sure what an API is, simply explained, it’s a protocol which allows developers to send and receive information to and from, meaning that developers can request information from FourSquare to integrate in their own programs.

Any web application which launches a great API stands the chance of having many useful 3rd party applications built, which increases the usefulness of the web application. I think FourSquare is yet to capture the true value of having over 500,000 merchants listed with them and this is going to be one step closer to gaining that.

I’ve had a read over some of the documents for the API and right now it looks rather straight forward and most developers would be able to fairly easily find their way through the system.

If you’re interested in learning more, be sure to read the overview and definitely take a look at the endpoints, because that’s where things get interesting.

GitHub comes to Mac

GitHub is a web-based hosting service for projects that use the Git revision control system. It is written using Ruby on Rails by Logical Awesome developers Chris Wanstrath, PJ Hyett, and Tom Preston-Werner. If you aren’t a coder you don’t really need to worry about this post, as this is geek stuff :)

Today, GitHub announced the release of their Mac version, which is exciting news for Mac users. I grabbed a bunch of screen shots for you to have a look through below, but be sure to read the official release if you want to find out more or grab a copy of the application. Continue reading →

FourSquare launches new API features to the public

There’s nothing more exciting when a social platform opens its API up, and lets developers around the world tap in. I’m a geek, so this gets me going off the bat, but if you aren’t, then what this means is that we can expect more exciting 3rd party applications as they’ll be able to tap into new features on FourSquare, so we essentially all benefit from this sort of thing.

These new API features include Explore, Leaderboard and post-check-in leaderboard information. What’s cool about this is that a lot of FourSquare users are all about the competition with their friends, so allowing developers to access leaderboards, means that more competitive applications will soon be available. Great move from FourSquare here, in my opinion.

As an example: If you have an application which shows bed and breakfasts, what this will do, is allow you to tap into the Explore area of the API, and do things such as suggest bed and breakfasts to the person who’s in a specific area. This is just one obvious example, but there are plenty, imagine the possibilities of the leaderboard API.

So, if you’re a developer or interested in learning more about this, head on over to developer.foursquare.com

See Google Alerts in your WordPress Dashboard [plugin]

WP Google Alerts is a really simple plugin that I put together. The concept is simple, WP Google Alerts allows you to display your Google Alerts on your WordPress Dashboard.

Simply download the plugin, activate it, visit the settings and set it up. Setup takes a mere 2 minutes and once it’s running you’ll be able to see where people are talking about you on the web. Alternatively, follow a term which relates to a specific topic and see where this topic’s being talked about on the Internet and create yourself some inspiration for your next post.

There isn’t too much more to it, it’s just a little something I felt like putting together and I know it will add value to your marketing :)

Download here!

Remove the WordPress admin bar?

With the release of WordPress 3.1 came the new admin bar, which appears on the front end of the website for anyone who is logged in. In other words, if you’re logged into your website and you visit the front end, you’ll see a bar across the top which gives you information about your account. It’s a great idea, but I would imagine a lot of people would rather not have to see it, so naturally code has been released to remove it.

wp_deregister_script(‘admin-bar’);
wp_deregister_style(‘admin-bar’);
remove_action(‘wp_footer’,'wp_admin_bar_render’,1000);

Simply paste those 3 lines of code into your functions.php file and the admin bar will be no more!

[Hat tip Jonny]

Picplz and Instagram launch APIs

I started using Instagram just the other day and have been thoroughly enjoying it; personally, it’s not about taking the photographs, it’s about seeing the photographs my connections are taking. At the time that I started using it, PicPlz was launched, which is essentially Instagram for Android devices.

Both platforms launched APIs today, PicPlz beat Instagram by a few hours, but that doesn’t really matter does it! As we all know, APIs open up the potential for awesome 3rd party applications, so for the Instagram and PicPlz fans, get ready for some awesomeness!

I’m off to go and have a read and look at how open the APIs are and hopefully strike some inspiration from them! :)