Sometimes you may want to restrict your a cgridview to only display records with a list of values. The CDbCriteria class reference page stipulates that the allowed values are: the column value to be compared with. If the value is … Continue reading →
August 16th, 2012
In a previous article, User defined rules for Access rights, I described the basic access rules available in Yii. One area that often seems to confuse Yii developers is the Admin access restriction. The default created by Gii is: PHP | copy code |? 01 02 … Continue reading →
August 3rd, 2012
Just a quick tip which took me a little while to figure out. If you have a “last_updated” column on your table and you want to update this manually in your code ten the easiest way would be use the MySQL NOW() … Continue reading →
July 3rd, 2012
We often turn to widgets and classes that are provided within a framework without really understanding the reasons why we might or might not use them. In our training materials, you will always find the predicted way to use such … Continue reading →
June 22nd, 2012
Yesterday, I wrote an AJAX shopping basket widget which, as I’m sure you can imagine, I wanted to refresh when items are added or deleted. However, having written the code to display the widget it confused me for a while … Continue reading →
May 17th, 2012
This is a continuation of two previous articles, How to make a dynamic Sub-menu and How to make a dynamic sub-menu – UPDATE, which show the mechanisms by which you can build a dynamic submenu system, populating the dropdowns from the relevant controller. … Continue reading →
May 1st, 2012
Here are some nice examples of using the logging facilities in Yii PHP | copy code |? 0102 ‘log’=>array(03 ‘class’=>’CLogRouter’,04 ‘routes’=>array(05 array(06 ‘class’=>’CWebLogRoute’,07 // you can include more levels separated by commas08 ‘levels’=>’trace, info, error, warning, vardump’,09 // categories are those you used in the … Continue reading →
April 24th, 2012
I needed an email mechanism for a customer that was light and easy to configure. Yii extensions I tried several email extensions from the Yii website all of which I found overly complex to setup and use. I then remembered … Continue reading →
April 5th, 2012
WordPress 3.0 introduced the ability for plugin developers to build their own custom post types. This means that the main data is held in the same table as your WordPress posts and pages and therefore means that other core wordpress … Continue reading →
March 29th, 2012
WARNING – 22 June 2012 I have since noticed that although this seems to work, WordPress returns an error 404 to the browser, which is not good for Search Engine Bots. I have discussed it with GetShopped without any luck, … Continue reading →
March 21st, 2012