Wiki

Sorted by viewsX
Displaying 441-450 of 692 result(s).

Alternative folder structure for a standard Yii app

Created about a year ago by TrejderHow-tos4 comments – viewed 8,106 times – ( +5 ) – version 1.1
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.

Limit a CGridView field to some preset length.

Created about a year ago by le_topHow-tos1 comment – viewed 7,920 times – ( +12 ) – version 1.1
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.

Simple Mail Queue

Created about a year ago by waterloomattTutorials1 comment – viewed 7,894 times – ( +8 / -2 )
This tutorial shows how to create a simple mail queue. It is usually run from a cron job but can be run from the command line too.

Understanding series articles

Created 2 years ago by GOshaTips0 comments – viewed 7,850 times – ( +16 ) – version 1.1
Here are all wiki articles from "Understanding" series by Yii wiki contributors:

get summary of related model via STAT relation

Created about a year ago by rootbearHow-tos2 comments – viewed 7,782 times – ( +7 / -1 ) – version 1.1
typical scenario: invoice, invoice items.

PHPStorm & NetBeans autocomplete problem

Created about a year ago by StagelineTips1 comment – viewed 7,751 times – ( +22 ) – version 1.1
The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.

Rendering a view file in a console application

Created 2 years ago by TompiHow-tos1 comment – viewed 7,681 times – ( +3 / -2 ) – version 1.1
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.

Speedup unit tests by moving MySql data to memory (in Ubuntu)

Created about a year ago by sebTips0 comments – viewed 7,615 times – ( +1 / -1 ) – version 1.1
Speedup unit tests by moving MySql data to memory [Ubuntu]
tags: mysql, unit test

An important tip when you are using CArrayDataProvider.

Created 2 years ago by sirin kTips0 comments – viewed 7,610 times – ( +8 / -1 ) – version 1.1
Yii ‘s CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an error like “yourmodel.id is not defined”.

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

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