Blog

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ex sem, facilisis sed viverra nec, sagittis vel quam nulla nisi mi scelerisque quis.

Using UTF-8 and libXML

As you can guess from the title, this is not a really a Yii based article.  Recently, I spent a few frustrating hours trying to get some data loaded through libXML using simplexml_load_string with various odd parsing errors like: It's not...

Cook your own User Authentication in Yii – Part 4

I know it's been a long break since the previous articles,but a t last, here is the final article in the Series "Cook your own User Authentication in Yii". Previously We already have a fully working User Authentication system.  A user can signup,...

Cook your own User Authentication in Yii – Part 3

This is the last but one in a series of 4 tutorials demonstrating how to implement a simple role based user administration system in Yii.   The first two parts can be found here;  user authentication - part 1 and user authentication - part 2 Previously We've update...

Cook your own User Authentication in Yii – Part 2

In Cook your own User Authentication in Yii – Part 1 , we saw how to over-ride the CUserIdentity class to implement our own user validation against a database table. In this tutorial, we will see how to use the CWebUser class to load the user details into the user's...

Cook your own User Authentication in Yii – Part 1

This is the first of  four articles demonstrating how to build your own simple User Authentication system by extending core Yii classes and just a few views. There are a number of Extensions, Modules and RBAC systems available in the Yii extensions directory and, of...

Yii – Maintaining created and updated date

A very simple way to maintain date-time stamps on records is to use the behaviors method in the data Model, linked with the CTimestampbehavior within Zii widgets. To implement this, in each of your data models, use a behaviors function as follows:- ...

Yii – Converting MySql dates to locale dates

It seems strange to me that two systems that have been around for so long and worked so closely together, do not manipulate dates in the same way. It is also so easy to waste hours of time trying to manipulate dates, check that date A is less than date B and so on......

Yii – How to customize a CGridView CbuttonColumn

Update - Delete - View I'm sure you've already seen and used the basic buttons in a CGridView and maybe even used the template phrases to modify the behaviours   but sometimes we need to break out of this box and create custom buttons for...

Yii – Further model validation

UPDATED 26-Jan-2012 ! A brief note today to add some more specific validation to your models.  As we all know - "rubbish in == rubbish out", so let's get that data nice and clean, right up front! The address regex pattern is using a short-code \w...

Subscribe