Wiki

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

How to hide index.php on Microsoft Windows Server with IIS7

Created 3 years ago by GiulianoHow-tos2 comments – viewed 18,669 times – ( +10 ) – version 1.1
I've seen lot of people struggling in finding a way to hide the script name when installing their Yii Application. In an Apache environment everything is well documented in this wiki article, but for those who are running their app on a Windows Server machine there are no hints.

Simple example for language translation

Created 2 years ago by RKAHow-tos2 comments – viewed 18,590 times – ( +1 ) – version 1.1
Language translation is a common requirement in multi lingual sites. In Yii, we can translate using message and view translation.
tags: yii, i18n

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

Created 2 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 18,552 times – ( +8 / -1 ) – 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 time this August compared to last August! However, by using php's DateTime class (instead of timestamps), we can do both "format" and "time zone" 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 time zones and daylight saving times.

Popup AJAX DialogBox without any extension

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 18,368 times – ( +8 / -1 ) – version 1.1
In this wiki I explain how to show a default popup dialogbox (like Gii does) using an existing module.

Escape from Default's Yii2 Delete Confirm Box

Created 2 years ago by Antonio RamirezHow-tos8 comments – viewed 18,192 times – ( +9 / -1 ) – version 2.0
If you started playing with Yii2's new GridView, you will soon realize that some things have improved quite a lot, but I am sure its going to be a bit confusing at first glance when you try to modify certain javascript behaviors like for example, its delete confirmation dialog box.

Use kartik Growl with Yii2 flash messages

Created about a year ago by skwordenHow-tos1 comment – viewed 17,905 times – ( +8 ) – version 2.0
This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).

Cheat Sheet: Displaying Name instead of Numbers and Displaying Alphanumeric instead of numeric values

Created 3 years ago by skwordenHow-tos4 comments – viewed 17,903 times – ( +4 / -1 ) – version 1.1
I keep a reference to some simple but painful task if you forget a common or something. I am new to Yii and this took awhile for me to figure out. Everything I read said do this or do that and not a single one worked for me. However, the following did.

"safe" and "unsafe" Model validators (massive assignments)

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 17,793 times – ( +4 / -6 )
Ok, it is a little bit difficult to full understanding the unsafe validator.

Yii2: Configuring different sessions for backend and frontend in Yii Advanced Application Template

Created about a year ago by hrnairHow-tos2 comments – viewed 17,759 times – ( +6 ) – version 2.0
This is as an extension of this wiki by Kartik V which shows to make different enableAutoLogin cookies for frontend and backend.

Twitter Bootstrap style Breadcrumbs

Created 3 years ago by junaidatariHow-tos0 comments – viewed 17,452 times – ( +5 / -1 ) – version 1.1
1: Create breadcrumb in your view file.