Wiki

Sorted by viewsX
Displaying 441-450 of 719 result(s).

How to customize error handling in console-mode applications

Created 4 years ago by Steve FriedlHow-tos1 comment – viewed 8,951 times – ( +3 ) – version 1.1
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 them.

How to obtain a grammatically correct translation of the model name in giix-generated view files

Created 2 years ago by c@cbaHow-tos0 comments – viewed 8,936 times – ( +4 ) – version 1.1
The giix code generator has out of the box i18n support for model names and attribute labels (besides other cool features > check it out!) . But I want to factor in not only the plural form, but also the grammatical cases (especially the accusative) while translating 'Manage Objects', 'Create Object', 'Edit Object' etc.

Directory independent extensions

Created 4 years ago by GOshaTips3 comments – viewed 8,901 times – ( +15 / -1 ) – version 1.1
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:

Extending CJuiDialog

Created 2 years ago by dstudioHow-tos0 comments – viewed 8,871 times – ( +2 / -2 ) – version 1.1
Sometimes you have CJuiDialog with different content but same buttons (or width, height). If you don't want to repeat yourself this is a great solution:

How to catch and log MySQL deadlock errors

Created 2 years ago by sebTips1 comment – viewed 8,850 times – ( +4 ) – version 1.1
This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.
tags: database

Creating a Dependent Dropdown From Scratch in Yii2

Created 6 months ago by ThePr0f3550rHow-tos1 comment – viewed 8,841 times – ( +4 ) – version 2.0
I have read http://www.yiiframework.com/wiki/24/creating-a-dependent-dropdown/ (Dependen Dropdown Yii1), but I cant implementation in Yii2 because Yii2 not built-in AJAX functionality hem.. I am search about it and get this statement

Using Pear Mail Mail_Mime and Mail_Queue

Created 3 years ago by LorenHow-tos2 comments – viewed 8,830 times – ( +7 ) – version 1.1
Create a component (/protected/components/PearMail.php) Edit this as needed based on where you put the files from PEAR.

Preventing CJuiTabs from hiding drop-down CMenu items

Created 3 years ago by Steve FriedlTips1 comment – viewed 8,780 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.

Shrink Yii, help your IDE and speed up copying

Created 3 years ago by dckurushinTips4 comments – viewed 8,765 times – ( +10 / -9 ) – version 1.1
In this little tip, I will help you to cut Yii size for about half

Limit a CGridView field to some preset length.

Created about a year ago by le_topHow-tos1 comment – viewed 8,755 times – ( +13 ) – version 1.1
Sometimes text inside a gridview column is just too long. That's why I figured out a way to make the column smaller while still providing the information.