Wiki

Articles in category "tips", sorted by ratingX
Displaying 81-90 of 98 result(s).

Making friends' configs, DB credentials and paths with version control

Created 7 months ago by Alexander PalamarchukTips1 comment – viewed 2,711 times – ( +2 / -1 )
In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test server and never (generally speaking) - on the production.
tags: config

Using CJuiDialog to edit rows in a CGridView

Created about a year ago by Russell EnglandTips7 comments – viewed 18,729 times – ( +2 / -1 )
I have a CGridView with a list of clients/events. For each row (EventClient) I wanted a quick edit dialog.

Using Yii with Oracle through PDO

Created 2 years ago by TrejderTips3 comments – viewed 18,067 times – ( +1 )
When you are developing an webapp with Yii that will be using Oracle RDBMS you should take a look at these issues in which you may run into it.

Using sub query for doubletts

Created 9 months ago by mbTips3 comments – viewed 3,771 times – ( +1 )
find doubletts by db fields. in this example i will check doublets for 3 tabelfields (col1,col2,col3). so i will get a subquery with the condition, select and grouping of the tablefields. the having with COUNT() > 1 means: find all records more then one result.

Custom Archive in Blog system

Created 9 months ago by nirmalrokaTips0 comments – viewed 2,252 times – ( +1 )
Hi I had made simple archive system for blog system that can handle tbl_post. I had used simple CDbCriteria not more than that. I know there is more and many better way to this but I think this will give some idea to users to generate new idea or customized or modified this version of code.

[pt-br] O guia de estudos do Yii para iniciantes

Created 7 months ago by Rodrigo CoelhoTips0 comments – viewed 2,772 times – ( +1 )
You can find the english version of this wiki here: The complete beginner's study guide for the Yii Framework.

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 6 months ago by Xgamer99Tips3 comments – viewed 4,008 times – ( +1 )
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.

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

Created about a year ago by 1065227709Tips0 comments – viewed 3,504 times – ( +1 )
in model add the following code:
tags: rules

How to use a component before every action of a controller

Created about a month ago by transistorTips1 comment – viewed 2,655 times – ( +1 )
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

Setting static modules' properties in config

Created 7 months ago by Alexander PalamarchukTips0 comments – viewed 2,779 times – ( +2 / -2 )
You may face a situation when you need to access to a configurable module's property from everywhere and you don't have an instance of this module's class.
tags: config, module