Wiki articles

Showing 201-220 of 651 items.

Yiinitializr: The Library

Created 10 years ago by Antonio Ramirez, updated 10 years ago by Antonio Ramirez.

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 followers
Viewed: 26 451 times
Version: 1.1
Category: Others

How to use a component before every action of a controller

Created 10 years ago by transistor, updated 10 years ago by transistor.

I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

2 0
4 followers
Viewed: 50 553 times
Version: 1.1
Category: Tips

How to implement an event and attach it in a behavior

Created 10 years ago by seb7, updated 10 years ago by seb7.

This page explains how to implement an event and catch that event in a behavior.

2 0
9 followers
Viewed: 27 395 times
Version: 1.1
Category: How-tos

Yet another implementation of CPhpAuthManager.

Created 10 years ago by seenivasan, updated 10 years ago by seenivasan.

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

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

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

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

Alternative folder structure for a standard Yii app

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

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

How to change Migration Table name and use defined prefix.

Created 10 years ago by Jorgee, updated 10 years ago by jamband.

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.

3 0
5 followers
Viewed: 21 686 times
Version: 1.1
Category: How-tos

Using Google Maps in Yii Applications via Jquery

Created 10 years ago by bluyell, updated 10 years ago by bluyell.
2 0
6 followers
Viewed: 23 259 times
Version: 1.1
Category: How-tos

Implementing a Flat User Access System

Created 10 years ago by Trejder, updated 10 years ago by 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: 17 230 times
Version: 1.1
Category: How-tos

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

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

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

3 0
10 followers
Viewed: 54 288 times
Version: 1.1
Category: How-tos
11 0
20 followers
Viewed: 32 806 times
Version: 1.1
Category: How-tos

CjuiDatepicker

Created 11 years ago by hiral darji, updated 11 years ago by 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: 11 424 times
Version: 1.1
Category: Tips

using jqbargraph to create beautiful graphs

Created 11 years ago by MAHESH.E.U, updated 11 years ago by 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: 11 425 times
Version: 1.1
Category: Tips

Send mail using YiiMail extension

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

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

7 0
18 followers
Viewed: 118 352 times
Version: 1.1
Category: Tutorials
Tags: YiiMail

Using Grunt for deploying client scripts

Created 11 years ago by Chris83, updated 10 years ago by 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: 24 909 times
Version: 1.1
Category: How-tos

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

Created 11 years ago by nlac, updated 9 years ago by 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: 62 200 times
Version: 1.1
Category: Tutorials

Open Dialog from ajax content

Created 11 years ago by Touzas, updated 11 years ago by 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: 24 227 times
Version: 1.1
Category: How-tos

Custom Login Error Messages

Created 11 years ago by whoopass, updated 11 years ago by 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: 51 291 times
Version: 1.1
Category: Tutorials

Yii for beginners 2

Created 11 years ago by rackycz, updated 2 years ago by 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: 85 242 times
Version: 1.1
Category: Tutorials