Wiki

Sorted by viewsX
Displaying 681-690 of 774 result(s).

Advanced CGridview issues - custom button using php and html

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 5,836 times – ( +1 ) – version 1.1
This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)

Useful Multilanguage extensions collection and use.

Created 2 years ago by cihappyTips2 comments – viewed 5,825 times – ( +3 ) – version 1.1
What I want to achieve:

Yii behind a reverse proxy, SSL support and correct IP logging

Created 3 years ago by mrkmgTips0 comments – viewed 5,816 times – version 1.1
If you are hosting Yii behind a reverse proxy, for example nginx, and you are having issues with your logs showing the proxies IP, or the urls being created arn't being created for SSL because your SSL certs are located on your reverse proxy instead of the Yii server, this code may be able to help you. I placed them in the very top of Yii's entry script, index.php

How to preload dropdowns in CForm

Created 3 years ago by transistorTips0 comments – viewed 5,807 times – ( +1 )
So you want to use CForm (form builder), but need to preload dropdowns in a form? It's simpler than it seems. You got your CFormModel, CForm and the actual Form, right? Let's say you have the typical State -> City dependent dropdowns, so you would want to load the from with the State and City selected.

Using Nginx and Apache2 in separate distributed servers (ie, Amazon EC2 instances)

Created 3 years ago by Luis Lobo BorobiaTips0 comments – viewed 5,766 times – ( +2 )
We are running one frontend running NGINX and several app servers running Apache2. There are several issues we have come across but right now I'll be documenting one of them. I'll be completing this article when I get more time.

Search a file size range in CGridView

Created 3 years ago by CrazyCatTips0 comments – viewed 5,745 times – ( +2 )
Working on a report system of files transfert, I had to let the users simply find files by size. I didn't want to have two fields, I prefer a simple text input, with "human syntax".

How to create a custom exception and show it friendly with CJuiDialog

Created about a year ago by Fábio SalesHow-tos0 comments – viewed 5,737 times – ( +1 ) – version 1.1
Sometimes we need to create our custom exception and show it to the end user through a friendly way . In this article, I'm showing how to do it using CJuidialog.

Named scope - Get orphan AR without losing primary key

Created 5 years ago by cmaTutorials0 comments – viewed 5,720 times – version 1.1
Sometime, in a many-to-many relation, you need to retrieve AR that aren't linked. In practice, AR with null value in the join table. So you implements a criteria like this :

How to store array/widget configuration to the database with config validation rules

Created 2 years ago by Kartik VTutorials0 comments – viewed 5,719 times – ( +39 / -4 ) – version 2.0
You may have scenarios, where you want to store a specific array configuration to the database. A classic example could be saving Yii widget configuration to the database and then retrieving it at runtime, with dynamic parameters set. This wiki discusses one of the approaches to do this. Let's consider you have something like the NavBar configuration below to store in the db:

Patching PHP code (used as a library) without changing the original code!

Created 3 years ago by le_topTips0 comments – viewed 5,710 times – ( +5 ) – version 1.1
The article Fixing extensions without modifying their code reminded me of another patching technique that I used. My conviction and a hard look on the web had led me to an article Redefine PHP class methods or class giving me a head start to do what I wanted: patching third party code without touching the original to allow easy upgrades.
tags: patch, patching