Wiki

Articles in category "tips"X
Displaying 61-70 of 135 result(s).

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,236 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

Custom Archive in Blog system

Created 2 years ago by nirmalrokaTips0 comments – viewed 4,036 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.

Customize CGridView columns directly in your view

Created 2 years ago by clapasTips4 comments – viewed 21,103 times – ( +3 / -2 ) – version 1.1
You usually take a model instance passed into your view to provide data to a CGridView in this way:

Using sub query for doubletts

Created 2 years ago by mbTips3 comments – viewed 7,418 times – ( +1 ) – version 1.1
find doubletts by db fields. in this example i will check doublets for 3 tabelfields (col1,col2,col3). so i will get a subquery with the condition, select and grouping of the tablefields. the having with COUNT() > 1 means: find all records more then one result.

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

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

How to upload image(photo), and path entry in database with update functionality

Created 2 years ago by kiran sharmaTips16 comments – viewed 97,398 times – ( +35 / -3 ) – version 1.1
I saw many posts that community newbie is confuse in image/photo upload with random name. so I post this topic covering all useful things regarding to image/photo upload(not covering image attribute related functionality)

BootProgressColumn - Progress Bar Inside GridView Column compatible with 'bootstrap' extension

Created 2 years ago by LuizTips1 comment – viewed 12,316 times – ( +7 ) – version 1.1
A little hint of how to create a progress bar inside the column of the grid, using the 'bootstrap' extension.

How to filter CGridView with From Date and To Date datepicker

Created 2 years ago by kiran sharmaTips12 comments – viewed 30,783 times – ( +17 / -3 ) – version 1.1
This artical is related to allow user to filter CGridView with date range using datepicker on submit button. Here I use Yii Cookie to preserve date in datepicker textbox after submitting the form.

Access log output from unit tests

Created 2 years ago by MikeTips2 comments – viewed 5,247 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.

Importing CSV file to mysql table using "LOAD DATA" command.

Created 2 years ago by sirin kTips12 comments – viewed 30,647 times – ( +7 ) – version 1.1
hi, Here i am giving you some simple step to import huge data from a csv file to your mysql table.this is useful when you have a very huge data to import from csv format.
tags: csv, mysql, import