Tuesday, February 24, 2015

mouseover popup box YII griview

Standard
YII Drid cell with a javascript/css content box that pops up upon mouseover.





<! --- Style ------- >


<! ---- Java script ----->



add this on YII drid view

array( 'header'=>' User', 'value' => ' " ".CHtml::link($data->user->username,array("user/admin/view/id/".$data->UserId))."
Email : ".$data->user->email."
Telephone : ".$data->user->Telephone."
" ', 'name'=>'UserId', 'filter'=>FALSE, 'type'=>'raw', ),


 

Wednesday, February 18, 2015

add custom ajax YII

Standard
This article will help you to understand the power of jQuery (library of JavaScript functions) with simple this on view page
     
Click me
Change me
on controller
public function actionajax()
	{
       echo'hello is me !';
	}

Tuesday, February 10, 2015

Get a Facebook API Access Token That Never Expires

Standard
I’ve been working on a few scripts that performed some minor data collection using the Facebook Graph API as a data source. Ideally, I wanted this script to be able to run several times a day automatically, however Facebook grants access tokens that expire after 1-2 hours. Since I’m the only one that is going to run this script, I only needed access to my Facebook data and I didn’t want to have to re-authenticate every few hours. Luckily, Facebook provides a permission parameter to get a “long-lived” access token from Oauth called offline_access!

https://graph.facebook.com/oauth/access_token?
client_id=_APP_ID_&
client_secret=_APP_SECRET_&
grant_type=fb_exchange_token
&fb_exchange_token=_ACCESS_TOKEN_ON_STEP_4_


Thursday, February 5, 2015