• Yii Articles

  • Blog Subjects

  • 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 … Continue reading

    June 1st, 2013

    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 … Continue reading

    May 13th, 2013

    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 … Continue reading

    May 6th, 2013

    Yii – Obscuring the Admin actions

    Another Step towards Securing Your Application We all know that obscurity is no substitute for proper security in any web application, particularly those using AJAX but it does have it’s place in our arsenal towards securing our web applications. I’m … Continue reading

    April 19th, 2013

    Yii Rapid Application Development Hotshot

    I was recently asked to review this book by the Publishers and it’s been sat on the corner of my desktop for a while, just waiting for a few spare moments to have a good old browse … Beneath the … Continue reading

    February 12th, 2013

    Yii – more Advanced Logging

    Yii uses an application component called CLogRouter to determine where and how log messages are output to the various logs. You can configure different “log routes” depending on the log trace level, the log category (more on that later) and … Continue reading

    January 21st, 2013

    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 … Continue reading

    January 15th, 2013

    Yii – CGridView row formatting

    Do you want some advanced styling on your CGridView rows? To individually style each row of your CGridView you can use the rowCssClassExpression property. However, the first thing that you will notice is that your ODD and EVEN formatting disappears. … Continue reading

    November 18th, 2012

    Yii – Parameterising a sub-select in SQL Builder

    I spent hours trawling through Yii documentation, forums and tutorials to try and find out how to do this relatively simple task.  I couldn’t find an answer anywhere and it seems that not many people need this kind of structure. … Continue reading

    November 6th, 2012

    Yii – Looping through a model in chunks

    Or Simple Pagination I recently needed to run through all records in a table and recalculate some variables.  However, the lovely php was giving me a memory exceeded error after about 2000 records.   I assumed that all the model … Continue reading

    October 24th, 2012