Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 161-170 of 325 result(s).

Popup AJAX DialogBox without any extension

Created about a year ago by Kostas Apazidis (KonApaz)How-tos6 comments – viewed 13,854 times – ( +7 / -1 )
In this wiki I explain how to show a default popup dialogbox (like Gii does) using an existing module.

How to use Expression in default AccessControl to allow only the owner to do some action

Created about a year ago by whatifHow-tos1 comment – viewed 19,515 times – ( +7 / -1 ) – version 1.1
Hi Everyone

get summary of related model via STAT relation

Created about a year ago by rootbearHow-tos2 comments – viewed 9,449 times – ( +7 / -1 ) – version 1.1
typical scenario: invoice, invoice items.

i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Created about a year ago by Gerhard LiebenbergHow-tos3 comments – viewed 12,987 times – ( +7 / -1 ) – version 1.1
Countries sometimes change their laws pertaining to timezones and daylight saving times. This means that GMT+2 can be a different time this August compared to last August! However, by using php's DateTime class (instead of timestamps), we can do both "format" and "timezone" conversions on a single DateTime object (only 2 lines of code) for date, time, timestamp and datetime types - while php takes care of nightmares such as current and historical timezones and daylight saving times.

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 2 years ago by BoazHow-tos2 comments – viewed 9,315 times – ( +7 / -1 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

Yii registry, how to use it, does it exist at all?

Created 3 years ago by dckurushinHow-tos2 comments – viewed 18,956 times – ( +7 / -1 ) – version 1.1
From time to time people ask about registry...

How to include Javascript, CSS

Created about a year ago by InterboyHow-tos3 comments – viewed 309,999 times – ( +9 / -2 ) – version 1.1
There are many methods that we can include javascript, css into your Yii App. Today I will demonstrate three simple and helpul methods.

Date Picker by examples

Created about a year ago by InterboyHow-tos6 comments – viewed 51,467 times – ( +9 / -2 )
CJuiDatePicker displays a datepicker. CJuiDatePicker encapsulates the JUI datepicker plugin.

Moving the vendor directory for multiple projects

Created 2 months ago by mariosimaremareHow-tos2 comments – viewed 2,510 times – ( +4 ) – version 2.0
This How-To is useful if you are planning to move the Yii vendor directory outside the default location.

Use minified version of JqueryAsset, BootstrapAsset (and all default assets)

Created 4 days ago by robregonmHow-tos1 comment – viewed 764 times – ( +4 ) – version 2.0
By default, Yii 2.0 chooses to use the non-minified version of Jquery and Bootstrap files (CSS and JS). However, there's a simple way to indicate Yii to use the minified version.