Wiki

Sorted by ratingX
Displaying 171-180 of 726 result(s).

Limit a CGridView field to some preset length.

Created about a year ago by le_topHow-tos1 comment – viewed 8,983 times – ( +13 ) – version 1.1
Sometimes text inside a gridview column is just too long. That's why I figured out a way to make the column smaller while still providing the information.

YiiBooster: How to implement files and images upload on TbRedactor Widget

Created about a year ago by Antonio RamirezHow-tos3 comments – viewed 19,881 times – ( +13 ) – version 1.1
I have been requested to provide a tutorial on how to use the file upload feature of the TbRedactor widget, and even though I am no longer supporting the library due that the work belongs to Clevertech, I feel that I owe that to the Yii developers. So, here is the  tutorial.

Display a nice exception message on ajax requests

Created 3 years ago by Maurizio Domba CerinTips3 comments – viewed 28,237 times – ( +13 ) – version 1.1
When an exception is thrown in our code like
tags: error, exception

How to avoid multiple Ajax Request

Created 3 years ago by nickcvHow-tos24 comments – viewed 41,524 times – ( +25 / -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.

File uploads in CForm (Form builder)

Created 3 years ago by Luke JurgsHow-tos2 comments – viewed 35,200 times – ( +12 ) – version 1.1
While there is a reasonable amount of documentation regarding CForm (form builder) and file uploads seperately, there really is not any coverage of both in combination.

How to create a breadcrumb widget

Created 5 years ago by knutTutorials4 comments – viewed 59,593 times – ( +12 ) – version 1.1
Here's a simple way to create a breadcrumb widget to be used in your templates. The idea is just to isolate how the breadcrumb is generated based on an array of crumbs.

How to create/save more Model inputs and make them repeatable with jQuery

Created 5 years ago by qiangTutorials3 comments – viewed 34,835 times – ( +12 ) – version 1.1
This is the first real problem that I encountered using Yii, trying to make a Model input repeatable in the form, validate and save them.

Using loginRequiredAjaxResponse to solve ajax session timeout

Created 2 years ago by RutgerHow-tos3 comments – viewed 19,810 times – ( +12 ) – version 1.1
This solution requires Yii 1.1.9 or above

i18n for your model in just 1 line

Created 4 years ago by mintaoTutorials0 comments – viewed 11,720 times – ( +12 ) – version 1.1
A simple trick to get the localized version of a model field is to add this little method to your models.
tags: i18n

Real-time display of server push data using Server-Sent Events (SSE)

Created 2 years ago by bennounaHow-tos16 comments – viewed 34,051 times – ( +12 ) – version 1.1
There are several methods and techniques that come handy in the case you need to call an external resource periodically or if you are waiting for a server push, but I present here an easy and straightforward one using HTML5's Server-Sent Events (SSE).