Showing 381-400 of 826 items.

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 561 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 764 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

Yii for beginners 2

Created 13 years ago by rackycz rackycz, updated 4 years ago by rackycz rackycz. 2 comments

This is second article with my tutorial. I had to add it, because Wiki article has limited length and as I was extending it's text, older paragraphs were disappearing. So here I am starting from chapter 6.

15 0
21
Viewed: 112 530 times
Version: 1.1
Category: Tutorials

Adding a date range search for CGridView the easy way

Created 13 years ago by mikewalen mikewalen, updated 12 years ago by mikewalen mikewalen. 6 comments
  1. Create an Active Record Behavior that builds the criteria for the search() method and attach it to your model
  2. Modify the search() method of the model to merge the behavior's criteria in with the rest of the searchable attributes
  3. Modify the _search form view to add the date range inputs
6 0
11
Viewed: 46 155 times
Version: 1.1
Category: Tips

Fixing extensions without modifying their code

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

If you're working a lot with extensions you often stumble upon problems, when you want to include them into your custom web application, like hardcoded or absolute path aliases or classes extended from core application components, which implement addiditonal features.

6 0
10
Viewed: 21 911 times
Version: 1.1
Category: Tips