Wiki

Sorted by commentsX
Displaying 411-420 of 470 result(s).

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

Created 9 months ago by mrkmgTips0 comments – viewed 2,636 times
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

Changing Controllers Name

Created 2 years ago by TrejderHow-tos0 comments – viewed 8,055 times – ( +4 )
This very short how-to presents steps required to change controller name. It is oriented for less experienced users, which are starting their journey with Yii, to avoid common newbie pitfalls.

The MrFisk IRC Bot

Created 9 months ago by rAWTAZOthers0 comments – viewed 5,265 times – ( +5 )
MrFisk is a sleek little bot hanging out in the official #yii IRC channel on freenode, meant to serve Yii users with documentation lookups and other things. This document intends to provide a summary of what MrFisk can do for you and how to use his fin^H^Heatures.
tags: MrFisk, YiiBot, IRC, bot

Custom Archive in Blog system

Created 9 months ago by nirmalrokaTips0 comments – viewed 2,260 times – ( +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.

Entire Messages into javascript object

Created 9 months ago by markuxHow-tos0 comments – viewed 2,539 times – ( +1 )
I needed all messages with their translation into javascript. This is my solution:

ChromePHP for Yii

Created 2 years ago by imeheszTips0 comments – viewed 7,255 times – ( +2 / -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 8 months ago by sirin kTips0 comments – viewed 2,748 times – ( +4 )
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 2 years ago by Steve FriedlTips0 comments – viewed 14,047 times – ( +38 )
The two most commonly-used base classes in most Yii applications are CController and CActiveRecord, each extended to your own particular models and controllers.

Solution for session lose of Facebook iframe application in Internet Explorer .

Created 8 months ago by sirin kTips0 comments – viewed 2,870 times – ( +2 )
Facebook iframe app’s session is losing in Internet Explorer when doing a second redirection inside the facebook iframe app.The main reason is ,by default IE wont allow cookies in its priavacy settings If cookies not available means session is also not available for our Facebook iframe app in IE.

An important tip when you are using CArrayDataProvider.

Created 8 months ago by sirin kTips0 comments – viewed 3,700 times – ( +5 / -1 )
Yii ‘s CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an error like “yourmodel.id is not defined”.