Sorted by viewsX
Displaying 471-480 of 779 result(s).

[Updated] How to create & call custom global function in whole application?

Created 2 years ago by Rohit SutharTutorials8 comments – viewed 13,760 times – ( +5 / -2 ) – version 1.1
In this wiki I will show how to create own custom global function. It may be save the space and reduce the time.

Using MBMenu and Rights to automatically create menu item for your modules

Created 5 years ago by dinhtrungTips2 comments – viewed 13,665 times – ( +1 / -1 ) – version 1.1
Using Rights generator component, we can easily create a dynamic menu, in which we scan every modules' controllers, to access the index page of them.

More security in your applications with Yii and PHPIDS

Created 5 years ago by Rafael GarciaHow-tos1 comment – viewed 13,623 times – ( +8 ) – version 1.1
PHPIDS is a well known project that can be found in
tags: phpids, security

Yii2 default values for Index data Provider

Created 2 years ago by CTalaTips2 comments – viewed 13,422 times – ( +4 ) – version 2.0

Key web server settings after installing a fresh Yii 2 basic or advanced app

Created 2 years ago by Kartik VTips2 comments – viewed 13,384 times – ( +48 ) – version 2.0
So, you have installed a brand new Yii 2 app (basic) or (advanced). Here are a few tips for Apache web server users to get things running more secure and better with your yii2 app.

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 4 years ago by BoazHow-tos2 comments – viewed 13,347 times – ( +7 / -1 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

Alternative folder structure for a standard Yii app

Created 3 years ago by TrejderHow-tos4 comments – viewed 13,306 times – ( +5 ) – version 1.1
I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.


Created 7 years ago by jonahTutorials1 comment – viewed 13,290 times – ( +2 / -2 ) – version 1.1
Note: currently a variant of this class CTimestampBehavior is included into Yii distribution package.

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 3 years ago by Xgamer99Tips3 comments – viewed 13,282 times – ( +1 ) – version 1.1
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.

i18n for your model in just 1 line

Created 6 years ago by mintaoTutorials0 comments – viewed 13,252 times – ( +12 ) – version 1.1
A simple trick to get the localized version of a model field is to add this little method to your models.
tags: i18n