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

Load the Yii-Bootstrap Extension on Specific Actions

Created 3 years ago by chuntleyHow-tos5 comments – viewed 19,717 times – ( +10 ) – version 1.1
A big problem I've hit with the Yii-Bootstrap extension is that all AJAX requests are initializing Bootstrap because of preload. This is a huge waste of resources, especially when using AJAX-based file uploaders that split the file into chunks. Large file uploads using that method could be initializing bootstrap hundreds of times.
tags: bootstrap, filter

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

Created about a year ago by hrnairHow-tos2 comments – viewed 19,717 times – ( +7 ) – 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.

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

Created 4 years ago by GiulianoHow-tos2 comments – viewed 19,462 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 19,413 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 3 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 19,400 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.

How to use Smarty renderer in Yii

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

Popup AJAX DialogBox without any extension

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

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

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 18,857 times – ( +4 / -6 ) – version 1.1
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,334 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.

How to register scripts and css

Created about a year ago by oligalmaHow-tos0 comments – viewed 18,311 times – version 1.1
First of all, we need to download the jQuery library and store it in the js folder. In this example we are using the version 2.1.3.