Wiki

Articles in category "tips", sorted by commentsX
Displaying 1-10 of 149 result(s).

Configuring PhpStorm IDE for Yii

Created 4 years ago by samdarkTips20 comments – viewed 91,671 times – ( +66 / -1 ) – version 1.1
In order to be able to get from render or renderPartial to the view, from widget to widget class, from relations to model classes you need to install additional plugin called YiiStorm.
tags: IDE, PhpStorm

Assigning dynamic roles to a user Using yii Rights module at the time of user creation and using some special advanced features of yii rights

Created 2 years ago by Rajith RTips20 comments – viewed 33,996 times – ( +11 / -8 ) – version 1.1
After Installing Yii Users and Rights to Newly Created Yii app we have to assign dynamic roles to a user at the time of user creation .

How to upload image(photo), and path entry in database with update functionality

Created 2 years ago by kiran sharmaTips18 comments – viewed 120,721 times – ( +37 / -3 ) – version 1.1
I saw many posts that community newbie is confuse in image/photo upload with random name. so I post this topic covering all useful things regarding to image/photo upload(not covering image attribute related functionality)

How to filter CGridView with From Date and To Date datepicker

Created 3 years ago by kiran sharmaTips16 comments – viewed 37,366 times – ( +17 / -4 ) – version 1.1
This artical is related to allow user to filter CGridView with date range using datepicker on submit button. Here I use Yii Cookie to preserve date in datepicker textbox after submitting the form.

Guidelines for good schema design

Created 3 years ago by Steve FriedlTips15 comments – viewed 66,982 times – ( +142 ) – version 1.1
Virtually all Yii applications are built on top of a database, and though Yii is very flexible in how it addresses your DB, some design choices make things more convenient than others.

CGridView: Render customized/complex datacolumns

Created 3 years ago by JobloTips13 comments – viewed 129,803 times – ( +73 ) – version 1.1
If you have to display a overview of related data in a table, you can use the CListView, create your view with table/tr/td tags and implement db-queries in the view to display detaildata of the current (master-)record.
tags: CGridView

CGridView: Update/create records in a CJuiDialog

Created 3 years ago by JobloTips12 comments – viewed 42,134 times – ( +14 ) – version 1.1
My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

Yii Security-extended guide

Created 3 years ago by bingjie2680Tips11 comments – viewed 16,730 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.

Update two models with one view

Created 3 years ago by sensorarioTips11 comments – viewed 35,185 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

Special $variables in CGridView and CListView

Created 3 years ago by Steve FriedlTips11 comments – viewed 51,520 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.