Wiki

Sorted by ratingX
Displaying 291-300 of 783 result(s).

CGridView. Add custom class to table rows preserving original „odd“ and „even“

Created 3 years ago by Maug LeeHow-tos2 comments – viewed 37,543 times – ( +8 ) – version 1.1
Lets say we have such a CGridView widget showing a list of users for administrator. Users have status „active“ or „disabled“. Grid widget puts class „odd“ or „even“ to rows and we want to preserve this. So we want to add a class „disabled“ to rows with disabled users.

How to use imagine ( crop, thumb, effects for images ) on Yii2

Created 2 years ago by Anas AbuDayahTutorials1 comment – viewed 42,637 times – ( +8 ) – version 2.0
Imagine adds most common image functions and also acts as a wrapper to Imagine image manipulation library.

How to setup RBAC with a php file

Created 7 years ago by bettorHow-tos17 comments – viewed 64,159 times – ( +26 / -5 ) – version 1.1
In this cookbook I will attempt to explain how to use the lightweight version of Role-Based Access Control using a php file. This version does not use database but a php file and is controlled by CPhpAuthManager class.

Force a User to Change Their Password (ChangePasswordFilter)

Created 5 years ago by waterloomattTutorials2 comments – viewed 18,499 times – ( +16 / -2 ) – version 1.1
Sometimes you need to force a user to change their password after x number of days. This article describes how to implement this using a filter, ChangePasswordFilter.

Updating fields on a form with Ajax and Json

Created 6 years ago by Russell EnglandHow-tos4 comments – viewed 56,144 times – ( +12 / -1 ) – version 1.1
I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.

Adding a date range search for CGridView the easy way

Created 4 years ago by mikewalenTips6 comments – viewed 30,423 times – ( +12 / -1 ) – version 1.1
After a lot of research, everything I found on adding date range searching to a CGridView advanced search form seemed to involve adding two new public variables (e.g. $date_from, $date_to), 'safe' rules for the new variables, and a rather chunky if/elseif/else check in the search() method. This probably isn't a hassle for most, but because many of the tables in my database contain two or three and sometimes four date columns (e.g. date_created, date_modified, date_deleted etc.), it meant I was having to add up to eight public variables, the corresponding safe rules, and modifying the search() criteria for each date attribute. So, I set about creating a better way and I thought I'd share my work with the community.

Avoiding duplicate script download when using CActiveForm on Ajax calls

Created 5 years ago by Antonio RamirezTutorials2 comments – viewed 19,626 times – ( +12 / -1 ) – version 1.1
Sometimes the active form we wish to use to edit/add a new element on our database is too small and we believe that is much better to use an AJAX'ed dialog/slide form rather than reloading the page to just display one or two fields.

Multiple Databases and Multiple Domains

Created 6 years ago by got 2 doodleTutorials2 comments – viewed 39,743 times – ( +15 / -2 ) – version 1.1
Add these lines in /config/main.php
tags: database

Model password confirmation field.

Created 5 years ago by twisted1919How-tos10 comments – viewed 71,005 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.

Mantis Manager: An Asset Manager that minifies, combines, and publishes

Created 3 years ago by aarondfrancisTutorials1 comment – viewed 6,308 times – ( +7 )
Hello everybody.
tags: heroku, assets