Template Library for CodeIgniter, Simple, Fast and Easy!

How to, OpenSource, PHP, Resources, Reviews, Tips and Tricks, Tutorials
If you have not noticed, I just got started on CodeIgniter. I was really disappointed today when I noticed the lack of a template system in CodeIngiter to skin my little application. They say The Template Parser Class is not a full-blown template parsing solution. We've kept it very lean on purpose in order to maintain maximum performance. Lucky for me, I got a little help here, the library is great and works well for the latest version of CI too best of all its small and does not modify the CI code in anyway. It just uses the already available code to skin the application. Sleak! I made a couple of modifications in the original library, here are my modifications [php]<?php if ( ! defined('BASEPATH')) exit('No direct script access…
Read More

Installing MySQL 5.1 on Ubuntu

How to, Linux, Tips and Tricks, Tutorials, Ubuntu
I wanted to use PARTITIONING introduced in MySQL 5.1 to handle some 2 Million records (and growing everyday) in a table. Ubuntu 8.10 does not have MySQL 5.1 available if you do apt-get the latest version available is 5.0 So this is what I did, its easy and this might help somebody. [sourcecode language="plain"]nano /etc/apt/sources.list[/sourcecode] I prefer nano editor but you can use any editor of your choice. Add these new lines at the end of the end of the file. [sourcecode language="plain"]deb http://ppa.launchpad.net/monty/ubuntu gutsy main universe restricted multiverse deb http://ppa.launchpad.net/smurf/ubuntu gutsy main universe restricted multiverse[/sourcecode] (These packages were targeted for 7.10 so I will recommend using them and removing them from this list once you got the latest MySQL version) Now run the following commands [sourcecode language="plain"]apt-get update apt-get…
Read More

Join Vteams (NEXTBRIDGE) Network on Facebook

How to, Linux, Resources, Tips and Tricks, Tutorials
I have recently request FaceBook to add the Vteams (aka NEXTBRIDGE in Lahore, Pakistan) as a network. To join, you must have an active @nxvt.com email account, just go to Setting -> Account, select network tab. In network name box type "Vteams", enter email address and click JOIN. Check your email and click on the confirmation link Congratulation, you have joined the Vteams Network
Read More

Join Virtual University of Pakistan Network on Facebook

How to, News, Resources, Tips and Tricks, Tutorials
I have recently request FaceBook to add the Virtual University of Pakistan as a network. To join, you must have an active @vu.edu.pk email account, just go to Setting -> Account, select network tab. In network name box type "Virtual University of Pakistan", select your degree and graduation year, enter email address and click JOIN. Check your email and click on the confirmation link Congratulation, you have joined the Virtual University of Pakistan Network
Read More

TwitterTweets, a PHP wrapper class for Twitter REST API

How to, OpenSource, PHP, Resources, Reviews, Tips and Tricks, Tutorials
I have just finished hosting my first OpenSource project on Google Code. Its called TwitterTweets. Its a small wrapper API that consumes Twitter REST API. It can be easily included in any PHP script / application to support manipulation of TwitterTweets from a single user. Currently it has the following features Reading updates including or excluding replies. Caching support to store xml/json response locally as a file with cache-timeout Built-in custom Array I will be writing and uploading modules and plugins for Joomla and Wordpress in the coming days. Stay tuned. Project Homepage: http://code.google.com/p/twittertweets Project Discussion Group: http://groups.google.com/group/twittertweets Enjoy!
Read More

The power of Globally Recognized Avatar (aka Gravatar)

How to, PHP, Resources, Reviews, Tips and Tricks, Tutorials
Gravatar has a very sleak concept but not many people know and understand it. It is one place for your display pictures and you can use the same at any Gravatar enabled website / application. Gravatar is currently used in Wordpress, Movable Type, Drupal, Joomla and Mac OS X Addressbook. Advantages are mainly on the user end where he/she can change one photo and reflect it in multiple places. It includes support for content-rating etc. Here, I will show how it is implemented in PHP [php] $email = "my-email@hotmail.com"; $default = "http://www.somewhere.com/homestar.jpg"; $size = 100; $grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=".md5(strtolower($email)). "&default=".urlencode($default). "&size=".$size; [/php] Now use it in your HTML as [sourcecode language="xml"]<img src="<?php echo $grav_url; ?/>" width="< ?php echo $size; ?>" alt="Gravatar" />[/sourcecode] Simple!! More info at the URLs below http://en.gravatar.com/site/implement/ http://en.gravatar.com/site/implement/php…
Read More