Showing 721-740 of 826 items.

How to customize error handling in console-mode applications

Created 15 years ago by Steve Friedl Steve Friedl, updated 15 years ago by Steve Friedl Steve Friedl. 1 comment

One can control the detail of a web application in the webroot/index.php file by manipulating the values of YII_DEBUG and YII_TRACE_LEVEL, but these don't appear to be used by console applications. This is because although the base CApplication class defines a displayError() method that does consider these variable, CConsoleApplication overrides it with a function that doesn't honor th...

3 0
4
Viewed: 24 768 times
Version: 1.1
Category: How-tos

Changing Controllers Name

Created 15 years ago by Trejder Trejder, updated 13 years ago by Trejder Trejder. 0 comments

This very short how-to presents steps required to change controller name. It is oriented for less experienced users, which are starting their journey with Yii, to avoid common newbie pitfalls.

4 0
2
Viewed: 30 949 times
Version: 1.1
Category: How-tos

Using CButtonColumn to customize buttons in CGridView

Created 15 years ago by Trejder Trejder, updated 13 years ago by Gismo Gismo. 20 comments

The easiest way to customize look and behaviour of them is to use series of CButtonColumn properties, like: updateButtonImageUrl (path to image for update button), updateButtonLabel (label for the update button; not HTML-encoded), updateButtonOptions (HTML options for this button, used in the way as many htmlOptions property for many widgets) and updateButtonUrl (a PHP expresion th...

75 0
59
Viewed: 358 563 times
Version: 1.1
Category: How-tos

Directory independent extensions

Created 15 years ago by GOsha GOsha, updated 15 years ago by GOsha GOsha. 3 comments

Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases:

// take the curr...
16 1
7
Viewed: 20 146 times
Version: 1.1
Category: Tips

Adding Yii Search to Your Browser Search Box

Created 15 years ago by qiang qiang, updated 8 years ago by CeBe CeBe. 1 comment

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.

25 0
6
Viewed: 71 039 times
Version: all
Category: Tips

Code style

Created 15 years ago by zaccaria zaccaria, updated 15 years ago by g3ck0 g3ck0. 2 comments

Often, when writing widgets or editing Yii code, it is unclear whether or not the code is following the MVC pattern.

29 0
7
Viewed: 32 867 times
Version: 1.1
Category: Tips

How to use PHPExcel external library with Yii

Created 15 years ago by Antonio Ramirez Antonio Ramirez, updated 12 years ago by cgsmith cgsmith. 15 comments

Trying to learn and help some other programmers to find their solutions on the Yii Forum (I think is a superb way to learn the framework), I was facing one challenge with an external library that a fellow programmer wanted to use -quite good indeed: PHPExcel. And what is PHPExcel?

27 1
25
Viewed: 149 233 times
Version: 1.1
Category: How-tos

Yii and XAMPP server on Windows

Created 15 years ago by Trejder Trejder, updated 15 years ago by Trejder Trejder. 0 comments

This article explains issues about installing XAMPP server package (Lite version) on Windows OS and configuring it for serving webapps written in Yii. Please note, that XAMPP is available for many more platforms and systems. I write about Windows edition as it was the only one tested by me.

3 0
0
Viewed: 84 558 times
Version: 1.1
Category: Tutorials

Extending CActiveForm for some form display fixes and language tweaks

Created 15 years ago by Trejder Trejder, updated 15 years ago by Trejder Trejder. 0 comments

In this simple example I'll demonstrate how to extend CActiveForm class to overload some drawing functions to achieve some commonly used fixes in forms.

The colon

Here is overloaded version of CActiveForm.labelEx that adds colon (:) at the end of text of label with respecting CHtml::$afterRequiredLabel and CHtml::$beforeRequiredLabel

5 0
6
Viewed: 28 997 times
Version: 1.1
Category: Tips