Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 31-40 of 321 result(s).

Displaying image in a CGridView column.

Created 2 years ago by sirin kHow-tos5 comments – viewed 46,803 times – ( +13 / -1 ) – version 1.1
This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.
tags: CGridView, image

Updating fields on a form with Ajax and Json

Created 3 years ago by Russell EnglandHow-tos4 comments – viewed 46,494 times – ( +12 / -1 ) – version 1.1
I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.

Using setFlash for displaying various kind of messages

Created 3 years ago by TrejderHow-tos6 comments – viewed 44,234 times – ( +4 / -5 ) – version 1.1
In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.
tags: flash, error, message

AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

Created about a year ago by drumaddictHow-tos15 comments – viewed 44,173 times – ( +20 ) – version 1.1
AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

Using Yii with Nginx and PHP-FPM

Created 3 years ago by LericHow-tos10 comments – viewed 42,919 times – ( +18 ) – version 1.1
This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.

X-Sendfile - serve large static files efficiently from web applications

Created 3 years ago by Maurizio Domba CerinHow-tos5 comments – viewed 41,887 times – ( +26 ) – version 1.1
Normally when we want users to download a file, that file is put in a folder under the web application root and the web server does the rest.

How to use single form to collect data for two or more models (CActiveForm and Ajax Validation edition)

Created 3 years ago by RusAlexHow-tos9 comments – viewed 40,791 times – ( +22 ) – version 1.1
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

How to write a simple application component

Created 3 years ago by zaccariaHow-tos5 comments – viewed 40,457 times – ( +19 / -7 ) – version 1.1
An application component is a confortable way for share information among all component of the application

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

Created 3 years ago by Steve FriedlHow-tos8 comments – viewed 40,056 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

How to avoid multiple Ajax Request

Created 3 years ago by nickcvHow-tos24 comments – viewed 39,750 times – ( +24 / -2 ) – version 1.1
CHtml::ajaxLink(), CHtml::ajaxSubmitButton() and similar methods are great, but if they are located inside a portion of the page that is already loaded via ajax something bad will happen, something you may even not notice if you are not using tools like firebugs: the sent ajax requests will multiply themselves.