1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00
This commit is contained in:
CaMer0n
2009-11-10 06:29:37 +00:00
parent 22c86d4319
commit 523aa60153
2 changed files with 68 additions and 78 deletions

View File

@@ -1,18 +1,18 @@
<?php <?php
//error_reporting(E_ALL); //error_reporting(E_ALL);
if (!defined('e107_INIT'))
require_once (e_BASE.'class2.php'); {
exit;
}
include_once (e_PLUGIN.'facebook/facebook_function.php'); include_once (e_PLUGIN.'facebook/facebook_function.php');
if (isset($_POST['fb_sig_in_canvas']))
if ( isset ($_POST['fb_sig_in_canvas']))
{ {
return; return;
} }
/** /**
* start the logic... * start the logic...
* *
@@ -22,42 +22,40 @@ global $pref;
$html = ''; $html = '';
if ( ( $pref[ 'Facebook_Api-Key' ] != '' ) && ( $pref[ 'Facebook_Secret-Key' ] != '' ) && ( $pref[ 'user_reg' ] == 1 ) ) $fb_pref = e107::getPlugConfig('facebook')->getPref();
if (($fb_pref['Facebook_Api-Key'] != '') && ($fb_pref['Facebook_Secret-Key'] != '') && ($pref['user_reg'] == 1))
{ {
$html = ''; $html = '';
if ( USER ) { if (USER)
{
if ( USERID == get_id_from_uid ( is_fb() ) ) { if (USERID == get_id_from_uid(is_fb()))
{
if ( Facebook_User_Is_Connected() === true ) { if (Facebook_User_Is_Connected() === true)
{
///$html .= Render_Facebook_Profile(); ///$html .= Render_Facebook_Profile();
//$caption = 'Welcome, ' . Get_Facebook_Info ( 'name' ); //$caption = 'Welcome, ' . Get_Facebook_Info ( 'name' );
$html .= Render_Facebook_Friends_Table(); $html .= Render_Facebook_Friends_Table();
$html .= Render_Connect_Invite_Friends(); $html .= Render_Connect_Invite_Friends();
$caption = 'Friends';
// $text = $tp->parseTemplate($html, true, $facebook_shortcodes);
$ns->tablerender($caption, $html);
$caption = 'Friends'; }
// $text = $tp->parseTemplate($html, true, $facebook_shortcodes);
$ns->tablerender($caption, $html); }
}
}
}
}
} }

View File

@@ -1,47 +1,39 @@
<?php <?php
/** /**
* Fun Box - Become a Fun Of... * Fan Box - Become a Fan Of...
* *
* http://wiki.developers.facebook.com/index.php/Fan_Box * http://wiki.developers.facebook.com/index.php/Fan_Box
* * this must be later inserted in the Control Panel where User can chose below Parameters :
* this must be later inserted in the Control Panel where User can chose below Parameters : * stream = Set to 1 to display stream stories in the Fan Box or 0 to hide stream stories. (Default value is 1.)
* * connections = The number of fans to display in the Fan Box. Specifying 0 hides the list of fans in the Fan Box. You cannot display more than 100 fans. (Default value is 10 connections.)
* stream = Set to 1 to display stream stories in the Fan Box or 0 to hide stream stories. (Default value is 1.)
*
* connections = The number of fans to display in the Fan Box. Specifying 0 hides the list of fans in the Fan Box. You cannot display more than 100 fans. (Default value is 10 connections.)
*
* *
* see the render_fun_box() function * see the render_fun_box() function
* *
*/ */
require_once (e_BASE.'class2.php'); if (!defined('e107_INIT'))
include_once (e_PLUGIN.'facebook/facebook_function.php');
if ( isset ($_POST['fb_sig_in_canvas']))
{ {
return; exit;
} }
include_once(e_PLUGIN.'facebook/facebook_function.php');
if (isset($_POST['fb_sig_in_canvas']))
{
return;
}
if (is_fb())
{
$html = '';
$html .= Render_Fun_Box('0', '10', '200px');
if ( is_fb() ) { $caption = 'Fun Box';
$html = ''; $ns->tablerender($caption, $html);
$html .= Render_Fun_Box( '0' , '10' , '200px' ); }
$caption = 'Fun Box';
$ns->tablerender($caption, $html);
}
?> ?>