Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 151-160 of 183 result(s).

How to validate CSRF token with session

Created about a year ago by yangmlsHow-tos0 comments – viewed 17,734 times – ( +17 )
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

How to obtain a grammatically correct translation of the model name in giix-generated view files

Created about a year ago by c@cbaHow-tos0 comments – viewed 4,989 times – ( +4 )
The giix code generator has out of the box i18n support for model names and attribute labels (besides other cool features > check it out!) . But I want to factor in not only the plural form, but also the grammatical cases (especially the accusative) while translating 'Manage Objects', 'Create Object', 'Edit Object' etc.

CGridView keep focus on the control after filtering

Created about a year ago by jayalaHow-tos0 comments – viewed 5,130 times – ( +4 )
You can find the reason why I wrote this article here.
tags: CGridView, filter

Simple Share Widget for Facebook, twitter and google+

Created about a year ago by softarkHow-tos0 comments – viewed 9,679 times – ( +9 )
This widget will show a Facebook "like" button and "comments" box together with "tweet" button and "google plusone" button on your page.

Adding Bash Command Completion for Yii Commands

Created 11 months ago by Dustin OpreaHow-tos0 comments – viewed 4,002 times – ( +1 )
This article discusses the installation/configuration of the YiiBash project (https://github.com/dsoprea/YiiBash).

Using the jamselect widget with min and max values

Created 2 years ago by got 2 doodleHow-tos0 comments – viewed 6,279 times – ( +2 )
I needed to have users select from a list of keywords, in this example they must select at least two keywords but they cannot select more than six.

ACL and RBAC

Created 10 months ago by zeroByteHow-tos0 comments – viewed 6,899 times
This HowTo assumes that you have a smattering of ACL in general and of how the acl-extension works basically. It will introduce you into the abstract and give you a hint on how to use Business-Rules. If you have in-depth questions, please refer to the extension documentation. Using ACL in an RBAC-manner cannot and should never obscure the fact that the underlying system is still ACL-based. In fact, the Business-Rules are just another layer in the permission-check plan.

Using the jqueryslidemenu plugin with CMenu

Created 2 years ago by Antonio RamirezHow-tos0 comments – viewed 20,724 times – ( +18 / -1 )
Yii makes it really easy for all to use their already made objects that automate everything we do. It provides also great power of flexibility and styling but hey, we programmers tend to complicate our lives and push a little more the power of our tools.

Alternative wildcard characters CDbCriteria

Created 10 months ago by maigretHow-tos0 comments – viewed 2,952 times – ( +1 )
In SQL, wildcard characters can be used in "LIKE" expressions; the percent sign (%) matches zero or more characters, and underscore (_) a single character. Sometimes users are not familiar with these or they are using different ones like (*) and (+) similar to regular expressions. My colleages do so and then i decided to add this feature by extending CbCriteria. Especially adding a new parameter $wildcard_chars to the method addSearchCondition to replace them if needed with standard SQL characters:

Extending CJuiDialog

Created 10 months ago by dstudioHow-tos0 comments – viewed 5,210 times – ( +2 / -2 )
Sometimes you have CJuiDialog with different content but same buttons (or width, height). If you don't want to repeat yourself this is a great solution: