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.
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.
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...
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.
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.
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).
这篇文章将介绍使用Linux cronjobs去自动化执行Yii Console Application(控制台)任务,像每天晚上执行缓存清理,临时文件清理,发送邮件,网站备份等等,重复的工作都交给服务器后台去完成,Yii本身已经提供了强大的支持,我们所做的工作就很少,当使用yiic webapp 自动生成工程结构时,强大的Yii已经全部帮我们生成好,仅仅只需三步。
上一篇 关于 Yii CHttpSession性能优化篇之源码流程分析 有详细分析CHttpSession执行流程,在了解CHttpSession的详细执行流程之后,我们就可以非常轻松的扩展Yii Session,来优化和符合自己的业务流程。
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
in model add the following code:
Whatever reason, it turns out to be easy enough to add that feature to your application. :)
change your index.php
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...
Simple as that. I have placed this action in my extension folder like:
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)...
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...
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.
The config first required In CApplication constructor
require_once($yii); Yii::createWebApplication($config)->run();
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_...
yii-1.1.8.r3324 framework directory is 10.4 mb size.