Wiki

Displaying 401-410 of 677 result(s).

Update two models with one view

Created 2 years ago by sensorarioTips10 comments – viewed 29,948 times – ( +10 / -2 ) – version 1.1
Suppose to have two models: Users and Emails. You do not want to store email in a Users model. And User can have 0 or many emails. This is the form generated to create a new user (just username).
tags: database, model, view, form

Change buttons on our CGridView extending yii

Created 2 years ago by sensorarioTips5 comments – viewed 22,265 times – ( +10 ) – version 1.1
In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).

Use application on production/development environment without making changes

Created 2 years ago by ifdatticTips3 comments – viewed 28,792 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.

Managing constants easily

Created 2 years ago by briiC.lvTips4 comments – viewed 9,766 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.

Front-end developer's guide

Created 2 years ago by jonahTutorials5 comments – viewed 20,690 times – ( +11 ) – version 1.1
This wiki is a work in progress.

The Comedy of Errors

Created 2 years ago by fsbOthers3 comments – viewed 7,065 times – ( +20 ) – version 1.1
Please join the party by adding your own favorite Yii programming errors. Be sure to leave at least a hint at the correction.

Accessing data in a join table with the related models

Created 2 years ago by fsbHow-tos8 comments – viewed 64,865 times – ( +26 / -1 ) – version 1.1
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.

Rendering a view file in a console application

Created 2 years ago by TompiHow-tos1 comment – viewed 7,190 times – ( +3 / -2 ) – version 1.1
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.

Secure password hash storage and a Yii helper extension

Created 2 years ago by fsbTutorials5 comments – viewed 26,558 times – ( +15 ) – version 1.1
Obsolete

Using counters with ActiveRecord

Created 2 years ago by davi_alexandreTips8 comments – viewed 18,282 times – ( +14 / -1 ) – version 1.1
Let's say, for example, that you are developing a blog or some kind of CMS and you want to track the number of times each post was viewed (maybe to show a list of the most viewed ones).