Wiki articles

Showing 381-400 of 823 items.

Implementing a Flat User Access System

Created 12 years ago by Trejder Trejder, updated 12 years ago by Trejder Trejder.

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.

6 0
7 followers
Viewed: 18 850 times
Version: 1.1
Category: How-tos

How to use the official Yii installer for Composer (**DEPRECATED**)

Created 12 years ago by br0sk br0sk, updated 12 years ago by br0sk br0sk.

This wiki shall be considered deprecated since the Yii installer for composer has been discontinued.

3 0
10 followers
Viewed: 56 166 times
Version: 1.1
Category: How-tos
11 0
20 followers
Viewed: 34 511 times
Version: 1.1
Category: How-tos

CjuiDatepicker

Created 12 years ago by hiral darji hiral darji, updated 12 years ago by hiral darji hiral darji.

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 followers
Viewed: 12 371 times
Version: 1.1
Category: Tips

using jqbargraph to create beautiful graphs

Created 12 years ago by MAHESH.E.U MAHESH.E.U, updated 12 years ago by MAHESH.E.U MAHESH.E.U.

If you are about to create a graph, the best option i would suggest is the jqbargraph.

5 0
9 followers
Viewed: 12 237 times
Version: 1.1
Category: Tips

Send mail using YiiMail extension

Created 12 years ago by RKA RKA, updated 12 years ago by RKA RKA.

Step1: Download the extension from path 'http://code.google.com/p/yii-mail/downloads/list' .

7 0
18 followers
Viewed: 122 389 times
Version: 1.1
Category: Tutorials
Tags: YiiMail

Using Grunt for deploying client scripts

Created 12 years ago by Chris83 Chris83, updated 12 years ago by Chris83 Chris83.

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 followers
Viewed: 26 129 times
Version: 1.1
Category: How-tos

A simple way to get Yii client-side form validation run when submitting by ajax

Created 12 years ago by nlac nlac, updated 10 years ago by nlac nlac.

A time ago i've met the issue that Yii doesn't run any client-side form validation when submitting the form by CHtml::ajaxSubmitButton. The small javascript below helps to fix it.

4 1
11 followers
Viewed: 65 839 times
Version: 1.1
Category: Tutorials

Open Dialog from ajax content

Created 12 years ago by Touzas Touzas, updated 12 years ago by Touzas Touzas.

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 followers
Viewed: 25 209 times
Version: 1.1
Category: How-tos

Custom Login Error Messages

Created 12 years ago by whoopass whoopass, updated 12 years ago by whoopass whoopass.

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 followers
Viewed: 53 903 times
Version: 1.1
Category: Tutorials

Yii for beginners 2

Created 12 years ago by rackycz rackycz, updated 3 years ago by rackycz rackycz.

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 followers
Viewed: 94 077 times
Version: 1.1
Category: Tutorials

Adding a date range search for CGridView the easy way

Created 12 years ago by mikewalen mikewalen, updated 11 years ago by mikewalen mikewalen.
  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 followers
Viewed: 43 836 times
Version: 1.1
Category: Tips

Adding a link to a CDataColumn

Created 12 years ago by le_top le_top, updated 12 years ago by le_top le_top.

Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

2 0
8 followers
Viewed: 28 086 times
Version: 1.1
Category: Tips

Integrating HybridAuth directly into Yii without an extension

Created 12 years ago by biz dev biz dev, updated 12 years ago by biz dev biz dev.

This article tries to explain the steps required in integrating the HybridAuth into Yii directly, without using an extension.

10 0
15 followers
Viewed: 52 913 times
Version: 1.1
Category: How-tos

Patching PHP code (used as a library) without changing the original code!

Created 12 years ago by le_top le_top, updated 12 years ago by le_top le_top.

The article Fixing extensions without modifying their code reminded me of another patching technique that I used. My conviction and a hard look on the web had led me to an article [Redefine PHP class methods or class](http://stackoverflow.com/questions/137006/ph...

4 0
5 followers
Viewed: 14 202 times
Version: 1.1
Category: Tips

Fixing extensions without modifying their code

Created 12 years ago by schmunk schmunk, updated 12 years ago by schmunk schmunk.

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 followers
Viewed: 18 903 times
Version: 1.1
Category: Tips

Limit a CGridView field to some preset length.

Created 12 years ago by le_top le_top, updated 12 years ago by le_top le_top.

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.

9 0
9 followers
Viewed: 23 939 times
Version: 1.1
Category: How-tos

PHPStorm & NetBeans autocomplete problem

Created 12 years ago by Stageline Stageline, updated 12 years ago by Stageline Stageline.

The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.

12 0
14 followers
Viewed: 23 119 times
Version: 1.1
Category: Tips

Extending an ActiveRecord model

Created 12 years ago by Bogsey Bogsey, updated 12 years ago by Bogsey Bogsey.

protected $_viewFile

2 3
7 followers
Viewed: 30 090 times
Version: 1.1
Category: How-tos