Code: Select all
[img]http://www.postavi.com/images/628_select_all.jpg[/img]
whether there is the installation of this plugin for Hermes style. Thanks [/b]
Code: Select all
General Error
template->_tpl_load_file(): File ./styles/hermes_gray/template/ucp_fbconnect_fbsettings.html does not exist or is empty
Code: Select all
File edits
memberlist.php
Find
$member = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
Add After
// Facebook Connect
@inject_fb_data($member);
Success
Find
$id_cache[$row['user_id']] = $row;
Add Before
// Facebook Connect
@inject_fb_data($row);
Success
ucp.php
Find
case 'logout':
Add After
// Facebook Connect
if($config['fbconnect_dologout'] == "0")
{
$_GET['nofb'] = true;
}
if(!isset($_GET['nofb']))
{
require_once($phpbb_root_path . 'includes/facebook-platform/php/facebook.'.$phpEx);
$facebook = new Facebook($config['fbconnect_apikey'], $config['fbconnect_appsecret']);
try {
$fbid = (int) $facebook->get_loggedin_user();
}
catch(FacebookRestClientException $e)
{
// Error occured. Let's ignore.
$fbid = 0;
}
//$facebook->kill_cookies(); // Remove any cookies set by Facebook Connect
if($fbid > 0)
{
try {
$url = "http://www.facebook.com/logout.php?app_key=" . $config['fbconnect_apikey'] . "&session_key=" . $facebook->api_client->session_key . "&next=" . urlencode("http://".$config['server_name'] . $config['script_path'] . "/ucp.php?mode=logout&nofb=1&sid=".$_GET['sid']);
}catch(FacebookRestClientException $e)
{
$url = "http://".$config['server_name'] . $config['script_path'] . "/ucp.php?mode=logout&nofb=1&sid=".$_GET['sid'];
}
header("Location: $url");
die();
}
}
Success
viewtopic.php
Find
// Set max_post_time
if ($row['post_time'] > $max_post_time)
{
$max_post_time = $row['post_time'];
}
Add After
// Facebook Connect
@inject_fb_data($row);
Success
includes/constants.php
Find
// Additional tables
Add After
define('FBIDS_TABLE', $table_prefix . 'fbids'); // Facebook Connect by DeViAnThans3
Success
includes/functions.php
Find
if (!defined('IN_PHPBB'))
{
exit;
}
Add After
require_once('functions_fbconnect.php'); // Facebook Connect
Success
Find
'SITENAME' => $config['sitename'],
Add After
// Facebook Connect
'FBCONNECT_APIKEY' => $config['fbconnect_apikey'],
'ENABLE_FBCONNECT' => (trim($config['fbconnect_apikey']) != "") ? true : false,
'FBLANG' => get_fb_lang(),
Success
includes/functions_user.php
Find
// Remove reports
$db->sql_query('DELETE FROM ' . REPORTS_TABLE . ' WHERE user_id = ' . $user_id);
Add After
// Remove facebook links
$db->sql_query('DELETE FROM ' . FBIDS_TABLE . ' WHERE user_id = ' . $user_id);
Success
includes/ucp/ucp_pm_viewmessage.php
Find
// Some standard values
$user_row['online'] = false;
Add Before
// Facebook Connect
@inject_fb_data($user_row);
Success
includes/ucp/ucp_prefs.php
Find
'user_style' => $data['style'],
);
Add After
// Facebook Connect
// This ensures that an user can not choose to show is e-mail, as this is in violation with Facebook Connect terms!
if(strstr($user->data['user_email'], "@proxymail.facebook.com"))
{
unset($sql_ary['user_allow_viewemail']);
}
Success
includes/ucp/ucp_profile.php
Find
case 'reg_details':
Add After
// Facebook Connect
$sql = 'SELECT COUNT(*) AS total FROM ' . FBIDS_TABLE . ' WHERE user_id = \'' . $user->data['user_id'] . '\' AND edit = \'0\'';
$result = $db->sql_query($sql);
$c = (int) $db->sql_fetchfield('total');
$new_fbuser = ($c>0) ? true : false;
Success
Find
'email' => array(
array('string', false, 6, 60),
array('email')),
'email_confirm' => array('string', true, 6, 60),
Replace With
'email' => array(
array('string', false, 6, 90),
array('email')),
'email_confirm' => array('string', true, 6, 90),
Success
Find
if (($data['new_password'] || ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email']) || ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])) && !phpbb_check_hash($data['cur_password'], $user->data['user_password']))
Replace With
if (!$new_fbuser && ($data['new_password'] || ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email']) || ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])) && !phpbb_check_hash($data['cur_password'], $user->data['user_password']))
Success
Find
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
Add After
// Facebook Connect
if(trim($data['new_password']) != "")
{
$new_ary = array('edit' => 1);
$sql = 'UPDATE ' . FBIDS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $new_ary) . '
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
}
Success
Find
'CUR_PASSWORD' => '',
Add After
'IS_NEW_FBUSER' => $new_fbuser, // Facebook Connect
Success
styles/prosilver/template/index_body.html
Find
<input type="submit" name="login" value="{L_LOGIN}" class="button2" />
Add After
<!-- IF ENABLE_FBCONNECT -->
<a onclick="javascript:fbSession(); return false;" href="#"><img src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_short.gif" style="vertical-align: middle;" alt="Login with your Facebook account!" /></a>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/{FBLANG}" type="text/javascript"></script>
<script type="text/javascript">
FB.init("{FBCONNECT_APIKEY}", "xd_receiver.htm");
</script>
<!-- ENDIF -->
Success
styles/prosilver/template/login_body.html
Find
<dl>
<dt> </dt>
<dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></dd>
</dl>
Add After
<!-- IF S_DISPLAY_FULL_LOGIN -->
<!-- IF ENABLE_FBCONNECT -->
<dl>
<dt> </dt>
<dd><a onclick="javascript:fbSession(); return false;" href="#"><img src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_long.gif" alt="Login with your Facebook account!" /></a></dd>
</dl>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/{FBLANG}" type="text/javascript"></script>
<script type="text/javascript">
FB.init("{FBCONNECT_APIKEY}", "xd_receiver.htm");
</script>
<!-- ENDIF -->
<!-- ENDIF -->
Success
styles/prosilver/template/overall_header.html
Find
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
Replace With
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}" xmlns:fb="http://www.facebook.com/2008/fbml">
Success
Find
window.onunload = function()
{
for (var i = 0; i < onunload_functions.length; i++)
{
eval(onunload_functions[i]);
}
}
Add After
/**
* Get FaceBook session
*/
function fbSession()
{
var url = "";
try{
if(document.getElementById('login').redirect.value != "")
{
url = 'fbconnect.php?redir='+escape(document.getElementById('login').redirect.value);
}else{
url = 'fbconnect.php';
}
}catch(err){
url = 'fbconnect.php';
}
// Auto-login
var x = document.getElementsByName('autologin').length;
if(x>0)
{
if(document.getElementsByName('autologin')[0].checked == true)
{
url += "&autologin=1";
}
}
// Hide session
var x = document.getElementsByName('viewonline').length;
if(x>0)
{
if(document.getElementsByName('viewonline')[0].checked == true)
{
url += "&viewonline=1";
}
}
FB.ensureInit(function()
{
FB.Connect.ifUserConnected(url, function ()
{
FB.Connect.requireSession(function ()
{
document.location = url;
});
});
});
}
Success
styles/prosilver/template/ucp_profile_reg_details.html
Find
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<fieldset>
<dl>
<dt><label for="cur_password">{L_CURRENT_PASSWORD}:</label><br /><span>{L_CURRENT_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" name="cur_password" id="cur_password" maxlength="255" value="{CUR_PASSWORD}" class="inputbox" title="{L_CURRENT_PASSWORD}" /></dd>
</dl>
</fieldset>
<span class="corners-bottom"><span></span></span></div>
</div>
Replace With
<!-- IF not IS_NEW_FBUSER -->
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<fieldset>
<dl>
<dt><label for="cur_password">{L_CURRENT_PASSWORD}:</label><br /><span>{L_CURRENT_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" name="cur_password" id="cur_password" maxlength="255" value="{CUR_PASSWORD}" class="inputbox" title="{L_CURRENT_PASSWORD}" /></dd>
</dl>
</fieldset>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
Success