Wiki

Sorted by ratingX
Displaying 111-120 of 742 result(s).

How to log changes of ActiveRecords?

Created 6 years ago by pfthTutorials7 comments – viewed 37,213 times – ( +38 / -2 ) – version 1.1
A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a CActiveRecord Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecords very easily.
tags: Logging

How to use PHPExcel external library with Yii

Created 4 years ago by Antonio RamirezHow-tos14 comments – viewed 69,754 times – ( +29 / -1 ) – version 1.1
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?

How to set up Unicode

Created 6 years ago by MikeHow-tos10 comments – viewed 71,310 times – ( +19 ) – version 1.1
To fix issues with display of special language characters once and for all there's a solution: use Unicode UTF-8 everywhere. If everything is set up to use Unicode, you can use mostly every language in your application.
tags: i18n, unicode

How to display static pages in Yii?

Created 6 years ago by qiangTutorials2 comments – viewed 51,250 times – ( +19 ) – version 1.1
In a Web application, we often need to display pages like "about this site", "legal information", whose content are mostly static. There are several approaches to deal with this kind of pages.
tags: static pages

AssetManager: clearing browser's cache on site update

Created 3 years ago by dhampikHow-tos4 comments – viewed 26,291 times – ( +19 ) – version 1.1
If you like the things to be short and clear, then you can skip right to a short summary of instructions at the end of this article.

Theming your Zii Widgets

Created 4 years ago by Luis Lobo BorobiaTutorials16 comments – viewed 45,645 times – ( +19 ) – version 1.1
One aspect of User Interface Design has to do with the coherence of the design and the use of the colors between the different User Interface Components used.

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created 2 years ago by yJeroenTutorials8 comments – viewed 47,684 times – ( +19 ) – version 1.1
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

Hyphenation of routes in URL management

Created 2 years ago by qiangHow-tos6 comments – viewed 16,775 times – ( +19 ) – version 1.1
In this article, we introduce an approach that allows automatic hyphenation of the route part in URLs.
tags: URL

CJuiDialog and AjaxSubmitButton

Created 4 years ago by tydeas_drTutorials22 comments – viewed 91,389 times – ( +37 / -2 ) – version 1.1
Hello ppl. Even though i have a small experience with yii I though of writing this to help people which want to do something similar.
tags: AJAX

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created 3 years ago by c@cbaTutorials3 comments – viewed 45,509 times – ( +28 / -1 ) – version 1.1
    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this: 'value'=>'$data->author->username',.     Now we might want to use $data in the declaration of the htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...