To accomplish the task of changing Migration table's name, by default tbl_migration, you need to add the following in your ./protected/config/console.php.
To accomplish the task of changing Migration table's name, by default tbl_migration, you need to add the following in your ./protected/config/console.php.
This article shows a quick and easy way to implement flat user access control system. Flat means, that user access is controlled by level only, which is solution exactly opposite to complex RBAC access systems.
This wiki shall be considered deprecated since the Yii installer for composer has been discontinued.
For a long time I have struggled to find a suitable tool for doing server tasks such as compiling LESS files, concatenating and minifying of JavaScript files and copying the minified JavaScript files. While most of these tasks can be done with Yii extensions I would still not recommend using them because it requires you to include these extensions in your project, and therefore also deploying them...
This is the code in the View.
<?php echo CHtml::link('MyDialog', Yii::app()->createUrl('site/page'), array('class' => 'openDlg divDialog')); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id'=>'divDialog',
'options'=>array( 'title'=>Yii::t('Dialog Title', 'autoOpen'=>false, 'modal'=>true, 'width'=>600)));
?>
<div class="divForForm"></div>
<?php
$this->endWidget(...
This article tries to explain the steps required in integrating the HybridAuth into Yii directly, without using an extension.
Sometimes text inside a gridview column is just too long. That's why I figured out a way to make the column smaller while still providing the information.
protected $_viewFile
will generate twitter bootstrap styled breadcrumb code:
I discovered Twitter Bootstrap almost two years ago. After trying it out for a while I fell in love with it. It didn't take long before I realized that it would be great to write an extension that allowed developers to start using Bootstrap in their Yii projects. One night I sat down and started writing what later became my now popular [bootstrap extension](http://ww...
I recently created a project called Yii-App on GitHub to kickstart my development of smaller Yii applications. The main goal of the project is to provide a ready-to-use application template that includes my bootstrap extension and many other useful extensions. After reading this article you will be able to use...
These newsletters have always been hard to create as regular web HTML is not properly read by web email interfaces and email clients. I thought that the simplest solution would be to use a web page that would serve as a web version of the newsletter and turn it somehow into newsletter HTML.
I (www.jamesbarnsley.com) found that when using the Yii Bootstrap tabs component you will sometimes want to direct the user to a specific tab and not necessarily the first tab. Yii Bootstrap already provides the "active" variable so you can define whether the tab is the active tab or not in PHP. I generally find though that a PHP solution to...
We all love the convenient gadget, namely jQuery UI Datepicker as an input element for date. Yii supports it as CJuiDatePicker. Let's see how to use it.
I www.jamesbarnsley.com was tasked to find a way to do recursive deletion in Yii. As I asked other developers and looked around the internet the usual answers all came up, use a plugin or use cascade delete at the DB level, but I did not want to do either of these.
I spend a bit of time looking for the this piece of code while building time feature on a site this tutorial also helped Local time zones and locales