Wiki

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

How to use Smarty renderer in Yii

Created 5 years ago by dongbetaHow-tos2 comments – viewed 19,026 times – ( +4 ) – version 1.1
At first, create a class named SmartyRenderer under application/components or any directory you want.
tags: smarty, renderer

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

Created 3 years ago by GiulianoHow-tos2 comments – viewed 18,968 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.

Escape from Default's Yii2 Delete Confirm Box

Created 2 years ago by Antonio RamirezHow-tos8 comments – viewed 18,884 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.

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,859 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.

Simple example for language translation

Created 2 years ago by RKAHow-tos2 comments – viewed 18,836 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

Popup AJAX DialogBox without any extension

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 18,597 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.

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

Created about a year ago by hrnairHow-tos2 comments – viewed 18,508 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.

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

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

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

Created 3 years ago by skwordenHow-tos4 comments – viewed 18,059 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.

Twitter Bootstrap style Breadcrumbs

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