Showing 201-220 of 652 items.

Yiinitializr: The Library

Created 13 years ago by Antonio Ramirez Antonio Ramirez, updated 13 years ago by Antonio Ramirez Antonio Ramirez. 9 comments

Yiinitializr\Helpers\Initializer::create('./../', 'frontend', array(

// will override frontend configuration file
__DIR__ .'/../../common/config/main.php', // merged with
__DIR__ .'/../../common/config/env.php', // merged with
__DIR__ .'/../../common/config/local.php' // merged with

))->run(); `

Yiinitializr\Cli namespace

This namespace brings utilities to interact with...

14 0
23
Viewed: 30 099 times
Version: 1.1
Category: Others

Yet another implementation of CPhpAuthManager.

Created 13 years ago by seenivasan seenivasan, updated 13 years ago by seenivasan seenivasan. 3 comments

In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at ma...

5 1
7
Viewed: 22 534 times
Version: 1.1
Category: How-tos

CGridView: Adding behaviors from configuration, and template items from behaviors to CGridView

Created 13 years ago by le_top le_top, updated 13 years ago by le_top le_top. 0 comments

Changing the way a CGridView is rendered from the configuration file, or through behaviors specified at the moment it is used, is handy to extend a CGridView without creating tons of different classes for it. I am surprised that this is not in the default implementation, so I made my default CGridView implementation.

3 0
3
Viewed: 18 363 times
Version: 1.1
Category: Tips

Alternative folder structure for a standard Yii app

Created 13 years ago by Trejder Trejder, updated 13 years ago by Trejder Trejder. 4 comments

I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.

3 0
9
Viewed: 24 549 times
Version: 1.1
Category: How-tos

CjuiDatepicker

Created 13 years ago by hiral darji hiral darji, updated 13 years ago by hiral darji hiral darji. 1 comment

If you have two datepicker in one form and you want that a date of from date shold be minimum date of todate then put following code in Cjuidatepicker widget options array:

'onSelect'=>'js:function(selected) {
$("#HostelRoomStatusMaster_room_status_master_end_date").datepicker("option","minDate",selected);
				}',
1 0
5
Viewed: 13 867 times
Version: 1.1
Category: Tips

Using Grunt for deploying client scripts

Created 13 years ago by Chris83 Chris83, updated 13 years ago by Chris83 Chris83. 8 comments

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...

8 0
7
Viewed: 28 567 times
Version: 1.1
Category: How-tos

Open Dialog from ajax content

Created 13 years ago by Touzas Touzas, updated 13 years ago by Touzas Touzas. 1 comment

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(...
3 1
5
Viewed: 26 765 times
Version: 1.1
Category: How-tos

Custom Login Error Messages

Created 13 years ago by whoopass whoopass, updated 13 years ago by whoopass whoopass. 1 comment

The Yii Framework is very powerful and it provides a lot of functionality right from the pre-built webapp. One of the nice things that is already established for you as a developer is the Login authentication. While the default configuration simply sets it up to run against an array of hard coded usernames and passwords, the [Yii Blog Tutorial](http://www.yiiframework.com/doc/blog/1.1/en/prototype...

6 0
8
Viewed: 56 707 times
Version: 1.1
Category: Tutorials