Wiki

Sorted by commentsX
Displaying 121-130 of 727 result(s).

Custom Number Formatting or Decimal Separators and i18n

Created 2 years ago by c@cbaTutorials8 comments – viewed 35,418 times – ( +7 ) – version 1.1
By default, the decimal separator in php (also in mysql) is a dot (.). So when we work with floats in Yii (in calculations, validation, sql statements etc.), the decimal separator has to be a dot. If we want to use for example a comma (,) as the decimal separator, that is if we want to display numbers and enable users to enter numbers with a comma before the decimals, we have to...

How to log and debug variables using CWebLogRoute

Created 4 years ago by Antonio RamirezHow-tos8 comments – viewed 51,001 times – ( +18 ) – version 1.1
I have seen a couple of articles about how to integrate external libraries to debug our PHP code (i.e. firePHP) but after you read this article you will realize that there is no need for such libraries when using Yii.
tags: Logging

Moving project code outside of webroot (plus multiple project support)

Created 4 years ago by Steve FriedlHow-tos8 comments – viewed 41,084 times – ( +22 / -1 ) – version 1.1
Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).
tags: config, security

CSqlDataProvider in CGridView

Created 10 months ago by Kostas Apazidis (KonApaz)Tutorials8 comments – viewed 10,099 times – ( +7 ) – version 1.1
In this wiki I will show how could use a CSqlDataProvider in CGridView with specific features

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created 2 years ago by yJeroenTutorials8 comments – viewed 45,316 times – ( +19 ) – version 1.1
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

How to implement cron in Yii 2

Created 9 months ago by hemcHow-tos8 comments – viewed 8,227 times – ( +9 ) – version 2.0
In advance template there is already a file yii. And there is no need to run it as php, it is Linux script.
tags: cron, yii2, console

Using phpseclib with Yii

Created 2 years ago by nkdHow-tos8 comments – viewed 6,809 times – ( +2 ) – version 1.1
I installed phpseclib because I needed to do some AES encryption in my project. After all the hassle of installing php lib, I found out that Yii already has a security module (securityManager). I finally decided to keep using phpseclib because it has one big advantage over Yii securityManager module, it does not requite mcrypt to be installed in the phpserver!
tags: security

An easy way to use escopes and CActiveDataProvider

Created 3 years ago by Rafael GarciaTips8 comments – viewed 22,654 times – ( +1 / -1 ) – version 1.1
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.

Using CJuiDialog to edit rows in a CGridView

Created 3 years ago by Russell EnglandTips8 comments – viewed 28,227 times – ( +4 / -1 ) – version 1.1
I have a CGridView with a list of clients/events. For each row (EventClient) I wanted a quick edit dialog.

Using Grunt for deploying client scripts

Created about a year ago by Chris83How-tos8 comments – viewed 12,162 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.