Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 141-150 of 354 result(s).

Use kartik Growl with Yii2 flash messages

Created 2 years ago by skwordenHow-tos3 comments – viewed 25,668 times – ( +8 / -1 ) – version 2.0
This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).

Multiple CGridView virtual attributes, retrieved from a single model function. Also communication between CGridView columns and rows; and between CGridView and its own parent view.

Created 2 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 6,976 times – ( +1 / -1 ) – version 1.1
We probably have all used a virtual attribute (model function) to retrieve complex or related data for a CGridView column:

Secure password hashing with bCrypt

Created 5 years ago by waitforitHow-tos3 comments – viewed 23,931 times – ( +9 / -1 ) – version 1.1
In this article I will show you how to implement a secure password hashing mechanism in your Yii projects using a bCrypt class.

How to extend CFormatter, add i18n support to booleanFormat and use it in CDetailView

Created 5 years ago by c@cbaHow-tos3 comments – viewed 12,710 times – ( +9 / -1 ) – version 1.1
As you know, the CDetailView widget displays details of a single model. If no formatting is specified, boolean values that are stored in the database as 0 and 1, are represented in the detail view as 0 and 1. If formatted as boolean, they are represented as 'No' and 'Yes'. We want to add i18n support, so that Yes and No appear in the current language.

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

Created 3 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 21,016 times – ( +8 / -2 ) – version 1.1
Countries sometimes change their laws pertaining to time zones and daylight saving times. This means that GMT+2 can be a different local time this August compared to last August! It could even be a different date!

Remove Byte Order Mark (BOM) from files recursively

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos3 comments – viewed 17,358 times – ( +5 / -2 ) – version all
Ok, this wiki is not only for yii projects.

Using loginRequiredAjaxResponse to solve ajax session timeout

Created 5 years ago by RutgerHow-tos3 comments – viewed 26,805 times – ( +13 / -1 ) – version 1.1
This solution requires Yii 1.1.9 or above

Use phing to make Yii application "installable"

Created 5 years ago by sensorarioHow-tos3 comments – viewed 9,410 times – ( +7 / -1 ) – version 1.1
To use this "how-to", you need to install phing in your machine.
tags: phing

Upload files in Yii2 with MongoDb and GridFs

Created 3 years ago by edoardo849How-tos3 comments – viewed 18,400 times – ( +8 / -1 ) – version 2.0
Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

Setting and getting systemwide static parameters

Created 6 years ago by Steve FriedlHow-tos3 comments – viewed 102,199 times – ( +12 / -1 ) – version 1.1
Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.
tags: config