Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 161-170 of 341 result(s).

How to use an application behavior to maintain runtime configuration

Created 3 years ago by zaccariaHow-tos3 comments – viewed 27,010 times – ( +28 ) – version 1.1
In this tutorial will be explained a method to manage some configuration runtime. This excellent tutorial follows a similar approach, but requires to write a masterclass which all controllers are supposed to extend, following this wiki you can achieve the same by only editing the configuration.

YiiBooster: How to implement files and images upload on TbRedactor Widget

Created 2 years ago by Antonio RamirezHow-tos3 comments – viewed 21,133 times – ( +13 ) – version 1.1
I have been requested to provide a tutorial on how to use the file upload feature of the TbRedactor widget, and even though I am no longer supporting the library due that the work belongs to Clevertech, I feel that I owe that to the Yii developers. So, here is the  tutorial.

Yet another implementation of CPhpAuthManager.

Created 2 years ago by seenivasanHow-tos3 comments – viewed 9,450 times – ( +8 / -1 ) – version 1.1
In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at main application level to controller level. This way we have pulverised auth data for entire site into smaller units. Finally we are going to look at couple of examples.

How to translate and do the translations the easy way

Created 3 years ago by Roman SolomatinHow-tos3 comments – viewed 52,468 times – ( +28 / -2 ) – version 1.1
I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.

How to keep filters simple in CGridView

Created 6 months ago by PeppeHow-tos2 comments – viewed 2,908 times – version 1.1
The problem is not new: after setting some filters in a grid (typically in admin view), and gone to another page, returning in the grid's page I would like to find the filters with previous setting mantained.

File uploads in CForm (Form builder)

Created 3 years ago by Luke JurgsHow-tos2 comments – viewed 36,862 times – ( +12 ) – version 1.1
While there is a reasonable amount of documentation regarding CForm (form builder) and file uploads seperately, there really is not any coverage of both in combination.

Moving the vendor directory for multiple projects

Created 6 months ago by mariosimaremareHow-tos2 comments – viewed 4,471 times – ( +4 / -1 ) – version 2.0
This How-To is useful if you are planning to move the Yii vendor directory outside the default location.

Insert a multirow header in CGridView

Created about a year ago by PeppeHow-tos2 comments – viewed 11,303 times – ( +6 ) – version 1.1
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way you can write columns grouping headers, and obtain a nicer view.

How to use Expression in default AccessControl to allow only the owner to do some action

Created about a year ago by whatifHow-tos2 comments – viewed 22,852 times – ( +7 / -1 ) – version 1.1
Hi Everyone

How to handle decimal separators (e.g comma instead of dot) for l18n

Created 3 years ago by jpabloHow-tos2 comments – viewed 13,060 times – ( +2 ) – version 1.1
Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.