Wiki

Articles in category "tips", sorted by ratingX
Displaying 1-10 of 99 result(s).

Guidelines for good schema design

Created about a year ago by Steve FriedlTips13 comments – viewed 35,246 times – ( +123 )
Virtually all Yii applications are built on top of a database, and though Yii is very flexible in how it addresses your DB, some design choices make things more convenient than others.

CGridView: Render customized/complex datacolumns

Created about a year ago by JobloTips7 comments – viewed 57,460 times – ( +55 )
If you have to display a overview of related data in a table, you can use the CListView, create your view with table/tr/td tags and implement db-queries in the view to display detaildata of the current (master-)record.
tags: CGridView

Extending common classes to allow better customization

Created 2 years ago by Steve FriedlTips0 comments – viewed 13,989 times – ( +38 )
The two most commonly-used base classes in most Yii applications are CController and CActiveRecord, each extended to your own particular models and controllers.

Configuring PhpStorm IDE for Yii

Created 2 years ago by samdarkTips13 comments – viewed 42,005 times – ( +50 / -1 )
In order to be able to get from render or renderPartial to the view, from widget to widget class, from relations to model classes you need to install additional plugin called YiiStorm.
tags: IDE, PhpStorm

Code style

Created 2 years ago by zaccariaTips2 comments – viewed 10,312 times – ( +28 )
Often, when writing widgets or editing Yii code, it is unclear whether or not the code is following the MVC pattern.
tags: mvc

URL component access functions

Created 2 years ago by Steve FriedlTips1 comment – viewed 7,768 times – ( +28 )
Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest class wraps various $_SERVER variables to break down the URL into its constituent parts.
tags: URL, request

Adding Yii Search to Your Browser Search Box

Created 2 years ago by qiangTips1 comment – viewed 21,973 times – ( +26 )
The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.
tags: search

An easy way to display a success page using flash messages

Created 2 years ago by qiangTips2 comments – viewed 13,783 times – ( +23 )
We often need to display a success page after the user has submitted a form without problem. We may show some welcome message after a user registers a new account. There are many ways to implement this workflow. In this article, I will explain a method that exploits flash messages.

Reading the doc

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

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

Created 10 months ago by kiran sharmaTips9 comments – viewed 30,387 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)