Wiki articles

Showing 421-440 of 651 items.

Shrink Yii, help your IDE and speed up copying

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

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

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

Authenticating against phpass hashes with Yii

Created 13 years ago by Da:Sourcerer, updated 10 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: 40 200 times
Version: 1.1
Category: How-tos

Send asset folder path to a javascript of a widget

Created 13 years ago by sensorario, updated 13 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 754 times
Version: 1.1
Category: Tips

Creating a jQueryUI Sortable CGridView

Created 13 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 890 times
Version: 1.1
Category: How-tos

Force a User to Change Their Password (ChangePasswordFilter)

Created 13 years ago by waterloomatt, updated 13 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: 30 201 times
Version: 1.1
Category: Tutorials
9 0
15 followers
Viewed: 32 814 times
Version: 1.1
Category: Tips

Configuring CWebLogRoute for DB profiling

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

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

2 0
6 followers
Viewed: 34 853 times
Version: 1.1
Category: Tutorials

Caching the config main.php

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

The config first required In CApplication constructor

4 1
14 followers
Viewed: 23 530 times
Version: 1.1
Category: Tutorials

Using cache in CActiveDataProvider

Created 13 years ago by Stamm, updated 13 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: 28 291 times
Version: 1.1
Category: Tips

Using filters with CGridView and CArrayDataProvider

Created 13 years ago by marcovtwout, updated 11 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: 93 961 times
Version: 1.1
Category: How-tos

Avoiding duplicate script download when using CActiveForm on Ajax calls

Created 13 years ago by Antonio Ramirez, updated 13 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: 27 207 times
Version: 1.1
Category: Tutorials

Customizing Yii's formatting rules (extending CFormatter)

Created 13 years ago by Haensel, updated 13 years ago by Haensel.

CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model)...

12 0
6 followers
Viewed: 23 242 times
Version: 1.1
Category: Tips

Filter / Search with CListView

Created 13 years ago by JohnPollard, updated 11 years ago by JohnPollard.

This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

22 0
26 followers
Viewed: 55 912 times
Version: 1.1
Category: How-tos

Display a nice exception message on ajax requests

Created 13 years ago by Maurizio Domba Cerin, updated 13 years ago by Maurizio Domba Cerin.

in Yii versions previous to 1.1.9 exceptions was handled differently during ajax request and displayed by CApplication::displayException(). This way the exception message displayed on ajax requests could not be customized.
The message for the CGridView delete request with YII_DEBUG set to true l...

12 0
19 followers
Viewed: 49 697 times
Version: 1.1
Category: Tips

Guidelines for good schema design

Created 13 years ago by Steve Friedl, updated 6 years ago by softark.

Virtually all Yii applications are built on top of a database, and though Yii is very flexible in how it addresses your DB, some design choices make things more convenient than others.

124 0
71 followers
Viewed: 123 602 times
Version: 1.1
Category: Tips

Run Yiic directly from your app without a shell

Created 13 years ago by jacmoe, updated 13 years ago by jacmoe.

Whatever reason, it turns out to be easy enough to add that feature to your application. :)

13 0
20 followers
Viewed: 49 418 times
Version: 1.1
Category: How-tos

an easy way to required multi columns(At least one cannot be blank)

Created 13 years ago by 1065227709, updated 13 years ago by 1065227709.

in model add the following code:

3 0
3 followers
Viewed: 11 826 times
Version: 1.1
Category: Tips
Tags: rules

Using a CDbDataReader (sql query result) in a zii widget (such as CGridView or CListView)

Created 13 years ago by Revelis Luc Bonnin, updated 13 years ago by Revelis Luc Bonnin.

If in your application you have to proceed to a complex SQL query that is not associated to a model, you will use CDbDataReader like it is described in the Yii documentation. An example could be

8 1
8 followers
Viewed: 59 625 times
Version: 1.1
Category: How-tos

Yii CDBHttpSession数据库存储session性能优化实战

Created 13 years ago by Darwin Wen, updated 13 years ago by Darwin Wen.

上一篇 关于 Yii CHttpSession性能优化篇之源码流程分析 有详细分析CHttpSession执行流程,在了解CHttpSession的详细执行流程之后,我们就可以非常轻松的扩展Yii Session,来优化和符合自己的业务流程。

1 1
1 follower
Viewed: 14 400 times
Version: 1.1
Category: Tips

关于Yii CHttpSession性能优化篇之源码流程分析

Created 13 years ago by Darwin Wen, updated 12 years ago by Maurizio Domba Cerin.

当我们使用Yii数据库去保存Session时,只要简单的配置就可以完成这个功能,在进行性能优化这个主题之前,我们先来查看一下CHttpSession和CDBHttpSession源代码,探讨CHttpSession和CDBHttpSession的流程再进行深一步优化主题。

0 1
2 followers
Viewed: 17 610 times
Version: 1.1
Category: Tips