Wiki

Sorted by date (updated)X
Displaying 351-360 of 783 result(s).

Add information to Yii::app()->user by extending CWebUser (better version)

Updated 3 years ago by Anas AbuDayahTutorials5 comments – viewed 36,343 times – ( +5 / -1 ) – version 1.1
I found a better solution.
tags: Yii, user, rbac

Create thermometer using rgraph

Updated 3 years ago by Ankit ModiTips2 comments – viewed 7,299 times – ( +4 )
Hi friends,

Implementing a User Level Access System

Updated 3 years ago by Phil LoaizaTutorials12 comments – viewed 52,486 times – ( +28 / -1 ) – version 1.1
I would like to provide you a quick tip on how to implement user level access to your Yii applications.

Configuring controller access rules to default-deny

Updated 3 years ago by nsandenHow-tos3 comments – viewed 81,973 times – ( +12 ) – version 1.1
Starting with the blog tutorial, Yii developers are familiar with the notion of access rules defined in the controller, where the actions are allowed or denied depending on the user's name or role.

1:n relations sometimes require CDbCriteria.together

Updated 3 years ago by fsbTips5 comments – viewed 37,864 times – ( +16 ) – version 1.1
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

Getting the Most out of APC for Yii

Updated 3 years ago by Da:SourcererHow-tos10 comments – viewed 37,594 times – ( +17 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

Dynamic Sidebar using CClipWidget

Updated 3 years ago by CozumelHow-tos5 comments – viewed 27,405 times – ( +21 ) – version 1.1
Most applications will have one or two sidebars and often you want to control the content that should appear in the sidebar based on the action. For example you will want to show something different on the homepage as opposed to some view page. While achieving this you generally also want to avoid putting the layout into each view, as that would mean if you wanted to change the layout (e.g. put the sidebar on the left instead of the right or do some funky layout which requires an additional div tag to be added) you'd have to go through every view, which does not achieve good code re-use. It is also bad practice to have lots of if statements in column2 layout just so that you can generate the sidebar correctly.

How to use ldap in UserIdentity for authentication

Updated 3 years ago by NavarrTutorials15 comments – viewed 50,510 times – ( +14 ) – version 1.1
Yii does not have an LDAP class itself, but its very easy to implement LDAP in the stock UserIdentity class.

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Updated 3 years ago by nsandenHow-tos4 comments – viewed 35,456 times – ( +14 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options. The main code was contributed by zaccaria in the forum (see this post).

jQuery UI Datepicker

Updated 3 years ago by ShahcheragheanHow-tos11 comments – viewed 75,537 times – ( +13 ) – version 1.1
We all love the convenient gadget, namely jQuery UI Datepicker as an input element for date. Yii supports it as CJuiDatePicker. Let's see how to use it.