Codeigniter.tvbeta

Codeigniter video tutorials and screencasts

Create a Codeigniter Wordpress-like shortcode parser

Author: Joost van Veen

2011/08/24 Screenshot

Ever played with shortcodes in Wordpress? Cool, huh? Today we'll be creating our very own shortcode parser library for Codeigniter.

You can use this shortcode functionality in your CMS to enable your users to add loads of functionality with just a single line of code. Think in terms of shortcode callbacks like [ai:formbuilder id=1|id=login_form].

We'll also chuck in an example in which we show a user's name from shortcode [ai:user id=1|class=admin] and a Google map, from shortcode [ai:maps lat=52.373056|lon=4.892222]

Check out more Codeigniter video tutorials on http://codeigniter.tv and don't forget to comment & subscribe.

Download the source code