Showing 1-20 of 120 items.

Extending CActiveForm for some form display fixes and language tweaks

Created 15 years ago by Trejder Trejder, updated 15 years ago by Trejder Trejder. 0 comments

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.

The colon

Here is overloaded version of CActiveForm.labelEx that adds colon (:) at the end of text of label with respecting CHtml::$afterRequiredLabel and CHtml::$beforeRequiredLabel

5 0
6
Viewed: 29 612 times
Version: 1.1
Category: Tips

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

Created 14 years ago by mrkmg mrkmg, updated 14 years ago by mrkmg mrkmg. 0 comments

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

0 0
2
Viewed: 21 505 times
Version: 1.1
Category: Tips

Custom Archive in Blog system

Created 14 years ago by nirmalroka nirmalroka, updated 14 years ago by nirmalroka nirmalroka. 0 comments

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.

1 0
2
Viewed: 13 379 times
Version: 1.1
Category: Tips

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

Created 14 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin Maurizio Domba Cerin. 0 comments

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 wi...
4 0
6
Viewed: 19 986 times
Version: 1.1
Category: Tips

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

Created 14 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin Maurizio Domba Cerin. 0 comments

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.

2 0
4
Viewed: 18 084 times
Version: 1.1
Category: Tips

An important tip when you are using CArrayDataProvider.

Created 14 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin Maurizio Domba Cerin. 0 comments

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...

5 1
5
Viewed: 23 333 times
Version: 1.1
Category: Tips