Wiki

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

Simple example for language translation

Created 2 years ago by RKAHow-tos2 comments – viewed 18,309 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,306 times – ( +8 / -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 hide index.php on Microsoft Windows Server with IIS7

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

Popup AJAX DialogBox without any extension

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

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

Created 3 years ago by skwordenHow-tos4 comments – viewed 17,765 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 2 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 17,490 times – ( +4 / -6 )
Ok, it is a little bit difficult to full understanding the unsafe validator.

Escape from Default's Yii2 Delete Confirm Box

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

Twitter Bootstrap style Breadcrumbs

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

ACL and RBAC

Created 3 years ago by zeroByteHow-tos0 comments – viewed 17,198 times – version 1.1
This HowTo assumes that you have a smattering of ACL in general and of how the acl-extension works basically. It will introduce you into the abstract and give you a hint on how to use Business-Rules. If you have in-depth questions, please refer to the extension documentation. Using ACL in an RBAC-manner cannot and should never obscure the fact that the underlying system is still ACL-based. In fact, the Business-Rules are just another layer in the permission-check plan.

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

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