Wiki

Sorted by ratingX
Displaying 91-100 of 706 result(s).

Impersonate Users within Yii Framework

Created 3 years ago by WoilTutorials5 comments – viewed 12,758 times – ( +22 ) – version 1.1
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

PHPStorm & NetBeans autocomplete problem

Created about a year ago by StagelineTips1 comment – viewed 8,139 times – ( +22 ) – version 1.1
The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.

Creating a parameterized LIKE query

Created 3 years ago by Steve FriedlFAQs6 comments – viewed 52,400 times – ( +22 ) – version 1.1
It's common to see users wishing to make substring DB queries, using the % metacharacter used to match anything; in this FAQ we'll search the tbl_comments table from the blog tutorial hoping to find the text in $match in the content column

How to use single form to collect data for two or more models (CActiveForm and Ajax Validation edition)

Created 3 years ago by RusAlexHow-tos9 comments – viewed 40,010 times – ( +22 ) – version 1.1
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

Common Yii questions

Created 3 years ago by dckurushinFAQs2 comments – viewed 34,147 times – ( +21 ) – version 1.1
Here I suggest to list the most common questions you meet in the forum or freenode irc. Feel free to edit this wiki article, and add another question with answer

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

Created 2 years ago by samdarkHow-tos1 comment – viewed 9,431 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:

Display an AJAX tree from your DB using CTreeView

Created 4 years ago by Fran├žois GannazTutorials10 comments – viewed 46,753 times – ( +21 ) – version 1.1
This example uses a MySQL DB with a table named tree with the fields id, name, and parent_id. The parent_id will be NULL for root elements. The SQL is kept simple (no autoinc, no FK, etc).
tags: AJAX, CTreeView

Reading the doc

Created 4 years ago by zaccariaTips0 comments – viewed 6,597 times – ( +21 ) – version 1.1
Almost all the information you need whilst working with yii is written in the Class Reference.
tags: doc

Dynamic Sidebar using CClipWidget

Created 3 years ago by SheldmanduHow-tos5 comments – viewed 22,448 times – ( +21 ) – version 1.1
Most applications will have one or two sidebars and often you want to control the content that should appear in the sidebar based on the action. For example you will want to show something different on the homepage as opposed to some view page. While achieving this you generally also want to avoid putting the layout into each view, as that would mean if you wanted to change the layout (e.g. put the sidebar on the left instead of the right or do some funky layout which requires an additional div tag to be added) you'd have to go through every view, which does not achieve good code re-use. It is also bad practice to have lots of if statements in column2 layout just so that you can generate the sidebar correctly.

How to show ajax delete status in CGridView like flash messages

Created 3 years ago by hasanaviHow-tos12 comments – viewed 34,264 times – ( +21 ) – version 1.1
I've seen many tickets regarding how to show friendly delete confirmation using CGridView's CButtonColumn in ajax request. If you are using relational database, after producing CRUD functionality when you try to delete a record in ajax mode which has child record it can't be deleted and you can see the ajax loader forever. By this way you can't show the users if a record has been successfully deleted or if there are some problem in flash style (setFlash() / getFlash())