Tagsnippets

Twitter Followers Count Snippet for WordPress

Here’s a short snippet to grab and display your twitter followers count in WordPress. You can use this anywhere, sidebar, posts, header, footer. We’ll be firing an anonymous call to the Twitter API for a user profile. This method does not require authentication, unless you’re trying to view a protected profile. To make this slightly easier I’ve used the JSON functions...

Setup Twitter @Anywhere for WordPress in Seconds!

That’s right, seconds! The twitter @Anywhere was introduced at SXSW conference and launched the dev tools a couple of days ago. It’s a simple javascript-driven set of tools that allows you to basically integrate Twitter functionality anywhere on your websites. Usage is as simple as loading a javascript file and launching a couple of js commands, which instantly give you the power of...

How to Count Facebook Fans in PHP

Update: There’s an new easier way of retrieving the fans count using the Graph API, covered here: Counting Facebook Fans in PHP: The Graph API Way Not too tricky this one, but very handy as the social media world is developing extremely fast. It may not be too useful to publish the fan count of your facebook fan page if you’ve got less than a hundred or so, but as soon as you jump...

Extending Custom Post Types in WordPress 3.0

In a previous article about Custom Post Types in WordPress 3.0 I outlined one of the most exciting features coming up in 3.0 and I noticed that people have already started building websites upon these new features. It’s not a secret that I’m working on a project myself which involves 3.0 so just like everybody else, I can’t wait to see it being released!

Custom Post Types in WordPress 3.0

I know it’s too early to speak about WordPress 3.0, but I’ve been playing around with some of it’s enhancements the other week, and.. Well, this is a miracle, really. Remember all those plugins promising custom post types in versions prior to 3.0. Those that never get updated and show themselves glitchy sometimes, especially during upgrades? Well the time has come.

5 Really Useful Trac Reports

For those of you who are not familiar with the project management software called The Trac Project please proceed to the Trac Guide. I’ve been working with this project management tool for quite some time now and the latest upgrades are just awesome. I believe the solution for private projects’ RSS feeds has been found a few months ago somewhere here. The iCalendar issue remains, but...

Loading jQuery from a CDN in WordPress

This may seem like an easy task to do but is quite tricky in WordPress. Using a CDN these days is very popular, cheap and helps speed up your website taking the load off your web server. I personally love Amazon CloudFront! The tips at Google Code suggest you serve all your static content from different domains, preferably ones without cookies, so CDNs are perfect. All the problem with WordPress...

Google Docs API: Client Login with PHP and Curl

A few days ago I started looking deeper into the Google Code APIs and threw a few experiments using the Google Documents List Data API. Unfortunately, the only library they have for the third version of their protocol is written in Java. There is a PHP wrapper for the first version of the protocol, but it totally depends on the Zend Framework. Here’s a little code snippet for logging into a...

WordPress: Recent Comments by Category

Yet another WordPress code snippet ;) I’ve got two major categories in my upcoming project – Blogs and Arts. In the archive, somewhere in the sidebar, I’d like to output the recent comments only from the chosen category, excluding the ones that are from the other category. The most difficult part here is to figure out proportions, because running this hack recursively may eat up...

Linux Shell: Host to IP in Bulk

I’m very busy this week setting up a new router here at the office, but I do find some interesting stuff that might be somehow useful to you. Like this shell script I wrote a few hours ago that reads a text file with different hosts on each line (google.com, yahoo.com, etc) and returns a new file with their resolved, i.e. ip addresses on each line. I’m not sure where you’d want...