Wiki articles

Showing 121-140 of 822 items.

CJuiDialog and AjaxSubmitButton

Created 13 years ago by tydeas_dr, updated 12 years ago by phazei.

Hello ppl. Even though i have a small experience with yii I though of writing this to help people which want to do something similar.

33 1
45 followers
Viewed: 126 186 times
Version: 1.1
Category: Tutorials
Tags: AJAX

ISA hierarchy of tables inside a database and how to implement a single form

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

Please consider the following Dear software engineers imagine I have a simple ISA hierarchy: parent A with children B and C. So let's say we have the corresponding tables named "a", "b", "c" and (created with the help of the gii model creator) the classes A, B, C The following is a screenshot from MySQL workbench: ![MySQL workbench screenshot](http://s4.postimage.org/4tuwkm43d/Screenshot.pn...

1 0
3 followers
Viewed: 16 669 times
Version: 1.1
Category: How-tos

adding class and links to Ctreeview node

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

This article will show you how to add links and class to each node in ctreeview. so you can attach events in js by obtaining handler on anchor or class.

4 0
6 followers
Viewed: 19 492 times
Version: 1.1
Category: Tips

Update/delete model with CJuiDialog (works in CGridView)

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

This tutorial will show you how to create Ajax dialog which allows to create new model, update or delete existing model. It works with simple links, CGridView button column links, adds a minimal amount of code and degrades gracefully with JavaScript turned off.

15 0
25 followers
Viewed: 76 994 times
Version: 1.1
Category: Tutorials

Moving project code outside of webroot (plus multiple project support)

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

Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).

21 1
19 followers
Viewed: 64 876 times
Version: 1.1
Category: How-tos

三步使用cronjobs自动化去执行Yii 控制台任务

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

这篇文章将介绍使用Linux cronjobs去自动化执行Yii Console Application(控制台)任务,像每天晚上执行缓存清理,临时文件清理,发送邮件,网站备份等等,重复的工作都交给服务器后台去完成,Yii本身已经提供了强大的支持,我们所做的工作就很少,当使用yiic webapp 自动生成工程结构时,强大的Yii已经全部帮我们生成好,仅仅只需三步。

0 4
2 followers
Viewed: 27 823 times
Version: 1.1
Category: Tutorials

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

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

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

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

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

Created 12 years ago by Revelis Luc Bonnin, updated 12 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 273 times
Version: 1.1
Category: How-tos

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

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

in model add the following code:

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

Run Yiic directly from your app without a shell

Created 12 years ago by jacmoe, updated 12 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: 48 677 times
Version: 1.1
Category: How-tos

How to use EzComponents in Yii

Created 12 years ago by Ehsanjs, updated 12 years ago by samdark.

change your index.php

4 0
6 followers
Viewed: 13 267 times
Version: 1.1
Category: How-tos

Display a nice exception message on ajax requests

Created 12 years ago by Maurizio Domba Cerin, updated 12 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 070 times
Version: 1.1
Category: Tips

A simple action for CJuiAutoComplete

Created 13 years ago by tydeas_dr, updated 12 years ago by Thiago Souza.

Simple as that. I have placed this action in my extension folder like:

15 1
19 followers
Viewed: 48 997 times
Version: 1.1
Category: Tips

Customizing Yii's formatting rules (extending CFormatter)

Created 12 years ago by Haensel, updated 12 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: 22 832 times
Version: 1.1
Category: Tips

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 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 682 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

Multilanguage web site controlling by get request and database allowed languages

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

First, you have to have create database table for default language and allowed languages.

CREATE TABLE IF NOT EXISTS `tbl_languages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `lang` varchar(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `flagpath` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_...
5 0
12 followers
Viewed: 30 297 times
Version: 1.1
Category: Tutorials

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