Wiki

Articles in category "how-tos"X
Displaying 171-180 of 253 result(s).

Accessing data in a join table with the related models

Created 2 years ago by fsbHow-tos7 comments – viewed 59,449 times – ( +24 / -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 6,687 times – ( +3 / -1 ) – 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.

Model password confirmation field.

Created 2 years ago by twisted1919How-tos9 comments – viewed 41,475 times – ( +11 / -1 ) – version 1.1
I had some troubles with the password confirmation field for when adding updating user records, so i thought that i should share the way i got it working.

Simple authorization system

Created 2 years ago by GustavoHow-tos1 comment – viewed 21,999 times – ( +16 ) – version 1.1
How to create a simple (non-RBAC) authorization system

How to write secure Yii applications

Created 2 years ago by François GannazHow-tos19 comments – viewed 123,750 times – ( +97 ) – version 1.1
warning: While this security guide tries to be quite complete, is not exhaustive. If security matters for you, you ought to check several other references.

How to validate CSRF token with session

Created 2 years ago by yangmlsHow-tos0 comments – viewed 28,249 times – ( +19 ) – version 1.1
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

How to re enable logging during unit testing

Created 2 years ago by AsgarothHow-tos3 comments – viewed 10,094 times – ( +10 ) – version 1.1
Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

How to insert a Simple Dialog Box

Created 2 years ago by bluyellHow-tos4 comments – viewed 18,486 times – ( +5 / -2 ) – version 1.1
I build this simple PHP class (DialogBox.php at the bottom of this wiki) to help you in the dialog box usage on Yii applications. The goal is run any Yii actions into this dialog box and return the resulting value to the calling instance.

File uploads in CForm (Form builder)

Created 2 years ago by Luke JurgsHow-tos2 comments – viewed 29,805 times – ( +11 ) – version 1.1
While there is a reasonable amount of documentation regarding CForm (form builder) and file uploads seperately, there really is not any coverage of both in combination.

CPhpAuthManager - how it works, and when to use it

Created 2 years ago by dckurushinHow-tos5 comments – viewed 17,497 times – ( +1 / -4 ) – version 1.1
Before reading this article, you should first learn this How to setup RBAC with a php file