Wiki

Sorted by commentsX
Displaying 41-50 of 468 result(s).

How to avoid multiple Ajax Request

Created 2 years ago by nickcvHow-tos11 comments – viewed 19,282 times – ( +13 )
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.

Shrink Yii, help your IDE and speed up copying

Created about a year ago by dckurushinTips11 comments – viewed 6,188 times – ( +9 / -8 )
In this little tip, I will help you to cut Yii size for about half

Yii for beginners

Created about a year ago by rackyczTutorials11 comments – viewed 106,214 times – ( +74 )
Hi. This is first article with my Yii tutorial. I had to split it into more articles as there's limited length of texts on Wiki. So once you understand basics, you can read next article here: Yii for beginners 2.

CGridView: Update/create records in a CJuiDialog

Created about a year ago by JobloTips10 comments – viewed 21,078 times – ( +11 )
My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

How to use a single form to collect data for two or more models?

Created 4 years ago by qiangTutorials10 comments – viewed 77,944 times – ( +87 )
Assume we want to use a single HTML form to collect input for both model A and model B, and we want to display input errors (if any) in the same error summary box. We can define the following action code:

Organize directories for applications with front-end and back-end

Created 4 years ago by qiangTutorials10 comments – viewed 40,426 times – ( +25 )
Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing directories of the code for both ends.

Update two models with one view

Created about a year ago by sensorarioTips10 comments – viewed 18,579 times – ( +10 / -2 )
Suppose to have two models: Users and Emails. You do not want to store email in a Users model. And User can have 0 or many emails. This is the form generated to create a new user (just username).
tags: database, model, view, form

How to use ldap in UserIdentity for authentication

Created 3 years ago by BeerSercTutorials10 comments – viewed 20,152 times – ( +11 )
Yii does not have an LDAP class itself, but its very easy to implement LDAP in the stock UserIdentity class.

Searching and Sorting by Count of Related Items in CGridView

Created about a year ago by softarkHow-tos10 comments – viewed 16,121 times – ( +21 )
Let's say we have two models and relation between them:

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

Created about a year ago by bennounaHow-tos10 comments – viewed 14,151 times – ( +11 )
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).