Wiki

Articles in category "tutorials", sorted by ratingX
Displaying 71-80 of 172 result(s).

Manage (Target) Language in Multilingual Applications + A Language Selector Widget (i18n)

Created about a year ago by c@cbaTutorials9 comments – viewed 14,659 times – ( +9 )
In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language. This tutorial shows a Yii-way of doing this. We implement an event handler for the onBeginRequest event; as the name of the event suggests, this event handler will be called at the beginning of each request, so its a good place to check whether a language is provided (via post, session or cookie) and set the application language accordingly. We also implement a simple Language-Selector Widget, which can render the language options as ajax-links or as a drop-down list.

Collaborative software with git

Created about a year ago by sensorarioTutorials0 comments – viewed 4,199 times – ( +9 )
The most difficult thing in a big project, is to manage conflicts with files modified by others users. Git can do this work for us.

Ordering Models by Weight with CJuiSortable

Created 3 years ago by Matt KelliherTutorials2 comments – viewed 7,255 times – ( +9 )
In this tutorial we will be setting up a content type to be ordered by weight using the JUI Sortable plugin.

How To Customize CMenu Output

Created 2 years ago by AngeloTutorials4 comments – viewed 33,261 times – ( +9 )
CMenu comes with a lot of great customization options built in but sometimes you need it to do more.
tags: menu

Events explained

Created about a year ago by pligorTutorials5 comments – viewed 11,343 times – ( +17 / -2 )
Let's see what exactly are the events in Yii!

MVC primer and 5 minute form walkthrough

Created about a year ago by rix.rix.Tutorials0 comments – viewed 11,658 times – ( +8 )
This tutorial assumes some basic knowledge of Yii and a functional development environment.
tags: Forms, tutorial, mvc

Working with radiobutton list

Created 10 months ago by vibhaJadwaniTutorials0 comments – viewed 12,910 times – ( +8 )
This is a tutorial to work with radioButtonList which will handle enum datatype. Form design and validation both are detailed here.

How to create nice modal login widget with a CJuiDialog

Created 2 years ago by Igor IvanovicTutorials2 comments – viewed 28,465 times – ( +8 )
...folder /protected/components/UserLoginWidget.php... ...extending the CWidget class...
tags: user, login, modal, widget

Avoiding duplicate script download when using CActiveForm on Ajax calls

Created about a year ago by Antonio RamirezTutorials2 comments – viewed 10,017 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.

TDD with PHPUnit_Story and Yii

Created about a year ago by sidewinderTutorials1 comment – viewed 9,266 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.