Wiki

Sorted by ratingX
Displaying 71-80 of 480 result(s).

Display an AJAX tree from your DB using CTreeView

Created 3 years ago by François GannazTutorials9 comments – viewed 27,754 times – ( +20 )
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

Impersonate Users within Yii Framework

Created 2 years ago by WoilTutorials5 comments – viewed 9,236 times – ( +20 )
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".

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 2 years ago by xrxHow-tos13 comments – viewed 22,918 times – ( +20 )
Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

Drills : Search by a HAS_MANY relation

Created 6 months ago by softarkTutorials9 comments – viewed 8,801 times – ( +20 )
Sometimes we get lost trying to search by a HAS_MANY relation using CActiveRecord or CActiveDataProvider. This article is a series of drills that try to describe the practical techniques of searching by a HAS_MANY relation.

Working with CGridView in Admin Panel

Created 11 months ago by vibhaJadwaniTutorials11 comments – viewed 31,027 times – ( +30 / -1 )
This is a tutorial for how to add input text-Field, check-box, buttons in CGridView.

How to upload a file using a model

Created 4 years ago by qiangTutorials22 comments – viewed 180,039 times – ( +69 / -6 )
First declare an attribute to store the file name in the model class (either a form model or an active record model). Also declare a file validation rule for this attribute to ensure a file is uploaded with specific extension name.
tags: File upload

How to add more information to Yii::app()->user

Created 4 years ago by qiangTutorials1 comment – viewed 70,135 times – ( +19 )
By default, the expression Yii::app()->user returns a CWebUser application component which represents the information that are closely related with the current user. Some information can be persistent throughout the current user session. For example, CWebUser already comes with a name property that stores the username of the current user.

Setting and maintaining the language in Application (i18n)

Created 4 years ago by olafureTutorials9 comments – viewed 49,637 times – ( +19 )
As seen in this post, Yii doesn't enforce how language is set and maintained within the session.
tags: i18n, translation

Integrating Wordpress and Yii: still another approach, using Yii as the router/controller

Created about a year ago by fr0d0zHow-tos12 comments – viewed 13,949 times – ( +19 )
A lot of people have written posts on integrating Yii and WordPress. This article combines goncin's approach with an article I read about integrating Symfony and WordPress and applies it all to Yii and WordPress.

How to upload image(photo), and path entry in database with update functionality

Created 11 months ago by kiran sharmaTips9 comments – viewed 33,706 times – ( +19 )
I saw many posts that community newbie is confuse in image/photo upload with random name. so I post this topic covering all useful things regarding to image/photo upload(not covering image attribute related functionality)