Wiki

Articles in category "tips", sorted by date (updated)X
Displaying 111-120 of 134 result(s).

A simple action for XUpload extension

Updated 3 years ago by tydeas_drTips1 comment – viewed 12,884 times – ( +3 ) – version 1.1
All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action
tags: tips, xupload, caction

Yii实战中8个必备常用的扩展,模块和

Updated 3 years ago by Darwin WenTips2 comments – viewed 17,738 times – ( +2 / -3 ) – version 1.1
在经过畅K网的实战后,总结一下在Yii的项目中会经常用到的组件和一些基本的使用方法,分享给大家,同时也给自己留个备忘录,下面我以代码加图片说明.
tags: module, Widgets

An easy way to use escopes and CActiveDataProvider

Updated 3 years ago by Rafael GarciaTips8 comments – viewed 21,250 times – ( +1 / -1 ) – version 1.1
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.

An easy way to display a success page using flash messages

Updated 3 years ago by qiangTips2 comments – viewed 24,402 times – ( +26 ) – version 1.1
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.

Extending common classes to allow better customization

Updated 3 years ago by Steve FriedlTips0 comments – viewed 21,696 times – ( +42 ) – version 1.1
The two most commonly-used base classes in most Yii applications are CController and CActiveRecord, each extended to your own particular models and controllers.

URL component access functions

Updated 3 years ago by Steve FriedlTips1 comment – viewed 10,439 times – ( +28 ) – version 1.1
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

Using jQuery UI 1.8.10 themes with Yii 1.1.6

Updated 3 years ago by samdarkTips7 comments – viewed 14,835 times – ( +2 ) – version 1.1
When using the latest stable jQuery UI themes (1.8.10) with Yii 1.1.6 (which uses 1.8.6) the widgets don't appear (they're invisible but they're there). In order to make them visible you need to change the following line:

Functional tests independing from your urlManager settings

Updated 3 years ago by RusAlexTips1 comment – viewed 7,410 times – version 1.1
If you are testing your app and use urlManager in your config, sometimes you will find a problem: you want to test your site independing from urlManager settings. in that way you need to extend your WebTestCase class by this method:

Preventing CJuiTabs from hiding drop-down CMenu items

Updated 3 years ago by RusAlexTips1 comment – viewed 8,400 times – ( +4 ) – version 1.1
Almost all Yii applications use CMenu at the top of each page to show options available to the user, and many include drop-down components to allow more fine-grained selection.

htmlOptions explained for various controls.

Updated 3 years ago by WoilTips1 comment – viewed 41,669 times – ( +17 ) – version 1.1
Most controls that are rendered by CHtml have an argument called $htmlOptions. This argument is an array that holds the attributes of the HTML element. For example the following code: