Wiki

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

Creating a CSS Driven Drop Down Menu using CMenu

Created about a year ago by blindMoeHow-tos7 comments – viewed 38,129 times – ( +19 / -1 )
CMenu offers great functionality and the ability to customize just about every aspect of the output. There are many times when I need to create a drop down menu or simply modify the look to make the designers happy. Because this seems to be a common task for me, I figured I would share my code to create a very simple drop down menu that other people could use.

Multiple-database support in Yii

Created 2 years ago by Steve FriedlHow-tos8 comments – viewed 37,901 times – ( +21 )
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 37,626 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

Javascript and AJAX with Yii

Created 8 months ago by François GannazHow-tos2 comments – viewed 36,010 times – ( +28 )
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

How to use PHPExcel external library with Yii

Created 2 years ago by Antonio RamirezHow-tos12 comments – viewed 35,971 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 35,420 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:

Updating fields on a form with Ajax and Json

Created 2 years ago by Russell EnglandHow-tos4 comments – viewed 31,969 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 2 years ago by Russell EnglandHow-tos9 comments – viewed 31,858 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 31,347 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 31,112 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