Category Archives: code

CodeIgniter Clippings for BBEdit

BBEdit is a powerful text editor, for Mac OS X, that provides nearly everything AF-Design needs to be effective when creating apps. While it’s not perfect, it works pretty well 99% of the time. It provides powerful tools for manipulating … Continue reading

Posted in : code, PHP, Software | Tagged : , , , | Comments Off on CodeIgniter Clippings for BBEdit

Key Facebook JavaScript Principles

Yesterday I was working with a friend whom I consider to be a competent developer who was having some challenges integrating Facebook’s JavaScript SDK in an application. Ultimately his issue boiled down to missing a few key concepts in JavaScript … Continue reading

Posted in : Facebook, Facebook Development, JavaScript, jQuery | Tagged : , | 3 Comments

Accessing PHP Constants In Heredoc Strings and More

PHP’s built in heredoc string syntax is extremely valuable for creating blocks of HTML within a PHP file, however, it’s not currently possible to include a constant value within the block. There are a number of scenarios where you might … Continue reading

Posted in : PHP | Tagged : , , , , | Comments Off on Accessing PHP Constants In Heredoc Strings and More

Installing Facebook’s PHP SDK 101

Prerequisites: Familiarity with uploading PHP code, file includes and directory structures. If you are uncertain how to do any of these things, I recommend hiring someone to help you. Installing Facebook’s PHP SDK is really very simple, you have two … Continue reading

Posted in : Facebook Development, PHP, Web Hosting, Websites | Tagged : , , | 7 Comments

Raising Custom Events in JavaScript

Event model programming in the browser can be somewhat limited if you are confined to the basic events outlined by the DOM. This example JavaScript extends the work by Geek Daily to allow for multiple subscribers to the event. I … Continue reading

Posted in : JavaScript | Tagged : , | Comments Off on Raising Custom Events in JavaScript

Automating JSLint Validation

JavaScript validation doesn’t need to be painful, but can be if the only test we use is to run it in the browser and hope it works. Enter JSLint a powerful testing library for JavaScript written by Douglas Crockford. To … Continue reading

Posted in : JavaScript, Testing | Tagged : , , , | 2 Comments

Reading the Twitter Stream API with PHP

Monitoring a term like ‘Facebook’ with the Twitter Search API can result in hundreds of tweets every minute. If you continuously issue requests for the next set of data, you’ll eventually get a message that reads, “You have been rate … Continue reading

Posted in : PHP | Tagged : , , | 18 Comments

Fb:serverFbml on Canvas Iframe

Are you lost after reading Facebook’s documentation on <fb:serverFbml />? You’re not alone. While trying to embed an invitation request in an iframed canvas application, it proved unhelpful but I found this work around. FBML is being phased out and … Continue reading

Posted in : Facebook Development, xFBML | Tagged : , , | 10 Comments

Setting and Reading Cookies in JavaScript

Surprisingly jQuery doesn’t have a built in method for managing browser cookies. There are many plugins available, but when possible, I prefer to stick to the core library. The main reason for this is so I can use the Google … Continue reading

Posted in : JavaScript | Tagged : , | Comments Off on Setting and Reading Cookies in JavaScript