Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 11-20 of 182 result(s).

Accessing data in a join table with the related models

Created about a year ago by fsbHow-tos7 comments – viewed 36,235 times – ( +18 / -1 )
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.

Multiple-database support in Yii

Created 2 years ago by Steve FriedlHow-tos8 comments – viewed 36,030 times – ( +19 )
The customary configuration of a Yii application includes just a single database section in the protected/config/main.php file, but it's easy to extend this to support more than one, tying each Model to one of the databases.
tags: Database

How to set up Unicode

Created 4 years ago by MikeHow-tos9 comments – viewed 35,835 times – ( +16 )
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 use PHPExcel external library with Yii

Created 2 years ago by Antonio RamirezHow-tos12 comments – viewed 34,469 times – ( +22 / -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?
tags: yii, libraries

Using standard filters in CGridView custom fields

Created 2 years ago by GOshaHow-tos4 comments – viewed 34,227 times – ( +15 )
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.For example: We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0. So we do the usual thing:

Javascript and AJAX with Yii

Created 7 months ago by François GannazHow-tos2 comments – viewed 32,063 times – ( +27 )
This page intends to provide an exhaustive guide of how to use Javascript (JS) in Yii. It does not explain how to learn coding in JS, but how to deal with it "the Yii way".
tags: javascript, AJAX

Updating fields on a form with Ajax and Json

Created 2 years ago by Russell EnglandHow-tos4 comments – viewed 31,070 times – ( +12 / -1 )
I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.

Local time zones and locales

Created about a year ago by Russell EnglandHow-tos9 comments – viewed 30,323 times – ( +12 / -2 )
Following on from international dates, I also wanted times in the local timezone and format. This was a little more tricky but I think I've got a solution. This is only really appropriate if you have an international app.

Configuring controller access rules to default-deny

Created 2 years ago by Steve FriedlHow-tos1 comment – viewed 29,496 times – ( +10 )
Starting with the blog tutorial, Yii developers are familiar with the notion of access rules defined in the controller, where the actions are allowed or denied depending on the user's name or role.

Setting and getting systemwide static parameters

Created 2 years ago by Steve FriedlHow-tos2 comments – viewed 29,126 times – ( +10 )
Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.
tags: config