Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 151-160 of 322 result(s).

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

Created about a year ago by Gerhard LiebenbergHow-tos3 comments – viewed 12,592 times – ( +7 / -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.

Update a part of content using AJAX when select a GridView row

Created about a year ago by KonApazHow-tos2 comments – viewed 12,399 times – ( +4 ) – version 1.1
Suppose you want to refresh a form or any content when a single row of CGridView is selected

How to handle decimal separators (e.g comma instead of dot) for l18n

Created 2 years ago by jpabloHow-tos2 comments – viewed 12,228 times – ( +2 ) – version 1.1
Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.

CSV Export

Created 2 years ago by JohnPollardHow-tos5 comments – viewed 12,104 times – ( +4 ) – version 1.1
I needed a csv export function for my cgridview and I wanted to export the entire result set of the sorted and filtered cgridview the user was viewing via ajax.
tags: csv, export

Open Dialog from ajax content

Created about a year ago by TouzasHow-tos1 comment – viewed 12,049 times – ( +4 / -1 ) – version 1.1
This tutorial will show you how to create Ajax dialog. It's very simple code.

Using Grunt for deploying client scripts

Created about a year ago by Chris83How-tos8 comments – viewed 11,842 times – ( +11 ) – version 1.1
For a long time I have struggled to find a suitable tool for doing server tasks such as compiling LESS files, concatenating and minifying of JavaScript files and copying the minified JavaScript files. While most of these tasks can be done with Yii extensions I would still not recommend using them because it requires you to include these extensions in your project, and therefore also deploying them in your production environment.

How to re enable logging during unit testing

Created 3 years ago by AsgarothHow-tos3 comments – viewed 11,839 times – ( +11 ) – version 1.1
Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

More security in your applications with Yii and PHPIDS

Created 3 years ago by Rafael GarciaHow-tos1 comment – viewed 11,831 times – ( +8 ) – version 1.1
PHPIDS is a well known project that can be found in php-ids.org.
tags: phpids, security

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

Created 2 years ago by GiulianoHow-tos2 comments – viewed 11,822 times – ( +9 ) – 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.