Wiki

Sorted by viewsX
Displaying 361-370 of 784 result(s).

Debugging CActiveRecord failed save() attempts

Created 4 years ago by BoazTips0 comments – viewed 22,352 times – ( +5 / -1 ) – version 1.1
When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

How to add a named scope to ActiveRecords with a behavior

Created 8 years ago by MikeTutorials2 comments – viewed 22,345 times – ( +4 / -1 ) – version 1.1
Since Yii 1.0.5 you can use named scopes with ActiveRecords. They are a great help in simplifying your query calls.

multiple CActiveDataProviders in one CGridView

Created 4 years ago by Kostas Apazidis (KonApaz)How-tos7 comments – viewed 22,128 times – ( +8 / -2 ) – version 1.1
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

Image resize on the fly

Created 4 years ago by TpoxaHow-tos4 comments – viewed 21,967 times – ( +4 / -1 ) – version 1.1
For example have folder with image resources which are public accessible
tags: yii, image-resize

Multilanguage web site controlling by get request and database allowed languages

Created 6 years ago by Igor IvanovicTutorials2 comments – viewed 21,940 times – ( +6 / -1 ) – version 1.1
First, you have to have create database table for default language and allowed languages.

Multi level dropdown menu in Bootstrap

Created 3 years ago by sefburhanTutorials1 comment – viewed 21,855 times – ( +38 / -1 ) – version 1.1
To get multi level dropdown menu of using boostrap extension (http://www.yiiframework.com/extension/bootstrap/) widget TbNavbar just follow steps

Show captcha after <N> unsuccessfull attempts

Created 5 years ago by zitterHow-tos7 comments – viewed 21,810 times – ( +15 / -6 ) – version 1.1
In this mini howto I would like to show how to add a required captcha field in the login form, after a defined number of unsuccessfull attempts. To do this, I will use the blog demo that you have in default Yii download package (path/to/yii/demos/blog).

Two Login in same form in Yii application , with two tables

Created 3 years ago by BaluTutorials6 comments – viewed 21,788 times – ( +4 / -8 ) – version 1.1
login links will be

"safe" and "unsafe" Model validators (massive assignments)

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 21,680 times – ( +4 / -7 ) – version 1.1
Ok, it is a little bit difficult to full understanding the unsafe validator.

Integrating with other frameworks

Created 8 years ago by KJediTutorials4 comments – viewed 21,617 times – ( +5 / -2 ) – version 1.1
When you need to integrate with other frameworks (e.g. Zend Framework), you have to follow these steps: