Wiki

Sorted by viewsX
Displaying 401-410 of 687 result(s).

How to create a criteria condition for a multiple value text search i.e a "LIKE IN"

Created 7 months ago by tophHow-tos2 comments – viewed 9,399 times – ( -1 ) – version 1.1
This is a shortcut for adding a text search for multiple values i.e.

Create a custom menu using CMenu data-items (flat or tree structure)

Created 10 months ago by KonApazHow-tos0 comments – viewed 9,350 times – ( +4 )
There are cases that you want more control to your menu Suppose you want a specific menu with complex css, layout, images. also you want to add extra content,html,css,javascript etc it run time foreach submenu item by conditions.

Get 'source' data from the database - for TbEditableColumn or EditableColumn ('type'=>'select' / dropdownlist)

Created about a year ago by Gerhard LiebenbergHow-tos0 comments – viewed 9,302 times – ( +4 / -1 ) – version 1.1
If you want to edit data directly in the gridview in a 'dropdownlist' style, then you could use the 'type' => 'select' option of TbEditableColumn (YiiBooster) or EditableColumn (x-editable for Yii). This wiki shows how to get data from the db for the 'dropdownlist', by converting AR model data into an array that is passed in json format.

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

Created about a year ago by KonApazHow-tos4 comments – viewed 9,277 times – ( +4 / -6 )
Ok, it is a little bit difficult to full understanding the unsafe validator.

Encapsulate db and module configurations

Created 4 years ago by ricardogranaTutorials3 comments – viewed 9,260 times – ( +7 ) – version 1.1
This method was inspirated on the excellent text about different environments available at http://www.yiiframework.com/doc/cookbook/32/
tags: module

Using Yii with PHP 5.4 built-in webserver instead of Apache

Created 2 years ago by samdarkHow-tos1 comment – viewed 9,159 times – ( +21 ) – version 1.1
Since version 5.4 PHP can work as a simple webserver so you can develop Yii applications without installing Apache. That's how to use it:

Upload CSV File

Created about a year ago by bhavesh vaghelaTutorials1 comment – viewed 9,103 times – ( +5 ) – version 1.1
View file

Log Activity in DataBase

Created about a year ago by mahdi1986Tutorials6 comments – viewed 9,077 times – ( +7 ) – version 1.1
In this article i will explain how to customize log activity in database, Imaging you need to save IP user, Url request and user_name in database,But table created by default with Yii only have id,level,category,logtime and message

How to extend CFormatter, add i18n support to booleanFormat and use it in CDetailView

Created 2 years ago by c@cbaHow-tos3 comments – viewed 8,955 times – ( +9 ) – version 1.1
As you know, the CDetailView widget displays details of a single model. If no formatting is specified, boolean values that are stored in the database as 0 and 1, are represented in the detail view as 0 and 1. If formatted as boolean, they are represented as 'No' and 'Yes'. We want to add i18n support, so that Yes and No appear in the current language.

Getting nulls from database instead of empty strings

Created 3 years ago by samdarkTips2 comments – viewed 8,948 times – ( +12 ) – version 1.1
To get null from database instead of empty strings you need to set up your DB connection as follows:
tags: database, null