Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 21-30 of 254 result(s).

How to use PHPExcel external library with Yii

Created 3 years ago by Antonio RamirezHow-tos13 comments – viewed 51,973 times – ( +27 / -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?

Actions code reuse with CAction

Created 3 years ago by Antonio RamirezHow-tos13 comments – viewed 26,026 times – ( +34 ) – version 1.1
We all know how good 'gii' automates the code for us and we normally tend to be happy with what that tool offers at the beginning of our Yii learning curve. But as soon as you start working in larger and larger projects, you realize that its code is too repetitive to maintain and having a small pitfall in general actions means to go over and over through them to fix the issues.
tags: CAction, Tutorial

Using CJuiDatePicker for CGridView filter

Created 2 years ago by softarkHow-tos12 comments – viewed 27,521 times – ( +19 ) – version 1.1
We can use a CJuiDatePicker for a CGridView inline filter.

How to show ajax delete status in CGridView like flash messages

Created 2 years ago by hasanaviHow-tos12 comments – viewed 29,192 times – ( +20 ) – version 1.1
I've seen many tickets regarding how to show friendly delete confirmation using CGridView's CButtonColumn in ajax request. If you are using relational database, after producing CRUD functionality when you try to delete a record in ajax mode which has child record it can't be deleted and you can see the ajax loader forever. By this way you can't show the users if a record has been successfully deleted or if there are some problem in flash style (setFlash() / getFlash())

Create your own Validation Rule

Created 3 years ago by nickcvHow-tos11 comments – viewed 104,885 times – ( +71 / -3 ) – version 1.1
Some times the core validation rules provided by Yii won't satisfy all your needs, so you'll need to create your very own validation rule.

How to set up Unicode

Created 5 years ago by MikeHow-tos10 comments – viewed 55,185 times – ( +18 ) – 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

Getting the Most out of APC for Yii

Created 2 years ago by Da:SourcererHow-tos10 comments – viewed 21,744 times – ( +16 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

Creating and updating model and its related models in one form, inc. image

Created about a year ago by BoazHow-tos10 comments – viewed 38,087 times – ( +5 / -3 ) – version 1.1
We start slowly and simple...

Using Yii with Nginx and PHP-FPM

Created 3 years ago by LericHow-tos10 comments – viewed 36,578 times – ( +17 ) – version 1.1
This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.

How to use YiiBooster TbFileUpload widget

Created about a year ago by Antonio RamirezHow-tos10 comments – viewed 24,723 times – ( +10 ) – version 1.1
The following wiki is to explain how to make use of the TbFileUpload widget from YiiBooster. I have received a couple of requests and I thought was worth writing a wiki for it.