Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 151-160 of 322 result(s).

Yet another implementation of CPhpAuthManager.

Created about a year ago by seenivasanHow-tos3 comments – viewed 8,686 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.

Check users online, user last activity, user last ip

Created 3 months ago by frazelliHow-tos3 comments – viewed 3,081 times – ( +1 ) – version 1.1
DbHttpSession

How to translate and do the translations the easy way

Created 3 years ago by Roman SolomatinHow-tos3 comments – viewed 48,032 times – ( +27 / -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.
tags: i18n

How to keep filters simple in CGridView

Created about a month ago by PeppeHow-tos2 comments – viewed 1,731 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 34,793 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 28 days ago by mariosimaremareHow-tos2 comments – viewed 1,757 times – ( +4 ) – 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 9,921 times – ( +5 ) – 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 handle decimal separators (e.g comma instead of dot) for l18n

Created 2 years ago by jpabloHow-tos2 comments – viewed 12,213 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.

History Autocomplete

Created 2 years ago by zaccariaHow-tos2 comments – viewed 7,420 times – ( +3 ) – version 1.1
In application development we often have to choose how to mange recurrent values.
tags: autocomplete

get summary of related model via STAT relation

Created about a year ago by rootbearHow-tos2 comments – viewed 9,115 times – ( +7 / -1 ) – version 1.1
typical scenario: invoice, invoice items.