Wiki

Sorted by viewsX
Displaying 651-660 of 785 result(s).

Building a search GET request with scenarios ; calling a SearchModel from URLs...

Created about a year ago by Louis GacTips0 comments – viewed 7,759 times – ( +1 ) – version 2.0
Search Models are a very elegant and powerful way to build an Active Data Provider. If you use them a lot, you'll quickly need to use scenarios, which will lead you to a very DRY Controller code.
tags: search, get, Scenarios

Widget Personalizado

Created 4 years ago by CálcioTutorials0 comments – viewed 7,755 times – ( +6 ) – version 1.1
Here I will explain with the clear way and objective an use the widget with CDataProvider.

Email by YiiMailer, Call Outlook, IMAP

Created 2 years ago by Scott_HuangHow-tos0 comments – viewed 7,703 times – version 1.1
In Yii community we have lots of extention can send emails, such as YiiMailer and Swift and so on, or even IMAPI, thanks for team contribution. However, sometimes, in the intranet enviroment, the program cannot run successfully since SMTP /IMAP port been banded. So you need to seek other ways. The most simple way is **call outlook** as COM.

Safely checking if a model class exists (without exploding)

Created 2 years ago by BoazHow-tos0 comments – viewed 7,676 times – ( +1 ) – version 1.1
While rewriting the PcReportContent extension I'm maintaining I've bumped to a challenge. This wiki was born out of it.

How to show a Captcha in CForm?

Created 2 years ago by Rohit SutharHow-tos0 comments – viewed 7,665 times – ( +5 / -2 ) – version 1.1
In this wiki I will show how could use a Captcha in yii CForm. The easy way to show captcha image is create a form using CHtml method & CActiveForm, but CForm also should be able to show a captcha.
tags: captcha, CForm, widget

Access log output from unit tests

Created 4 years ago by MikeTips2 comments – viewed 7,659 times – ( +4 ) – version 1.1
Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.

CjuiDatepicker

Created 3 years ago by hiral darjiTips1 comment – viewed 7,651 times – ( +3 ) – version 1.1
If you have two datepicker in one form and you want that a date of from date shold be minimum date of todate then put following code in Cjuidatepicker widget options array:

Save uploaded file with any filename characters

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos3 comments – viewed 7,630 times – ( +1 ) – version 1.1
First of all this is a very common problem, for more details see this post http://www.yiiframework.com/forum/index.php/topic/52052-upload-file-with-any-charset/

Alternative wildcard characters CDbCriteria

Created 4 years ago by maigretHow-tos0 comments – viewed 7,607 times – ( +3 ) – version 1.1
In SQL, wildcard characters can be used in "LIKE" expressions; the percent sign (%) matches zero or more characters, and underscore (_) a single character. Sometimes users are not familiar with these or they are using different ones like (*) and (+) similar to regular expressions. My colleages do so and then i decided to add this feature by extending CbCriteria. Especially adding a new parameter $wildcard_chars to the method addSearchCondition to replace them if needed with standard SQL characters:

How to apply a layout to an AJAX update

Created 3 years ago by trondHow-tos1 comment – viewed 7,607 times – ( +1 ) – version 1.1
The template system in Yii is quite flexible. By default you have three layers of content:
tags: AJAX, views