Wiki

Articles in category "tips", sorted by commentsX
Displaying 111-120 of 146 result(s).

Multi Data Provider

Created about a year ago by Sharon LavieTips0 comments – viewed 6,192 times – ( +1 )
Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).

Set a menu - reusable code

Created about a year ago by Kostas Apazidis (KonApaz)Tips0 comments – viewed 4,346 times – ( +1 )
As we know Using crud generator creates menu items in view files (for each view file have a varius menu items)

Yiistrap TbHtml::navbarSearchForm

Created about a year ago by PatriceTips0 comments – viewed 5,919 times – version 1.1
Hi all,

Reading the doc

Created 4 years ago by zaccariaTips0 comments – viewed 6,848 times – ( +21 ) – version 1.1
Almost all the information you need whilst working with yii is written in the Class Reference.
tags: doc

Extending CActiveForm for some form display fixes and language tweaks

Created 4 years ago by TrejderTips0 comments – viewed 14,007 times – ( +5 ) – version 1.1
In this simple example I'll demonstrate how to extend CActiveForm class to overload some drawing functions to achieve some commonly used fixes in forms.

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

Created 2 years ago by mrkmgTips0 comments – viewed 4,596 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

Custom Archive in Blog system

Created 2 years ago by nirmalrokaTips0 comments – viewed 4,410 times – ( +2 ) – version 1.1
Hi I had made simple archive system for blog system that can handle tbl_post. I had used simple CDbCriteria not more than that. I know there is more and many better way to this but I think this will give some idea to users to generate new idea or customized or modified this version of code.

ChromePHP for Yii

Created 4 years ago by imeheszTips0 comments – viewed 10,263 times – ( +3 / -2 ) – version 1.1
ChromePHP is a console logging extension for Google Chrome.

Get notified about the status of a Facebook user in your web app using periodic Ajax calls.

Created 2 years ago by sirin kTips0 comments – viewed 5,640 times – ( +4 ) – version 1.1
hello, This article is helpful only if you have the following situation: A web app which uses facebook login to login its users and if a user is logged out from his/her facebook account through another browser tab, then your app dont know that he is logged out out or not from his facebook account and he/she will remain as logged in your web application.Its ok if you have no problem with this situation.But if you want to forcefully logout the user from your application if he is logged out from his facebook account means you can try this example.This example uses periodic ajax calls to facebook's graph api to check whether the user is logged in or not.
tags: facebook, user

Extending common classes to allow better customization

Created 4 years ago by Steve FriedlTips0 comments – viewed 23,720 times – ( +43 ) – version 1.1
The two most commonly-used base classes in most Yii applications are CController and CActiveRecord, each extended to your own particular models and controllers.