Code Snippets & Scripts

Here are some code snippets and scripts that I have wrote and released. Most of them will be either CakePHP or PHP but I may have some other stuff in the mix such as Javascript or Ruby. If you have any questions, comments or find any bugs in the code leave a comment on the project's page.

CakePHP
PHP

CakePHP Geotargeting Helper

This helper utilizes IPInfoDB's geolocation tools to find out geographical information from an IP address. The helper also caches results from the webservice per IP address.

Croogo Plugin

Croogo Tagcloud Plugin

This is a plugin for Croogo that allows you to display a tagcloud as a block in any region of the page.

Croogo

Croogo Monthly Archives

Most popular blogging engines usually have some way to categorize articles by month. This short code snippet will allow you to display monthly archives like those blogging engines. I'm assuming that Croogo will eventually add this to the core but for now here is a simple solution.

Croogo

Croogo Full Text Search

Croogo currently doesn't have full text search but with this action you can add full text capabilities to your Croogo installation. This is not guaranteed to work after Croogo 1.1, and hopefully full text search is implemented into the core. Currently this implementation allows you to search blog posts.

CakePHP
PHP

CakePHP Video Encoder Component

This is a component to convert and encode videos in your CakePHP application. This was extracted from a live social networking project that I built. Currently it is just optimized to encode and convert flash video but it is very easy to modify the code to your needs.