Articles in category "tips", sorted by date (updated)X
Displaying 101-110 of 153 result(s).

How to catch and log MySQL deadlock errors

Updated 4 years ago by sebTips1 comment – viewed 11,860 times – ( +4 ) – version 1.1
This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.
tags: database

Troubleshooting Rights Extension

Updated 4 years ago by junxiongTips6 comments – viewed 22,888 times – ( +8 ) – version 1.1
Rights is one of user interface for Yii's Role Base Access Control extension. It is one of most downloaded extensions in Yii's Web.

Use application on production/development environment without making changes

Updated 4 years ago by ifdatticTips3 comments – viewed 46,510 times – ( +8 / -1 ) – version 1.1
I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

How to ensure unicity to url

Updated 4 years ago by marcovtwoutTips3 comments – viewed 13,067 times – ( +14 ) – version 1.1
Many time for SEO porpouses is important that each page will have a unique address.
tags: SEO, unique, URL

Managing constants easily

Updated 4 years ago by briiC.lvTips4 comments – viewed 14,853 times – ( +4 ) – version 1.1
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.

Using events with CAction classes

Updated 4 years ago by 张 迪Tips0 comments – viewed 14,148 times – ( +10 ) – version 1.1
There are some good guides out there explaining how to work with events and the ways to attach them to your components, but none (that I know) explain the following way to configure your events with CAction classes on your controllers the following way.

Yii Security-extended guide

Updated 4 years ago by bingjie2680Tips11 comments – viewed 19,118 times – ( +6 / -6 ) – version 1.1
This article is called extended guide is because there is already a security guide in the Yii tutorial security section. but that guide is not complete in the sense that it does not rise the developers' attention to some other commonly happening attacks: SQL injection and magic URL, which can be major vulnerabilities in your application without much caring.

Understanding series articles

Updated 4 years ago by GOshaTips0 comments – viewed 9,366 times – ( +16 ) – version 1.1
Here are all wiki articles from "Understanding" series by Yii wiki contributors:

Como trasponer una lista creada con CHtml::checkBoxList

Updated 5 years ago by rdjteamTips3 comments – viewed 12,308 times – ( +2 ) – version 1.1
En ciertas ocasiones tenemos que lidiar con el tema de colocar una lista de checkboxes para hacer una seleccion especifica como es el caso de los dias de la semana para un calendario, para esta labor tenemos el comando CHtml::checkBoxList(), revisando un poco el funcionamiento de este temos los siguientes parametros:

Special $variables in CGridView and CListView

Updated 5 years ago by Steve FriedlTips11 comments – viewed 60,906 times – ( +27 / -2 ) – version 1.1
The popular CListView and CGridView widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.