Wiki articles in category How-tos

Showing 161-180 of 292 items.

Twitter Bootstrap style Breadcrumbs

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

will generate twitter bootstrap styled breadcrumb code:

3 1
4 followers
Viewed: 53 892 times
Version: 1.1
Category: How-tos

Extending an ActiveRecord model

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

protected $_viewFile

2 3
7 followers
Viewed: 28 648 times
Version: 1.1
Category: How-tos

Limit a CGridView field to some preset length.

Created 11 years ago by le_top, updated 10 years ago by 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: 22 145 times
Version: 1.1
Category: How-tos

Integrating HybridAuth directly into Yii without an extension

Created 11 years ago by biz dev, updated 10 years ago by 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: 51 089 times
Version: 1.1
Category: How-tos

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

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
11 0
20 followers
Viewed: 32 806 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 287 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 229 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

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 685 times
Version: 1.1
Category: How-tos

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

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

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

Client-side form validation using Twitter Bootstrap's Popovers

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

This article explains how to easily turn standard text-line validation errors into beautifully and professionally looking Twitter Bootstrap's Popovers.

4 0
9 followers
Viewed: 44 884 times
Version: 1.1
Category: How-tos

Implementing menu items with progress (wait) dialog

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

This article shows one of possible ways to implement menu items (as well as links), which displays a progress / wait dialog and are redirecting browser to destination URL in the same time. This is especially useful, for links or routes that are know to be loaded for a prolonged period of time (i.e. getting a lot of data from database).

1 0
1 follower
Viewed: 21 411 times
Version: 1.1
Category: How-tos

defaultScope

Created 10 years ago by Gerhard Liebenberg, updated 10 years ago by Gerhard Liebenberg.

This example includes a composite condition as well as an empty condition - as if you bypass or disable defaultScope without using resetScope().

3 0
5 followers
Viewed: 32 920 times
Version: 1.1
Category: How-tos

Profiling using XDebug

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

A short explication on how to extract profile information for PHP on your server using XDebug and KCacheGrind or WinCacheGrind.

3 0
3 followers
Viewed: 21 291 times
Version: all
Category: How-tos

Logging to Heroku's logs from Yii

Created 10 years ago by aarondfrancis, updated 9 years ago by aarondfrancis.

In order to get your Yii logs into Heroku's logs, you have to work a little bit of magic. You'll need to modify the boot.sh script and add the following two lines: ~~~ touch /app/apache/logs/app_log tail -F /app/apache/logs/app_log & ~~~ This will set up the log and tail it so that when you request "heroku logs", this log is included.

1 0
1 follower
Viewed: 10 232 times
Version: 1.1
Category: How-tos