our blog

Our Blog

How To Add A Lightbox To A WordPress Gallery

I wanted to setup a simple lightbox photo gallery on a WordPress site (v3.2.1) and, to avoid installing a slew of plugins, I put together a little gallery shortcode function using the built-in WordPress gallery shortcode as my starting point. I’m a big fan of PrettyPhoto, so I modified the output of the gallery shortcode to include the needed rel= attribute for PrettyPhoto galleries. (more…)

WordPress: How To Change Comment Excerpt Length

I recently needed to output a list of comments and bumped into a little trouble trying to output the comment excerpt. Usually I would use the built-in comment_excerpt() function but I only needed 10 words instead of the 20 that is hard-coded. I put together a little function that I found helpful and thought I would share.

(more…)

WP e-Commerce Category Product List Shortcode

While setting up a store using WP e-Commerce (v3.8.5 at the time of development) I noticed that the Category Product List Shortcode was no longer working for me.

I cooked up a quick shortcode function using some of their product list code that will query the products by the passed category and output them using the product template. (more…)

Finding the Carrier of a Cell Phone Number in PHP

Often web apps need to send SMS messages to their users (for example: balance alerts, reminders, notifications). To send these text messages from within your app, you basically have 2 options:

1) Pay Twilio and Tropo for the use of their APIs, for roughly a penny per message.

2) Send an email directly to their carrier’s mail-to-SMS gateway – a free service most carriers provide, which will translate your email into an SMS sent to their subscribers’ phone

Twilio and Tropo are about as easy as it gets to integrate (REST-like APIs that return JSON/POX), but you pay for every single message and that can add up quickly. So #2 (mail-to-SMS gateways) starts to look pretty good.

But there’s some problems with mail-to-SMS gateways: (more…)

Facebook Graph API requires Access Token for Feed Access

On June 3rd, Facebook updated the Graph API to require an access token to pull wall post data from public Facebook pages. This change can cause scripts to stop working, so here is a quick solution to pull wall post data from public Facebook pages with an access token. (more…)

A Dead-Simple PNG Fix For Internet Explorer 6 (IE6)

As you know, IE6 does not render transparent PNGs appropriately by default. We can work around it using IE’s proprietary expression CSS property, and there are myriad libraries available to make this easier. However most approaches usually involve creating a separate CSS file for IE6, and most don’t support repeating background images (via the background-repeat CSS property).

We recently stumbled into Drew Diller’s belated PNG fix for IE6, which is the simplest implementation so far, and fully supports repeating background images. All that’s needed is to include a Javascript file and pass an appropriate CSS selector to the library’s fix() function, and the library handles the rest. (more…)

Submitting a Contact Form via AJAX From Your Facebook Page

We recently created a contact submission form on a client’s Facebook page, and were not satisfied with the default user experience. For starters, the form opened a new window, and there was no way to redirect the user back to a confirmation message on the Facebook page.

We decided to submit the form via AJAX instead, and show the confirmation message directly on the Facebook page. This way the user would not have to leave the Facebook page, resulting in a smoother user experience. We couldn’t find a good explanation of how to do this on Google, so after figuring it out I decided to go ahead and write it up.

The following example will show you how to submit a basic contact form using AJAX from within your Facebook page. All HTML and Javascript that follows should be pasted directly into the “Edit FBML” screen on Facebook.

(more…)

Bing – Microsoft’s New Search Engine

Rumors have been floating for some time that Microsoft would be rebranding its Live search engine, especially after its acquisition of Powerset last summer. Although recently leaked screenshots implied the name might be Kumo, AdAge is reporting today that the new engine will be named Bing.

Along with the rebranding comes a reported $80 million advertising campaign spanning TV, radio, print and online, created by New York’s JWT advertising agency. The ads will try to convince consumers that although they may be happy with their current search engine (i.e. Google), they don’t know how good the experience could be.

How Microsoft plans to migrate its current users to the new domain remains to be seen. Certainly they will lose some of their users in the switch, but we think the move makes a ton of sense. Here’s why:

(more…)

Free Webservice to Geocode IP Addresses Saves The Day

At Illuminati Karate we love a challenge. So when our client called needing two lists of 1500 IP addresses geocoded as quickly as possible, we rose to the occasion. With the help of PHP and a freely available web service we were able to complete the task in just under an hour. Here’s how we did it.

(more…)

Wolfram Alpha: First Impressions

Wolfram Alpha Logo

Today marks the official launch of Wolfram Alpha, which is a mathematically based “computational knowledge engine” that derives some of its datasets from the web. Most news outlets will refer to it as a search engine, but the distinction is important:

Traditional search engines, like Google and Yahoo, seek to index pages on other websites and direct their searchers to these pages. Wolfram Alpha’s goal is quite different – it seeks to extract data from other sources to create a massive internal database, which it will then use to answer its searchers’ questions directly. Where Google and Yahoo serve as middlemen directing searchers to relevant properties, Wolfram Alpha contains all of its answers to its own website.

(more…)