Wiki articles

Showing 221-240 of 651 items.

Avoiding duplicate script download when using CActiveForm on Ajax calls

Created 12 years ago by Antonio Ramirez, updated 12 years ago by Maurizio Domba Cerin.

The only thing required is simple, we just need to create a view that will be partially rendered by a call to a controller (using renderPartial) and make sure that we process output -setting to true the parameter on the function. Everything will work as expected but...

11 1
9 followers
Viewed: 26 550 times
Version: 1.1
Category: Tutorials

Using filters with CGridView and CArrayDataProvider

Created 12 years ago by marcovtwout, updated 10 years ago by yugene.

Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

19 0
29 followers
Viewed: 92 765 times
Version: 1.1
Category: How-tos

Using cache in CActiveDataProvider

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

First param in CActiveDataProvider could be a string with model name or instance of class. So, you may use CActiveRecord::cache() for cache, but you need set third param to 2, because you should cache 2 queries: counting and get data.

17 0
11 followers
Viewed: 27 797 times
Version: 1.1
Category: Tips

Caching the config main.php

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

The config first required In CApplication constructor

4 1
14 followers
Viewed: 22 681 times
Version: 1.1
Category: Tutorials

Configuring CWebLogRoute for DB profiling

Created 12 years ago by Igor Ivanovic, updated 12 years ago by Igor Ivanovic.

require_once($yii); Yii::createWebApplication($config)->run();

2 0
6 followers
Viewed: 34 408 times
Version: 1.1
Category: Tutorials
9 0
15 followers
Viewed: 32 023 times
Version: 1.1
Category: Tips

Force a User to Change Their Password (ChangePasswordFilter)

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

Sometimes you need to force a user to change their password after x number of days. This article describes how to implement this using a filter, ChangePasswordFilter.

14 0
10 followers
Viewed: 29 521 times
Version: 1.1
Category: Tutorials

Creating a jQueryUI Sortable CGridView

Created 12 years ago by blindMoe, updated 11 years ago by rAWTAZ.

I have had to do this a couple of times now so I figured I would share it with the community. I am going to keep this short because I really hope that you are familiar with jQueryUI's Sortable class before starting this tutorial.

36 0
54 followers
Viewed: 52 148 times
Version: 1.1
Category: How-tos

Send asset folder path to a javascript of a widget

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

When you develop a widget, you could need one image that is in the assets folder, you can use it simply within a css. You can load a css or javascript script doing this:

Yii::app()->getClientScript()->registerCssFile($filename);
4 0
9 followers
Viewed: 34 106 times
Version: 1.1
Category: Tips

Authenticating against phpass hashes with Yii

Created 12 years ago by Da:Sourcerer, updated 9 years ago by Da:Sourcerer.
  • iteration_count_log2 controls the number of iterations for key stretching. A setting of 8 means the hash algorithm will be applied 2^8 = 256 times. This setting should be kept between 4 and 31.
  • portable_hashes controls whether portable hashes should be used or not. Portable hashes are salted MD5 hashes prefixed by $P$.
22 0
28 followers
Viewed: 39 135 times
Version: 1.1
Category: How-tos

Shrink Yii, help your IDE and speed up copying

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

yii-1.1.8.r3324 framework directory is 10.4 mb size.

9 8
16 followers
Viewed: 14 045 times
Version: 1.1
Category: Tips

Yii registry, how to use it, does it exist at all?

Created 12 years ago by dckurushin, updated 11 years ago by resurtm.

If you coming to Yii with experience with Zend Framework for example, most likely you get used to

Zend_Registry::get('paramName');
Zend_Registry::set('paramName');
6 0
9 followers
Viewed: 35 930 times
Version: 1.1
Category: How-tos

How to translate and do the translations the easy way

Created 12 years ago by Roman Solomatin, updated 8 years ago by Roman Solomatin.

I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.

16 2
17 followers
Viewed: 87 413 times
Version: 1.1
Category: How-tos

free PHP IDE CodeLobster supports Yii framework

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

This page is created to supply short directions and general tips for managing a Yii application in Codelobster PHP Edition.

5 0
1 follower
Viewed: 20 017 times
Version: 1.1
Category: Tutorials

how to use github (un)official extension repo in your Yii project

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

I'm developing a web project for a company using Yii framework. We are using a git vcs in our development process. We like to use Yii extensions. But only if they are good.

4 0
8 followers
Viewed: 12 089 times
Version: 1.1
Category: Tips

Adding search to Yii blog example (using Zend Lucene)

Created 12 years ago by dckurushin, updated 11 years ago by klammeraffe.
  • add under runtime directory, a new one call it search, it will be used for the index files that Zend Lucene will create. Make sure it is writable!
29 1
47 followers
Viewed: 88 526 times
Version: 1.1
Category: Tutorials

Understanding the view rendering flow

Created 12 years ago by dckurushin, updated 10 years ago by Jorgee.

If we take a look at the blog demo we have 3 major parts of our view rendering. They are:

56 1
55 followers
Viewed: 239 717 times
Version: 1.1
Category: FAQs

Yii for beginners

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

Hi. This is first article with my Yii v1 tutorial. I had to split it into 2 articles as there's limited length of texts on Wiki. So once you understand basics, you can read the 2nd article here: Yii for beginners 2.

68 0
75 followers
Viewed: 437 451 times
Version: 1.1
Category: Tutorials

Reliable Alternative For Yii::app()->request->isAjaxRequest AND Adding Data To Ajax Form With JS

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

In this How-To I'll show you:

12 1
10 followers
Viewed: 60 576 times
Version: 1.1
Category: How-tos

Special $variables in CGridView and CListView

Created 12 years ago by Steve Friedl, updated 12 years ago by Steve Friedl.

The popular [CListView] and [CGridView] widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.

23 1
33 followers
Viewed: 77 202 times
Version: 1.1
Category: Tips