Wiki

Articles in category "tutorials", sorted by viewsX
Displaying 111-120 of 172 result(s).

Integrating with other frameworks

Created 3 years ago by KJediTutorials4 comments – viewed 10,255 times – ( +3 / -1 )
When you need to integrate with other frameworks (e.g. Zend Framework), you have to follow these steps:

Avoiding duplicate script download when using CActiveForm on Ajax calls

Created about a year ago by Antonio RamirezTutorials2 comments – viewed 10,003 times – ( +11 / -1 )
Sometimes the active form we wish to use to edit/add a new element on our database is too small and we believe that is much better to use an AJAX'ed dialog/slide form rather than reloading the page to just display one or two fields.

Custom Number Formatting or Decimal Separators and i18n

Created 9 months ago by c@cbaTutorials4 comments – viewed 9,913 times – ( +3 )
By default, the decimal separator in php (also in mysql) is a dot (.). So when we work with floats in Yii (in calculations, validation, sql statements etc.), the decimal separator has to be a dot. If we want to use for example a comma (,) as the decimal separator, that is if we want to display numbers and enable users to enter numbers with a comma before the decimals, we have to...

Yii for beginners 2

Created 2 months ago by rackyczTutorials2 comments – viewed 9,774 times – ( +20 )
Hi :-) Is that you again? Welcome !! :-)
tags: Created

How to add a named scope to ActiveRecords with a behavior

Created 4 years ago by MikeTutorials1 comment – viewed 9,509 times – ( +3 )
Since Yii 1.0.5 you can use named scopes with ActiveRecords. They are a great help in simplifying your query calls.

Logout CSRF Protection

Created 2 years ago by Rodrigo CoelhoTutorials1 comment – viewed 9,297 times – ( +10 )
CSRF is the acronymn for Cross-site request forgery. It is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.

TDD with PHPUnit_Story and Yii

Created about a year ago by sidewinderTutorials1 comment – viewed 9,261 times – ( +7 )
Unfortunately Sebastian Bergmann decided to remove PHPUnit_Story from future PHPUnit versions. Thanks to elvan for pointing me to the relevant comment. As an alternative Behat has been suggested but it seems too bloated for me TBH. There is also PHPSpec but it's non flexible enough for me and tightly bound with English language (What's the purpose of using DSL if customers can't speak English). Since both frameworks are quite young I think I'll just stick to PHPUnit and see what's going on on the BDD frameworks arena. Even PHPUnit_Story parts of this entry are going to be deprecated soon, rest is still valid! When doing TDD, please write tests with design and behaviour of application in mind instead of testing single functions.

Simple way to use AutoComplete using different ID and Display Value

Created 9 months ago by raheelk2kTutorials1 comment – viewed 9,250 times – ( +3 )
Usually when we use AutoComplete in a project, We need to show "title" or "name" in the list, while when the form is posted, we need some sort of integer ID referring to the selected value. Out of the Box, CJuiAutoComplete widget doesn't provides different display text and post values.

Configuring CWebLogRoute for DB profiling

Created about a year ago by Igor IvanovicTutorials1 comment – viewed 9,187 times – ( +3 )
/index.php /protected/config/main.php
tags: logger, profiler, db

free PHP IDE CodeLobster supports Yii framework

Created about a year ago by clodTutorials0 comments – viewed 9,179 times – ( +5 )
This page is created to supply short directions and general tips for managing a Yii application in Codelobster PHP Edition.