View file
View file
Create param.php file in protected/config
Yii::app()->params['TEXT_ACTIVE'] = 'Active'; //1 for active
In this wiki I will show how to copy a schema from a database to another one
Use SQL SERVER 2000, the date format not like: yyyy/mm/dd hh:mm:ss. So I change to use SQL SERVER 2008 EXPRESS.
Suppose you have Products,Categories and each product belongs in many categories
This is second article with my tutorial. I had to add it, because Wiki article has limited length and as I was extending it's text, older paragraphs were disappearing. So here I am starting from chapter 6.
In this wiki I will show how to Disallowing login from multi places. User can login or access their account at time, only single place.
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_...
Hi Friends,
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...
This page assumes that you have installed Wampserver on your MS Windows computer.
For a complete sample Nginx+PHP-FPM config, view this how-to: Nginx & PHP-FPM
This is the first real problem that I encountered using Yii, trying to make a Model input repeatable in the form, validate and save them.
One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.
This method was inspirated on the excellent text about different environments available at http://www.yiiframework.com/doc/cookbook/32/
During development, it's often very handy to have SQL logging and profiling.
For each column of the CGridView, we can specify name
, value
, htmlOptions
, cssClassExpression
etc. In the declarations of the attributes value
and cssClassExpression
we can use the "special" variable $data
, for example like this: 'value'=>'$data->author->username',
.
Now we might want to use $data
in the declaration of the `...
In this article you will find Yii framework extensions enabling you to add various charts/print out buttons etc. to your webapp.
It is a common case coders often come accross. For example the purpose of these checkbox is to mark records to be deleted
This is a tutorial to work with radioButtonList which will handle enum datatype. Form design and validation both are detailed here.