Showing 161-180 of 268 items.

Avoiding duplicate script download when using CActiveForm on Ajax calls

Created 14 years ago by Antonio Ramirez Antonio Ramirez, updated 14 years ago by Maurizio Domba Cerin Maurizio Domba Cerin. 2 comments

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
Viewed: 30 674 times
Version: 1.1
Category: Tutorials

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

Created 15 years ago by Darwin Wen Darwin Wen, updated 15 years ago by Darwin Wen Darwin Wen. 0 comments

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

0 4
2
Viewed: 30 973 times
Version: 1.1
Category: Tutorials

Update/delete model with CJuiDialog (works in CGridView)

Created 15 years ago by ifdattic ifdattic, updated 15 years ago by ifdattic ifdattic. 7 comments

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
Viewed: 81 588 times
Version: 1.1
Category: Tutorials

Multilanguage web site controlling by get request and database allowed languages

Created 15 years ago by Igor Ivanovic Igor Ivanovic, updated 14 years ago by rei rei. 2 comments

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
Viewed: 34 602 times
Version: 1.1
Category: Tutorials

Understanding Virtual Attributes and get/set methods

Created 15 years ago by Steve Friedl Steve Friedl, updated 14 years ago by GOsha GOsha. 20 comments

When you define or extend a class, you can create class variables and methods in Yii just like you can in any other PHP system:

class Comment extends CActiveRecord {
    public $helperVariable;
    public function rules() { ... }
    ...
}

and then use them in the obvious way:

$var   = $model->helperVariable;
$rules = $model->rules();

This part everybody understa...

66 0
44
Viewed: 218 654 times
Version: 1.1
Category: Tutorials