本文整理汇总了PHP中IPSLib::fbc_enabled方法的典型用法代码示例。如果您正苦于以下问题:PHP IPSLib::fbc_enabled方法的具体用法?PHP IPSLib::fbc_enabled怎么用?PHP IPSLib::fbc_enabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPSLib
的用法示例。
在下文中一共展示了IPSLib::fbc_enabled方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: globalTemplate
function globalTemplate($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items = array(), $items = array(), $footer_items = array(), $stats = array())
{
$IPBHTML = "";
$this->memberData['members_editor_choice'] = 'std';
$this->templateVars['forumActive'] = "";
$this->__default__templateVars['forumActive'] = "";
if (IPS_APP_COMPONENT == 'forums') {
$this->templateVars['forumActive'] = "active";
} else {
$this->templateVars['forumActive'] = $this->__default__templateVars['forumActive'];
}
$this->templateVars['membersActive'] = "";
$this->__default__templateVars['membersActive'] = "";
if (IPS_APP_COMPONENT == 'members') {
$this->templateVars['membersActive'] = "active";
} else {
$this->templateVars['membersActive'] = $this->__default__templateVars['membersActive'];
}
$this->templateVars['helpActive'] = "";
$this->__default__templateVars['helpActive'] = "";
if (IPS_APP_COMPONENT == 'core' and $this->request['module'] == 'help') {
$this->templateVars['helpActive'] = "active";
} else {
$this->templateVars['helpActive'] = $this->__default__templateVars['helpActive'];
}
$this->did_first = 0;
$IPBHTML .= "\t<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\t<html xml:lang=\"en\" lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\"" . (IPSLib::fbc_enabled() === TRUE ? " xmlns:fb=\"http://www.facebook.com/2008/fbml\"" : "") . ">\n\t<head>\n\t\t<meta http-equiv=\"content-type\" content=\"text/html; charset={$this->settings['gb_char_set']}\" />\n\t\t<title>{$header_items['title']}" . ($header_items['page'] ? " {$this->lang->words['page_title_page']} {$header_items['page']}" : "") . "</title>\n\t\t<link rel=\"shortcut icon\" href='" . ($this->registry->output->isHTTPS ? "{$this->settings['board_url_https']}" : "{$this->settings['board_url']}") . "/favicon.ico' />\n\t\t" . $this->registry->getClass('output')->getTemplate('global')->includeCSS($css) . "\n\t\t<!--<meta http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />-->\n\t\t" . $this->registry->getClass('output')->getTemplate('global')->includeMeta($metaTags) . "" . $this->registry->getClass('output')->getTemplate('global')->includeFeeds($documentHeadItems) . "" . $this->registry->getClass('output')->getTemplate('global')->includeRTL() . "\t\t\n\t</head>\n\t<body id='ipboard_body'>\n\t\t<div id='ipbwrapper'>\n\t\t\t<p id='content_jump'><a id='top'></a><a href='#j_content' title='{$this->lang->words['jump_to_content']}' accesskey='m'>{$this->lang->words['jump_to_content']}</a></p>\n\t\t\t<div id='header'>\n\t\t\t\t<div id='branding'>\n\t\t\t\t\t<h1><a href='{$this->settings['board_url']}' title='{$this->settings['board_name']}'>{$this->settings['board_name']}</a>: {$header_items['title']}</h1>\n\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t" . ($this->memberData['member_id'] ? "<div id='user_navigation' class='logged_in'>\n\t\t\t\t\t\t<div id='user_info'>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<span class='hide'>{$this->lang->words['logged_in_as']} </span>\n\t\t\t\t\t\t\t\t<a id='user_link' class='ipbmenu' href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$this->memberData['member_id']}", 'public', ''), "{$this->memberData['members_seo_name']}", "showuser") . "\" title='{$this->lang->words['your_profile']}'>{$this->memberData['members_display_name']}</a>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<ul id='user_link_menucontent'>\n\t\t\t\t\t\t\t\t<li id='user_profile'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$this->memberData['member_id']}", 'public', ''), "{$this->memberData['members_seo_name']}", "showuser") . "' title='{$this->lang->words['your_profile']}'>{$this->lang->words['my_profile']}</a></li>\n\t\t\t\t\t\t\t\t<li id='user_ucp'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=usercp", 'public', ''), "", "") . "\" title=\"{$this->lang->words['cp_tool_tip']}\">{$this->lang->words['your_cp']}</a></li>\n\t\t\t\t\t\t\t\t" . (($this->memberData['has_blog'] and IPSLib::appIsInstalled('blog')) ? "\n\t\t\t\t\t\t\t\t\t<li id='user_blog'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&module=display&section=blog&mid={$this->memberData['member_id']}", 'public', ''), "", "") . "' title=\"{$this->lang->words['go_to_my_blog']}\">{$this->lang->words['my_blog']}</a></li>\n\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t" . (($this->memberData['has_gallery'] and IPSLib::appIsInstalled('gallery')) ? "\n\t\t\t\t\t\t\t\t\t<li id='user_gallery'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&module=user&section=user&user={$this->memberData['member_id']}", 'public', ''), "", "") . "' title=\"{$this->lang->words['go_to_my_gallery']}\">{$this->lang->words['my_gallery']}</a></li>\n\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t<ul id='user_other'>\n\t\t\t\t\t\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login&do=logout&k={$this->member->form_hash}", 'public', ''), "", "") . "\">{$this->lang->words['log_out']}</a></li>\n\t\t\t\t\t\t\t\t" . ($this->memberData['member_group_id'] == $this->settings['auth_group'] ? "\n\t\t\t\t\t\t\t\t\t<li><strong><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=register&do=reval", 'public', ''), "", "") . "\" title='{$this->lang->words['resend_val']}'>{$this->lang->words['resend_val']}</a></strong></li>\n\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>" : "\n\t\t\t\t\t<div id='user_navigation' class='not_logged_in'>\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login", 'public', ''), "", "") . "' title='{$this->lang->words['sign_in']}'>" . $this->registry->getClass('output')->getReplacement("signin_icon") . " {$this->lang->words['sign_in']}</a>\n\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=register", 'public', ''), "", "") . "\" title='{$this->lang->words['register']}'>" . $this->registry->getClass('output')->getReplacement("register_icon") . " {$this->lang->words['register']}</a>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t") . "\n\t\t\t\t\n\t\t\t\t<div id='primary_nav'>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t" . ($this->settings['home_url'] ? "\n\t\t\t\t\t\t\t<li id='nav_home' class='left'><a href='{$this->settings['home_url']}' title='{$this->lang->words['homepage_title']}' rel=\"home\">{$this->settings['home_name']}</a></li>\n\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li id='nav_discussion' class='left " . $this->templateVars["forumActive"] . "'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("act=idx", 'public', ''), "false", "") . "' title='{$this->lang->words['go_to_discussion']}'>{$this->lang->words['discussion']}</a></li>\n\t\t\t\t\t\t<li id='nav_members' class='left " . $this->templateVars["membersActive"] . "'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&section=view&module=list", 'public', ''), "", "") . "' title='{$this->lang->words['go_to_memberlist']}'>{$this->lang->words['tb_mlist']}</a></li>\n\t\t\t\t\t\t" . ((is_array($header_items['applications']) and count($header_items['applications'])) ? "\n\t\t\t\t\t\t\t" . $this->__f__d0004aa108d971bd0446e860e5970bb4($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t\t<div id='secondary_nav'>\n\t\t\t\t\t<ul id='breadcrumb' class='left'>\n\t\t\t\t\t\t\t\t\t\t\t\t" . ((!$this->settings['remove_forums_nav'] or ipsRegistry::$current_application == 'forums') ? "<li class='first'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("act=idx", 'public', ''), "false", "") . "'>{$this->settings['board_name']}</a></li>\n\t\t\t\t\t\t\t" . (($this->did_first = 1) ? "" : "") . "" : "") . "\n\t\t\t\t\t\t" . $this->__f__6539d3f75039d4ef4002e1c7ad34f59c($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id='content'>\n\t\t\t\t<a id='j_content'></a>\n\t\t\t\t" . ($html ? "{$html}" : "") . "\n\t\t\t\t<br class='clear' />\n\t\t\t</div>\n\t\t\t<div id='footer_utilities' class='clearfix clear rounded'>\n\t\t\t\t<h2 class='hide'>{$this->lang->words['skin_and_lang']}</h2>\n\t\t\t\t" . ($this->settings['allow_skins'] ? "" . (($this->memberData['userAgentLocked'] and !$this->memberData['userAgentBypass']) ? "\n\t\t\t\t\t\t<p id='useragent_msg'>\n\t\t\t\t\t\t\t{$this->lang->words['skin_browser_set']} <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$this->settings['query_string_formatted']}&unlockUserAgent=1", 'public', ''), "", "") . "'>{$this->lang->words['override_browser_theme']}</a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t" : "" . ($footer_items['skin_chooser'] ? "\n\t\t\t\t\t\t\t<form action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$this->settings['query_string_formatted']}", 'public', ''), "", "") . "\" method=\"post\" class='left'>\n\t\t\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t\t\t<input type='hidden' name='k' value='{$this->member->form_hash}' />\n\t\t\t\t\t\t\t\t\t<label for='newSkin' class='hide'>{$this->lang->words['theme_prefix']}</label>\n\t\t\t\t\t\t\t\t\t<select name=\"settingNewSkin\" id='newSkin'>\n\t\t\t\t\t\t\t\t\t\t{$footer_items['skin_chooser']}\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t<input type='submit' value='{$this->lang->words['jmp_go']}' class='input_submit alt' id='newSkinSubmit' />\n\t\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t" : "") . "") . "" : "") . "\n\t\t\t\t<form action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$this->settings['query_string_formatted']}", 'public', ''), "", "") . "\" method=\"post\" class='left'>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type='hidden' name='k' value='{$this->member->form_hash}' />\n\t\t\t\t\t\t<input type='hidden' name='setlanguage' value='1' />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"langurlbits\" value=\"{$this->settings['query_string_safe']}&cal_id={$this->request['cal_id']}\" />\n\t\t\t\t\t\t<label for='newLang' class='hide'>{$this->lang->words['language_prefix']}</label>\n\t\t\t\t\t\t<select name=\"langid\" id='newLang'>\n\t\t\t\t\t\t\t\t{$footer_items['lang_chooser']}\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t<input type='submit' class='input_submit alt' value='{$this->lang->words['jmp_go']}' id='newLangSubmit' />\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t<!-- __FOOTER__ -->\n\t\t\t<!-- /__FOOTER__ -->\n\t\t\t<!--DEBUG_STATS-->\n\t\t\t<div id='board_footer'>\n\t\t\t\t<ul id='utility_links' class='left'>\n\t\t\t\t\t<li><a href='#top' title='{$this->lang->words['go_to_top']}'>{$this->lang->words['back_to_top']}</a></li>\n\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("", 'public', ''), "", "") . "' title='{$this->lang->words['sj_home']}'>{$this->lang->words['sj_home']}</a></li>\n\t\t\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login&do=deleteCookies&k={$this->member->form_hash}", 'public', ''), "", "") . "\" title='{$this->lang->words['delete_all_cookies_title']}'>{$this->lang->words['delete_my_cookies']}</a></li>\n\t\t\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&module=forums&section=markasread&marktype=all&k={$this->member->form_hash}", 'public', ''), "", "") . "\" title='{$this->lang->words['mark_all_as_read']}'>{$this->lang->words['mark_board_as_read']}</a></li>\n\t\t\t\t</ul>\n\t\t\t\t{$footer_items['copyright']}\n\t\t\t</div>\n\t\t\t{$stats['task']}\n\t\t</div>\n\t</body>\n</html>";
return $IPBHTML;
}
示例2: init
/**
* Initiate this module
*
* @access public
* @return void
*/
public function init()
{
$this->tab_name = ipsRegistry::getClass('class_localization')->words['tab__core'];
/* Facebook? */
if (IPSLib::fbc_enabled() === TRUE and $this->memberData['fb_uid']) {
require_once IPS_ROOT_PATH . 'sources/classes/facebook/connect.php';
$facebook = new facebook_connect($this->registry);
/* Test connection */
$facebook->testConnectSession();
try {
$fbuid = $facebook->FB()->get_loggedin_user();
} catch (Exception $e) {
}
if ($fbuid) {
$this->_isFBUser = true;
}
}
}
示例3: __construct
/**
* Construct.
*
* @access public
* @return void
*/
public function __construct($registry, $app_directory = '')
{
/* Make object */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
/* Test */
if (IPSLib::fbc_enabled() !== TRUE) {
throw new Exception('FACEBOOK_DISABLED_OR_NOT_SET_UP');
}
/* Load and set up the facebook stuff */
require_once IPS_KERNEL_PATH . 'facebook-client/facebook.php';
$this->_fb = new Facebook($this->settings['fbc_api_id'], $this->settings['fbc_secret'], true);
$this->_api = $this->_fb->api_client;
}
示例4: runTask
/**
* Run this task
*
* @return @e void
*/
public function runTask()
{
$counter = 0;
$_sync = time() - 10800;
$_active = time() - 86400 * 14;
$members = array();
if (IPSLib::fbc_enabled() !== TRUE && IPSLib::twitter_enabled() !== TRUE) {
$this->class->unlockTask($this->task);
return;
}
//-----------------------------------------
// Fetch members / Edit - only complete members
// @link http://community.invisionpower.com/tracker/issue-29269-display-names-not-always-shown-in-status-updates
//-----------------------------------------
$this->DB->build(array('select' => 'm.member_id', 'from' => array('members' => 'm'), 'where' => '( (m.twitter_id != \'\' AND m.tc_lastsync < ' . $_sync . ') OR (m.fb_uid > 0 AND m.fb_lastsync < ' . $_sync . ') ) AND p.partial_id ' . $this->DB->buildIsNull(true) . ' AND m.last_activity > ' . $_active, 'order' => 'm.last_visit DESC', 'limit' => array(0, 30), 'add_join' => array(array('from' => array('members_partial' => 'p'), 'where' => 'p.partial_member_id=m.member_id', 'type' => 'left'))));
$this->DB->execute();
while ($row = $this->DB->fetch()) {
$members[] = $row['member_id'];
}
$members = IPSMember::load($members);
foreach ($members as $member) {
//-----------------------------------------
// Facebook Sync
//-----------------------------------------
if (IPSLib::fbc_enabled() === TRUE) {
if (!empty($member['fb_uid']) and !empty($member['fb_bwoptions'])) {
/* We have a linked member and options, so check if they haven't sync'd in 24 hours and have been active in the past 90 days... */
try {
$classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/facebook/connect.php', 'facebook_connect');
$facebook = new $classToLoad(ipsRegistry::instance(), null, null, true);
$_member = $facebook->syncMember($member, $member['fb_token'], $member['fb_uid']);
$counter++;
if ($_member and is_array($_member)) {
$member = $_member;
unset($_member);
}
} catch (Exception $error) {
$msg = $error->getMessage();
switch ($msg) {
case 'NOT_LINKED':
case 'NO_MEMBER':
case 'FACEBOOK_NO_APP_ID':
break;
}
}
}
}
//-----------------------------------------
// Twitter Sync
//-----------------------------------------
if (IPSLib::twitter_enabled() === TRUE) {
if (!empty($member['twitter_id']) and !empty($member['tc_bwoptions'])) {
/* We have a linked member and options, so check if they haven't sync'd in 3 hours and have been active in the past 90 days... */
$classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/twitter/connect.php', 'twitter_connect');
$twitter = new $classToLoad(ipsRegistry::instance());
try {
$_member = $twitter->syncMember($member);
$counter++;
if ($_member and is_array($_member)) {
$member = $_member;
unset($_member);
}
} catch (Exception $error) {
$msg = $error->getMessage();
switch ($msg) {
case 'NOT_LINKED':
case 'NO_MEMBER':
break;
}
}
}
}
}
//-----------------------------------------
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->appendTaskLog($this->task, "Updated " . $counter);
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlockTask($this->task);
}
示例5: globalTemplateMinimal
function globalTemplateMinimal($html, $documentHeadItems, $css, $jsModules, $metaTags, array $header_items, $items = array(), $footer_items = array(), $stats = array())
{
$IPBHTML = "";
if (IPSLib::locationHasHooks('skin_global_other', $this->_funcHooks['globalTemplateMinimal'])) {
$count_16257f67e159588aefbdc0bd19287ee0 = is_array($this->functionData['globalTemplateMinimal']) ? count($this->functionData['globalTemplateMinimal']) : 0;
$this->functionData['globalTemplateMinimal'][$count_16257f67e159588aefbdc0bd19287ee0]['html'] = $html;
$this->functionData['globalTemplateMinimal'][$count_16257f67e159588aefbdc0bd19287ee0]['documentHeadItems'] = $documentHeadItems;
$this->functionData['globalTemplateMinimal'][$count_16257f67e159588aefbdc0bd19287ee0]['css'] = $css;
$this->functionData['globalTemplateMinimal'][$count_16257f67e159588aefbdc0bd19287ee0]['jsModules'] = $jsModules;
$this->functionData['globalTemplateMinimal'][$count_16257f67e159588aefbdc0bd19287ee0]['metaTags'] = $metaTags;
$this->functionData['globalTemplateMinimal'][$count_16257f67e159588aefbdc0bd19287ee0]['header_items'] = $header_items;
$this->functionData['globalTemplateMinimal'][$count_16257f67e159588aefbdc0bd19287ee0]['items'] = $items;
$this->functionData['globalTemplateMinimal'][$count_16257f67e159588aefbdc0bd19287ee0]['footer_items'] = $footer_items;
$this->functionData['globalTemplateMinimal'][$count_16257f67e159588aefbdc0bd19287ee0]['stats'] = $stats;
}
$IPBHTML .= "<!DOCTYPE html>\n\t<html xml:lang=\"en\" lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\"" . (IPSLib::fbc_enabled() === TRUE ? " xmlns:fb=\"http://www.facebook.com/2008/fbml\"" : "") . ">\n\t<head>\n\t\t<meta http-equiv=\"content-type\" content=\"text/html; charset={$this->settings['gb_char_set']}\" />\n\t\t<title>{$header_items['title']}" . ($header_items['page'] ? " {$this->lang->words['page_title_page']} {$header_items['page']}" : "") . "</title>\n\t\t<link rel=\"shortcut icon\" href='" . ($this->registry->output->isHTTPS ? "{$this->settings['board_url_https']}" : "{$this->settings['board_url']}") . "/favicon.ico' />\n\t\t<link rel=\"image_src\" href='{$this->settings['meta_imagesrc']}' />\n\t\t<script type='text/javascript'>\n\t\t//<![CDATA[\n\t\t\tjsDebug\t\t\t= " . intval($this->settings['_jsDebug']) . "; /* Must come before JS includes */\n\t\t\tUSE_RTE\t\t\t= 1;\n\t\t\tDISABLE_AJAX\t= parseInt({$this->settings['disable_text_ajax']}); /* Disables ajax requests where text is sent to the DB; helpful for charset issues */\n\t\t\tinACP\t\t\t= false;\n\t\t\tvar isRTL\t\t= false;\n\t\t\tvar rtlIe\t\t= '';\n\t\t\tvar rtlFull\t\t= '';\n\t\t//]]>\n\t\t</script>\n\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'includeCSS') ? $this->registry->getClass('output')->getTemplate('global')->includeCSS($css) : '') . "\n\t\t<meta property=\"og:title\" content=\"{$this->registry->output->encodeMetaTagContent(str_replace(' - ' . $this->settings['board_name'], '', $header_items['title']))}\"/>\n\t\t<meta property=\"og:site_name\" content=\"{$this->registry->output->encodeMetaTagContent($this->settings['board_name'])}\"/>\n\t\t<meta property=\"og:image\" content=\"{$this->settings['meta_imagesrc']}\"/>\n\t\t<meta property=\"og:type\" content=\"article\" />\n\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'includeMeta') ? $this->registry->getClass('output')->getTemplate('global')->includeMeta($metaTags) : '') . "\n\t\t" . ($this->registry->output->isLargeTouchDevice() ? "\n\t\t<meta name=\"viewport\" content=\"width=1024px; initial-scale=1.0; minimum-scale=1.0;\">\n\t\t" : "") . "\n\t\t" . ($this->registry->output->isSmallTouchDevice() ? "\n\t\t<meta name=\"viewport\" content=\"width=1024px\">\n\t\t" : "") . "\n\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'includeJS') ? $this->registry->getClass('output')->getTemplate('global')->includeJS($jsModules) : '') . "" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'includeFeeds') ? $this->registry->getClass('output')->getTemplate('global')->includeFeeds($documentHeadItems) : '') . "" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'includeRTL') ? $this->registry->getClass('output')->getTemplate('global')->includeRTL() : '') . "\t\t\n\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'includeVars') ? $this->registry->getClass('output')->getTemplate('global')->includeVars($header_items) : '') . "\n\t</head>\n\t<body id='ipboard_body' class='minimal'>\n\t\t<p id='content_jump' class='hide'><a id='top'></a><a href='#j_content' title='{$this->lang->words['jump_to_content']}' accesskey='m'>{$this->lang->words['jump_to_content']}</a></p>\n\t\t<div id='ipbwrapper'>\t\t\n\t\t\t<div id='content' class='clearfix'>\n\t\t\t\t{$items['adHeaderCode']}\n\t\t\t\t" . ($html ? "{$html}" : "") . "\n\t\t\t\t{$items['adFooterCode']}\n\t\t\t</div>\n\t\t\t<div class='ipsPad clearfix'>\n\t\t\t\t{$footer_items['copyright']}\n\t\t\t</div>\n\t\t\t" . (($this->memberData['member_id'] and $this->settings['debug_level']) ? "<div id='ipsDebug_footer'>\n\t\t\t\t\t<strong>{$this->lang->words['time_now']}</strong> {$footer_items['time']}\n\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['last_visit']) ? "<strong>{$this->lang->words['you_last_visit']}</strong> " . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($this->memberData['last_visit'], "short", 0)) . "" : "") . "\n\t\t\t\t\t<strong>{$this->lang->words['stat_exec']}</strong> {$stats['ex_time']} " . (is_float($stats['ex_time']) ? "{$this->lang->words['stats_sec']}" : "") . "\n\t\t\t\t\t<strong>{$this->lang->words['stat_load']}</strong> {$stats['server_load']}\n\t\t\t\t\t<strong>{$this->lang->words['stat_queries']}</strong> {$stats['queries']} " . (IPS_SQL_DEBUG_MODE ? "<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$this->settings['query_string_safe']}&debug=1", "public", ''), "", "") . "'>" : "") . "{$this->lang->words['stats_queries']}" . (IPS_SQL_DEBUG_MODE ? "</a>" : "") . "\n\t\t\t\t\t<strong>{$this->lang->words['stat_gzip']}</strong> {$stats['gzip_status']}\n\t\t\t\t</div>" : "") . "\n\t\t\t<div style='height: 0px; overflow: hidden;'>{$stats['task']}</div>\n\t\t</div>\n\t\t\n\t\t<!--DEBUG_STATS-->\n\t</body>\n</html>";
return $IPBHTML;
}
示例6: _handleLogin
/**
* Attempt to login a user to the mobile service
*
* @return string XML
*/
protected function _handleLogin()
{
/* 3.2 upwards renames these fields, but since we do this prior to getting capabilities, we don't know version yet */
$this->request['ips_username'] = ipsRegistry::$request['ips_username'] = $this->request['username'];
$_REQUEST['ips_username'] = $_REQUEST['username'];
$this->request['ips_password'] = ipsRegistry::$request['ips_password'] = $this->request['password'];
$_REQUEST['ips_password'] = $_REQUEST['password'];
/* Load the login handler */
$classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login');
$this->han_login = new $classToLoad($this->registry);
$this->han_login->init();
/* Attempt login */
$loginResult = $this->han_login->verifyLogin();
/* Fail */
if ($loginResult[2]) {
$this->_returnError('Login Failed');
} else {
$this->_returnXml(array('success' => 1, 'gallery' => $this->_userHasGallery($this->han_login->member_data) ? '1' : '0', 'status' => $this->_canUpdateStatus($this->han_login->member_data) ? '1' : '0', 'notifications' => $this->_userEnabledNotifications($this->han_login->member_data) ? '1' : '0', 'facebook' => IPSLib::fbc_enabled() && $this->han_login->member_data['fb_uid'] ? '1' : '0', 'twitter' => IPSLib::twitter_enabled() && $this->han_login->member_data['twitter_id'] ? '1' : '0', 'albums' => $this->_userAlbums($this->han_login->member_data), 'version_id' => ipsRegistry::$vn_full, 'version_text' => ipsRegistry::$version, 'form_hash' => md5($this->han_login->member_data['email'] . '&' . $this->han_login->member_data['member_login_key'] . '&' . $this->han_login->member_data['joined'])));
}
}
示例7: _triggerExternalUpdates
/**
* Triggers external postings Twitter, etc
*
* @param array Update to...
* @param int Status ID just posted
* @param array [Array of member data for member updating their status - will use ->getAuthor() if null]
* @param string [Content to update]
* @todo [Future] At some point it could be expanded into a mini framework with plugins
*/
protected function _triggerExternalUpdates($updates, $status_id = 0, $author = null, $content = null)
{
$author = $author === null ? $this->getAuthor() : $author;
$content = $content ? $this->_cleanContent($content) : $this->_cleanContent($this->getContent());
/* Fail safe */
if (!$author['member_id'] or !$content) {
return false;
}
$url = $this->registry->output->buildSEOUrl('app=members&module=profile&section=status&type=single&status_id=' . $status_id, 'publicNoSession', array($author['member_id'], $author['members_seo_name']), 'members_status_single');
/* Twitter */
if ($updates['twitter']) {
if (IPSLib::twitter_enabled() and $author['twitter_id']) {
$classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/twitter/connect.php', 'twitter_connect');
$twitter = new $classToLoad($this->registry, $author['twitter_token'], $author['twitter_secret']);
$twitter->updateStatusWithUrl($content, $url, FALSE);
}
}
/* Facebook */
if ($updates['facebook']) {
if (IPSLib::fbc_enabled() and $author['fb_uid']) {
$classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/facebook/connect.php', 'facebook_connect');
$facebook = new $classToLoad($this->registry);
$facebook->updateStatusWithUrl($content, $url, FALSE);
}
}
}
示例8: buildProfilePhoto
/**
* Parse a member's profile photo
*
* @access public
* @param mixed Either array of member data, or member ID to self load
* @return array Member's photo details
*/
public static function buildProfilePhoto($member)
{
//-----------------------------------------
// Load the member?
//-----------------------------------------
if (!is_array($member) and $member == intval($member) and $member > 0) {
$member = self::load($member, 'extendedProfile');
} else {
if ($member == 0) {
$member = array();
}
}
//-----------------------------------------
// Facebook Sync
//-----------------------------------------
if (IPSLib::fbc_enabled() === TRUE) {
if ($member['fb_uid'] and $member['fb_bwoptions']) {
$_sync = time() - 86400;
$_active = time() - 86400 * 90;
/* We have a linked member and options, so check if they haven't sync'd in 24 hours and have been active in the past 90 days... */
if ($member['fb_lastsync'] < $_sync and $member['last_visit'] > $_active) {
require_once IPS_ROOT_PATH . 'sources/classes/facebook/connect.php';
$facebook = new facebook_connect(ipsRegistry::instance());
try {
$member = $facebook->syncMember($member);
} catch (Exception $error) {
$msg = $error->getMessage();
switch ($msg) {
case 'NOT_LINKED':
case 'NO_MEMBER':
break;
}
}
}
}
}
//-----------------------------------------
// Facebook?
//-----------------------------------------
if ($member['fb_photo'] and ipsRegistry::member()->getProperty('g_mem_info')) {
$member['_has_photo'] = 1;
/* Main... */
$member['pp_main_photo'] = $member['fb_photo'];
$member['pp_main_width'] = '*';
$member['pp_main_height'] = '*';
/* Thumb */
$member['pp_thumb_photo'] = $member['fb_photo_thumb'];
$member['pp_thumb_width'] = 50;
$member['pp_thumb_height'] = 50;
/* Mini */
$member['pp_mini_photo'] = $member['fb_photo_thumb'];
$member['pp_mini_width'] = 25;
$member['pp_mini_height'] = 25;
} else {
//-----------------------------------------
// Main photo
//-----------------------------------------
if (!$member['pp_main_photo'] or !ipsRegistry::member()->getProperty('g_mem_info')) {
$member['pp_main_photo'] = ipsRegistry::$settings['img_url'] . '/profile/default_large.png';
$member['pp_main_width'] = 150;
$member['pp_main_height'] = 150;
$member['_has_photo'] = 0;
} else {
$member['pp_main_photo'] = ipsRegistry::$settings['upload_url'] . '/' . $member['pp_main_photo'];
$member['_has_photo'] = 1;
}
//-----------------------------------------
// Thumbie
//-----------------------------------------
if (!$member['pp_thumb_photo'] or $member['pp_thumb_photo'] == 'profile/') {
if ($member['_has_photo']) {
$member['pp_thumb_photo'] = $member['pp_main_photo'];
} else {
$member['pp_thumb_photo'] = ipsRegistry::$settings['img_url'] . '/profile/default_thumb.png';
}
$member['pp_thumb_width'] = 50;
$member['pp_thumb_height'] = 50;
} else {
if ($member['_has_photo']) {
$member['pp_thumb_photo'] = ipsRegistry::$settings['upload_url'] . '/' . $member['pp_thumb_photo'];
} else {
$member['pp_thumb_photo'] = ipsRegistry::$settings['img_url'] . '/profile/default_thumb.png';
}
}
//-----------------------------------------
// Mini
//-----------------------------------------
$_data = IPSLib::scaleImage(array('max_height' => 25, 'max_width' => 25, 'cur_width' => $member['pp_thumb_width'], 'cur_height' => $member['pp_thumb_height']));
$member['pp_mini_photo'] = $member['pp_thumb_photo'];
$member['pp_mini_width'] = $_data['img_width'];
$member['pp_mini_height'] = $_data['img_height'];
}
return $member;
//.........这里部分代码省略.........
示例9: saveFacebook
/**
* UserCP Save Form: Facebook
*
* @return array Errors
*/
public function saveFacebook()
{
if (!IPSLib::fbc_enabled()) {
$this->registry->getClass('output')->showError('fbc_disabled', 1005);
}
//-----------------------------------------
// Data
//-----------------------------------------
$toSave = IPSBWOptions::thaw($this->memberData['members_bitoptions'], 'members');
//-----------------------------------------
// Loop and save... simple
//-----------------------------------------
foreach (array('fbc_s_pic', 'fbc_s_status', 'fbc_s_aboutme', 'fbc_si_status') as $field) {
$toSave[$field] = intval($this->request[$field]);
}
$this->memberData['fb_bwoptions'] = IPSBWOptions::freeze($toSave, 'facebook');
IPSMember::save($this->memberData['member_id'], array('extendedProfile' => array('fb_bwoptions' => $this->memberData['fb_bwoptions'])));
//-----------------------------------------
// Now sync
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/facebook/connect.php', 'facebook_connect');
$facebook = new $classToLoad($this->registry);
try {
$facebook->syncMember($this->memberData);
} catch (Exception $error) {
$msg = $error->getMessage();
switch ($msg) {
case 'NOT_LINKED':
case 'NO_MEMBER':
break;
}
}
return TRUE;
}
示例10: userCPTemplate
function userCPTemplate($current_tab, $html, $tabs, $current_area, $errors = array(), $hide_form = 0, $maxUpload = 0)
{
$IPBHTML = "";
$IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("ucp", "0") . "\n" . (IPSLib::fbc_enabled() === TRUE ? "<!-- SKINNOTE: This could be added dynamically by JS if this is too obtrusive. FB users need JS on, so no worries there -->\n\t" . ($this->registry->output->isHTTPS ? "\n\t\t<script src=\"https://ssl.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php\" type=\"text/javascript\"></script>\n\t" : "\n\t\t<script src=\"http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php\" type=\"text/javascript\"></script>\n\t") . "\t" . ((!$this->memberData['fb_emailallow'] and strstr($this->memberData['email'], '@proxymail.facebook.com')) ? "\n\t\t<div id='fbc_emailCheck' style='display:none'>\n\t\t\t<fb:prompt-permission perms=\"email\">\n\t\t\t\t<div class='message unspecific'>\n\t\t\t\t\t<strong>{$this->lang->words['cannot_get_email']}</strong>\n\t\t\t\t\t<br />\n\t\t\t\t\t{$this->lang->words['cannot_get_email_2']}\n\t\t\t\t\t<br />\n\t\t\t\t\t<u>{$this->lang->words['click_allow_email']}</u>\n\t\t\t\t</div>\n\t\t\t</fb:prompt-permission>\n\t\t\t<br />\n\t\t</div>\n\t\t<script type=\"text/javascript\">\n\t\t\t/* Init Facebook JS */\n\t\t\tFB_RequireFeatures([\"XFBML\"], function()\n\t\t\t{\n\t\t\t\tFB.init(\"{$this->settings['fbc_api_id']}\", \"{$this->settings['fbc_xdlocation']}\" );\n\t\t\t} );\n\t\t\t/* As the REST can take a short while, the div shows then hides; this delays it until its ready to show or hide */\n\t\t\tEvent.observe( window, 'load', function() { \$('fbc_emailCheck').show(); } );\n\t\t</script>\n\t" : "") . "" : "") . "\n" . ($hide_form == 0 ? "" . ($maxUpload ? "\n\t\t<form method='post' enctype=\"multipart/form-data\" action='{$this->settings['base_url']}app=core&module=usercp&tab={$current_tab}&area={$current_area}' id='userCPForm'>\n\t" : "\n\t\t<form method='post' action='{$this->settings['base_url']}app=core&module=usercp&tab={$current_tab}&area={$current_area}' id='userCPForm'>\n\t") . "" : "") . "\n\t<fieldset>\n\t\t<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"{$maxUpload}\" />\n\t\t<input type='hidden' name='do' value='save' />\n\t\t<input type='hidden' name='secure_hash' value='{$this->member->form_hash}' />\n\t\t<input type='hidden' name='s' value='{$this->request['s']}' />\n\t</fieldset>\n<h2>{$this->lang->words['ucp_title']}</h2>\n<ul class='tab_bar no_title'>\n\t" . $this->__f__d56c673e0548c7a8eeb9357cd58893d1($current_tab, $html, $tabs, $current_area, $errors, $hide_form, $maxUpload) . "</ul>\n<div class='tab_body usercp_body'>\n\t<ul id='usercp_menu'>\n\t\t" . ((is_array($tabs[$current_tab]['_menu']) and count($tabs[$current_tab]['_menu'])) ? "\n\t\t\t" . $this->__f__92e07c01d6df6f93f9677a030cfbd8a8($current_tab, $html, $tabs, $current_area, $errors, $hide_form, $maxUpload) . "\t\t" : "") . "\n\t</ul>\n\t<div id='usercp_content'>\n\t\t" . ((is_array($errors) and count($errors)) ? "\n\t\t\t<p class='message error'>\n\t\t\t\t" . $this->__f__7d6ff6cf778678bd847f6e4de3209156($current_tab, $html, $tabs, $current_area, $errors, $hide_form, $maxUpload) . "\t\t\t</p>\n\t\t" : "") . "\n\t\t" . ($this->request['saved'] == 1 ? "\n\t\t\t<p class='message'>{$this->lang->words['ucp__settings_saved']}</p>\n\t\t" : "") . "\n\t\t{$html}\n\t\t\n\t\t" . ($hide_form == 0 ? "\n\t\t<fieldset class='submit'>\n\t\t\t<input type='submit' class='input_submit' name='submit' value='{$this->lang->words['ucp__save_changes']}' /> {$this->lang->words['or']} <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=usercp&tab={$current_tab}&area={$current_area}", 'public', ''), "", "") . "' title='{$this->lang->words['cancel_edit']}' class='cancel'>{$this->lang->words['cancel']}</a>\n\t\t</fieldset>\n\t\t" : "") . "\n\t</div>\n</div>\n" . ($hide_form == 0 ? "\n</form>\n" : "") . "";
return $IPBHTML;
}
示例11: registerForm
function registerForm($general_errors = array(), $data = array(), $inline_errors = array(), $time_select = array(), $custom_fields = array())
{
$IPBHTML = "";
$this->registry->templateStriping['register'] = array(FALSE, "row1", "row2");
$IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("register", "0") . "\n" . $this->registry->getClass('output')->addJSModule("facebook", "0") . "\n<script type='text/javascript'>\n//<![CDATA[\n\tipb.register.inSection = \"mainform\";\n\tipb.register.nameMaxLength = \"{$this->settings['max_user_name_length']}\";\n\tipb.register.allowedChars = \"{$this->settings['username_characters']}\";\n\tipb.templates['accept'] = \" <span id='[id]_msg' class='reg_msg reg_accept' style='display: none'><img src='{$this->settings['img_url']}/accept.png' alt='{$this->lang->words['icon']}' /> [msg]</span>\";\n\tipb.templates['error'] = \" <span id='[id]_msg' class='reg_msg reg_error' style='display: none'><img src='{$this->settings['img_url']}/exclamation.png' alt='{$this->lang->words['icon']}' /> [msg]</span>\";\n//]]>\n</script>\n<!-- SKINNOTE TEMPORARY ERROR OUTPUT UNTIL RIKKI FIXES :) -->\n" . (is_array($general_errors) && count($general_errors) ? "\n<div class='message error'>\n\t{$this->lang->words['following_errors']}\n\t<ul>\n\t\t" . $this->__f__5b17498ae294375f6e2888bb373995eb($general_errors, $data, $inline_errors, $time_select, $custom_fields) . "\t</ul>\n</div>\n" : "") . "<form action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=register", 'public', ''), "", "") . "\" method=\"post\" name=\"REG\" id='register'>\n\t<input type=\"hidden\" name=\"termsread\" value=\"1\" />\n\t<input type=\"hidden\" name=\"agree_to_terms\" value=\"1\" />\n\t<input type=\"hidden\" name=\"do\" value=\"process_form\" />\n\t<input type=\"hidden\" name=\"coppa_user\" value=\"{$data['coppa_user']}\" />\n\t\n\t<div id='register_info' class='right general_box'>\n\t\t" . ($this->settings['fbc_api_id'] ? "\n\t\t\t<h3 class='bar'>{$this->lang->words['reg_with_facebook']}</h3>\n\t\t\t<p>\n\t\t\t\t<div id='fbUserBox'>\n\t\t\t\t\t{$this->lang->words['log_with_facebook']}\n\t\t\t\t\t<br />\n\t\t\t\t\t<fb:login-button size=\"medium\" background=\"light\" length=\"long\" onlogin=\"ipb.facebook.register_loadUser();\"></fb:login-button>\n\t\t\t\t</div>\n\t\t\t\t<br clear='both' />\n\t\t\t</p>\n\t\t\t<br />\n\t\t" : "") . "\n\t\n\t\t<h3>{$this->lang->words['why_register']}</h3>\n\t\t{$this->settings['register_page_info']}\n\t</div>\n\t<div id='register_form' class='block_wrap left'>\n\t\t<h2>{$this->lang->words['ready_register']}</h2>\n\t\t\n\t\t<p class='extra'>\n\t\t\t{$this->lang->words['reg_free']}\n\t\t\t<br />\n\t\t\t{$this->lang->words['already_account']} <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login", 'public', ''), "", "") . "' title='{$this->lang->words['goto_signin']}'>{$this->lang->words['sign_in_page']}</a>\n\t\t\t<br />\n\t\t</p>\n\t\t" . (is_array($inline_errors) && ($inline_errors['username'] || $inline_errors['dname'] || $inline_errors['email'] || $inline_errors['password']) ? "\n\t\t\t<p class='message error'>{$this->lang->words['reg_errors_found']}</p>\t\n\t\t" : "") . "\n\t\t\n\t\t<div class='generic_bar'></div>\n\t\t<fieldset class='" . IPSLib::next($this->registry->templateStriping["register"]) . "'>\n\t\t\t<h3 class='bar'>{$this->lang->words['reg_step1']}</h3>\n\t\t\t\n\t\t\t<ul>\n\t\t\t\t" . ($data['requireName'] ? "<li class='field required " . ($inline_errors['username'] ? "error" : "") . "'>\n\t\t\t\t\t\t<label for='login_name'>{$this->lang->words['reg_choose_user']}</label>\n\t\t\t\t\t\t<input type='text' class='input_text' id='login_name' size='25' maxlength='{$this->settings['max_user_name_length']}' value='{$this->request['UserName']}' name='UserName' /><br />\n\t\t\t\t\t\t<span class='desc'>" . ($inline_errors['username'] ? "<span class='error'>{$inline_errors['username']}<br /></span>" : "") . "{$this->lang->words['char_cant_use']}</em></span>\n\t\t\t\t\t</li>" : "") . "\n\t\t\t\t" . (($this->settings['auth_allow_dnames'] == 1 or !$data['requireName']) ? "<li class='field required " . ($inline_errors['dname'] ? "error" : "") . "'>\n\t\t\t\t\t\t<label for='display_name'>{$this->lang->words['reg_choose_dname']}</label>\n\t\t\t\t\t\t<input type='text' class='input_text' id='display_name' size='25' maxlength='{$this->settings['max_user_name_length']}' value='{$this->request['members_display_name']}' name='members_display_name' /><br />\n\t\t\t\t\t\t<span class='desc'>" . ($inline_errors['dname'] ? "<span class='error'>{$inline_errors['dname']}<br /></span>" : "") . "{$this->lang->words['dname_desc_one']} {$this->settings['max_user_name_length']} {$this->lang->words['dname_desc_two']}</span>\n\t\t\t\t\t</li>" : "") . "\n\t\t\t</ul>\n\t\t\t<hr />\n\t\t\t<ul>\n\t\t\t\t<li class='field required " . ($inline_errors['email'] ? "error" : "") . "'>\n\t\t\t\t\t<label for='email_1'>{$this->lang->words['reg_enter_email']}</label>\n\t\t\t\t\t<input type='text' id='email_1' class='input_text email' size='25' maxlength='150' name='EmailAddress' value='{$this->request['EmailAddress']}' /><br />\n\t\t\t\t\t<span class='desc'>" . ($inline_errors['email'] ? "<span class='error'>{$inline_errors['email']}<br /></span>" : "") . "{$this->lang->words['reg_enter_email_desc']}</span>\n\t\t\t\t</li>\n\t\t\t\t<li class='field nodesc required'>\n\t\t\t\t\t<label for='email_2'>{$this->lang->words['reg_reenter_email']}</label>\n\t\t\t\t\t<input type='text' id='email_2' class='input_text email' size='25' maxlength='150' name='EmailAddress_two' value='{$this->request['EmailAddress_two']}' />\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<hr />\n\t\t\t<ul>\n\t\t\t\t<li class='field required " . ($inline_errors['password'] ? "error" : "") . "'>\n\t\t\t\t\t<label for='password_1'>{$this->lang->words['reg_choose_password']}</label>\n\t\t\t\t\t<input type='password' id='password_1' class='input_text password' size='25' maxlength='32' value='{$this->request['PassWord']}' name='PassWord' /><br />\n\t\t\t\t\t<span class='desc'>" . ($inline_errors['password'] ? "<span class='error'>{$inline_errors['password']}<br /></span>" : "") . "{$this->lang->words['reg_choose_password_desc']}</span>\n\t\t\t\t</li>\n\t\t\t\t<li class='field nodesc required'>\n\t\t\t\t\t<label for='password_2'>{$this->lang->words['reg_reenter_password']}</label>\n\t\t\t\t\t<input type='password' id='password_2' class='input_text password' size='25' maxlength='32' value='{$this->request['PassWord_Check']}' name='PassWord_Check' /><br />\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</fieldset>\n\t\t<fieldset class='" . IPSLib::next($this->registry->templateStriping["register"]) . "'>\n\t\t\t<h3 class='bar'>{$this->lang->words['reg_step2']}</h3>\n\t\t\t\n\t\t\t<ul>\n\t\t\t\t<li class='field checkbox'>\n\t\t\t\t\t<input type=\"checkbox\" name=\"allow_admin_mail\" id=\"allow_admin_mail\" value=\"1\" class=\"input_check\" " . ($this->request['allow_admin_mail'] || !isset($this->request['allow_admin_mail']) ? "checked='checked'" : "") . " />\n\t\t\t\t\t<label for='allow_admin_mail'>{$this->lang->words['receive_admin_emails']}</label>\n\t\t\t\t</li>\n\t\t\t\t<li class='field checkbox nodesc'>\n\t\t\t\t\t<input type=\"checkbox\" name=\"allow_member_mail\" id=\"allow_member_mail\" value=\"1\" class=\"input_check\" " . ($this->request['allow_member_mail'] ? "checked='checked'" : "") . " />\n\t\t\t\t\t<label for=\"allow_member_mail\">{$this->lang->words['receive_member_emails']}</label>\n\t\t\t\t</li>\n\t\t\t\t<li class='field'>\n\t\t\t\t\t<label for='timezone'>{$this->lang->words['time_zone']}</label>\n\t\t\t\t\t<select id='timezone' class='input_select' name='time_offset'>\n\t\t\t\t\t\t" . $this->__f__a3b8ffba08c0945e925e2f0127b9fdc2($general_errors, $data, $inline_errors, $time_select, $custom_fields) . "\t\t\t\t\t</select>\n\t\t\t\t</li>\n\t\t\t\t<li class='field checkbox'>\n\t\t\t\t\t<input type='checkbox' id='dst' name='dst' value='1' class='input_check' " . ($this->request['dst'] ? "checked='checked'" : "") . " /> <label for='dst' id='dst_label'>{$this->lang->words['auto_dst_detection']}</label>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</fieldset>\n\t\t" . (is_array($custom_fields['required']) && count($custom_fields['required']) || is_array($custom_fields['optional']) && count($custom_fields['optional']) ? "<fieldset class='" . IPSLib::next($this->registry->templateStriping["register"]) . "'>\n\t\t\t<h3 class='bar'>{$this->lang->words['reg_step3']}</h3>\n\t\t\t\n\t\t\t<ul>\n\t\t\t" . (is_array($custom_fields['required']) && count($custom_fields['required']) ? "\n\t\t\t\t" . $this->__f__36fcc0affb964a688761e1ed92abc6c7($general_errors, $data, $inline_errors, $time_select, $custom_fields) . "\t\t\t" : "") . "\n\t\t\t\n\t\t\t" . (is_array($custom_fields['optional']) && count($custom_fields['optional']) ? "\n\t\t\t\t" . $this->__f__c21d6e745dbee23939704485f1721779($general_errors, $data, $inline_errors, $time_select, $custom_fields) . "\t\t\t" : "") . "\n\t\t\t<!--{SUBS.MANAGER}-->\n\t\t\t<!--IBF.MODULES.EXTRA-->\n\t\t</fieldset>" : "") . "\n\t\t{$data['captchaHTML']}\n\t\t{$data['qandaHTML']}\n\t\t<fieldset class='submit'>\n\t\t\t<input type='submit' class='input_submit' value='{$this->lang->words['register']}' /> {$this->lang->words['or']} <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("", 'public', ''), "", "") . "' title='{$this->lang->words['cancel_link']}' class='cancel'>{$this->lang->words['cancel']}</a>\n\t\t</fieldset>\t\n\t</div>\n</form>\n<!--FB Template-->\n<div id='fb-template-main' style='display:none'>\n\t<div style='float:left; margin-right:4px;margin-bottom:3px'>\n\t\t<fb:profile-pic uid=loggedinuser facebook-logo=true></fb:profile-pic>\n\t</div>\n\t{$this->lang->words['fb_welcome']} <strong><fb:name uid=loggedinuser useyou=false></fb:name></strong>\n\t<div class='desc'>\n\t\t{$this->lang->words['fb_logged_in']}.\n\t\t<br clear='both'/>\n\t\t<br />\n\t\t{$this->lang->words['fb_reg_with']}\n\t\t<form action='{$this->settings['base_url']}app=core&module=global&section=login&do=fbc_loginWithNew' method='post' name='linkNewAccForm' id='fbc_linkNewAccForm'>\n\t\t\t<input type='button' class='input_submit' id='fbc_completeNewAcc' value='{$this->lang->words['fb_complete_reg']}' />\n\t\t</form>\n\t</div>\n</div>\n" . (IPSLib::fbc_enabled() === TRUE ? "\n<script src=\"http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n\t/* Init Facebook JS */\n\ttry\n\t{\n\t\tFB_RequireFeatures([\"XFBML\"], function()\n\t\t{\n\t\t\tFB.init(\"{$this->settings['fbc_api_id']}\", \"{$this->settings['fbc_xdlocation']}\" );\n\t\t\tFB.Facebook.get_sessionState().waitUntilReady(function()\n\t\t\t{\n\t\t\t\tFB.Connect.ifUserConnected( ipb.facebook.register_loadUser );\n\t\t\t} );\n\t\t} );\n\t}\n\tcatch( error )\n\t{\n\t\t//alert( error );\n\t}\n</script>\n" : "") . "";
return $IPBHTML;
}
示例12: showLogInForm
function showLogInForm($message = "", $referer = "", $extra_form = "", $login_methods = array(), $facebookOpts = array())
{
$IPBHTML = "";
$IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("signin", "0") . "\n" . $this->registry->getClass('output')->addJSModule("facebook", "0") . "\n<div id='login_form' class='clear'>\n\t\n\t<div id='member_login' class='left'>\n\t\t<h2 class='maintitle'>{$this->lang->words['log_in']}</h2>\n\t\t<div class='generic_bar'></div>\n\t\t<form action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login&do=process", 'public', ''), "", "") . "\" method=\"post\" id='login'>\n\t\t\t" . ($referer ? "\n\t\t\t<input type=\"hidden\" name=\"referer\" value=\"{$referer}\" />\n\t\t\t" : "") . "\n\t\t\t<div id='regular_signin'>\n\t\t\t\t<a id='_regularsignin'></a>\n\t\t\t\t<h3 class='bar'>{$this->lang->words['enter_name_and_pass']}</h3>\n\t\t\t\t<ul>\n\t\t\t\t\t<li class='field'>\n\t\t\t\t\t\t<label for='username'>{$this->lang->words['enter_name']}</label>\n\t\t\t\t\t\t<input id='username' type='text' class='input_text' name='username' size='25' />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class='field'>\n\t\t\t\t\t\t<label for='password'>{$this->lang->words['enter_pass']}</label>\n\t\t\t\t\t\t<input id='password' type='password' class='input_text' name='password' size='25' /><br />\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=lostpass", 'public', ''), "", "") . "' class='desc' title='{$this->lang->words['retrieve_pw']}'>{$this->lang->words['login_forgotten_pass']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t" . (in_array('openid', $login_methods) ? "\n\t\t\t\t<p class='extra'>" . $this->registry->getClass('output')->getReplacement("openid_small") . " {$this->lang->words['have_openid']} <a href='#_openid' title='{$this->lang->words['use_openid']}' id='openid_open'>{$this->lang->words['sign_in_here']}</a></p>\n\t\t\t\t" : "") . "\n\t\t\t\t" . (in_array('live', $login_methods) ? "\n\t\t\t\t<p class='extra'>" . $this->registry->getClass('output')->getReplacement("live_small") . " {$this->lang->words['have_msnlive']} <a href='#_live' title='{$this->lang->words['use_live']}' id='live_open'>{$this->lang->words['sign_in_here']}</a></p>\n\t\t\t\t" : "") . "\n\t\t\t\t" . ((is_array($extra_form) and count($extra_form)) ? "\n\t\t\t\t\t" . $this->__f__a3616e8d38944a1bbf49ffe53e71834a($message, $referer, $extra_form, $login_methods, $facebookOpts) . "\t\t\t\t" : "") . "\n\t\t\t</div>\n\t\t\t" . (in_array('openid', $login_methods) ? "\n\t\t\t<div id='openid_signin'>\n\t\t\t\t<a id='_openid'></a>\n\t\t\t\t<h3 class='bar'>{$this->lang->words['sign_in_openid']}</h3>\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("openid_large") . "\n\t\t\t\t<ul>\n\t\t\t\t\t<li class='field'>\n\t\t\t\t\t\t<label for='openid'>{$this->lang->words['openid']}</label>\n\t\t\t\t\t\t<input id='openid' type='text' class='input_text' name='openid_url' value='http://' size='30' /><br />\n\t\t\t\t\t\t<span class='desc'>{$this->lang->words['openid_example']}</span>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<p class='extra'>" . $this->registry->getClass('output')->getReplacement("signin_icon") . " <a href='#_regularsignin' title='{$this->lang->words['regular_signin']}' id='openid_close'>{$this->lang->words['use_regular']}</a></p>\n\t\t\t</div>\n\t\t\t" : "") . "\n\t\t\t" . (in_array('live', $login_methods) ? "\n\t\t\t<div id='live_signin'>\n\t\t\t\t<a id='_live'></a>\n\t\t\t\t<h3 class='bar'>{$this->lang->words['sign_in_winlive']}</h3>\n\t\t\t\t<ul>\n\t\t\t\t\t<li class='field'>\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login&do=process&use_live=1", 'public', ''), "", "") . "'>" . $this->registry->getClass('output')->getReplacement("live_large") . "</a> <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login&do=process&use_live=1", 'public', ''), "", "") . "'>{$this->lang->words['signin_with_live']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<p class='extra'>" . $this->registry->getClass('output')->getReplacement("signin_icon") . " <a href='#_regularsignin' title='{$this->lang->words['regular_signin']}' id='live_close'>{$this->lang->words['use_regular']}</a></p>\n\t\t\t</div>\n\t\t\t" : "") . "\n\t\t\t<hr />\n\t\t\t<fieldset id='signin_options'>\n\t\t\t\t<legend>{$this->lang->words['sign_in_options']}</legend>\n\t\t\t\t<ul>\n\t\t\t\t\t<li class='field checkbox'>\n\t\t\t\t\t\t<input type='checkbox' id='remember' checked='checked' name='rememberMe' value='1' class='input_check' />\n\t\t\t\t\t\t<label for='remember'>\n\t\t\t\t\t\t\t{$this->lang->words['rememberme']}<br />\n\t\t\t\t\t\t\t<span class='desc'>{$this->lang->words['notrecommended']}</span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</li>\n\t\t\t\t\t" . (!$this->settings['disable_anonymous'] ? "\n\t\t\t\t\t\t\n\t\t\t\t\t" : "") . "\n\t\t\t\t</ul>\n\t\t\t</fieldset>\n\t\t\t<fieldset class='submit'>\n\t\t\t\t<input type='submit' class='input_submit' value='{$this->lang->words['sign_in_button']}' /> {$this->lang->words['or']} <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("", 'public', ''), "", "") . "' title='{$this->lang->words['cancel']}' class='cancel'>{$this->lang->words['cancel']}</a>\n\t\t\t</fieldset>\n\t\t</form>\n\t</div>\n\t<div id='guest_register' class='right general_box'>\n\t\t" . (($this->settings['fbc_enable'] and $this->settings['fbc_api_id']) ? "\n\t\t\t<h3 class='bar'>{$this->lang->words['fb_login_title']}</h3>\n\t\t\t<p>\n\t\t\t\t<div id='fbUserBox'>\n\t\t\t\t\t{$this->lang->words['login_w_facebook']}\n\t\t\t\t\t<br />\n\t\t\t\t\t<fb:login-button size=\"medium\" background=\"light\" length=\"long\" onlogin=\"ipb.facebook.login_loadUser();\"></fb:login-button>\n\t\t\t\t</div>\n\t\t\t\t<br clear='both' />\n\t\t\t</p>\n\t\t\t<br />\n\t\t" : "") . "\n\t\t<h3 class='bar'>{$this->lang->words['not_a_member']}</h3>\n\t\t<p>\n\t\t\t{$this->settings['login_page_info']}\n\t\t</p>\n\t\t<br />\n\t\t<p style='text-align: center'>\n\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=register", 'public', ''), "", "section=register") . "'>{$this->lang->words['register_now']}</a>\n\t\t</p>\n\t</div>\n</div>\n<!--FB Template-->\n<div id='fb-template-main' style='display:none'>\n\t<div style='float:left; margin-right:4px;margin-bottom:3px'>\n\t\t<fb:profile-pic uid=loggedinuser facebook-logo=true></fb:profile-pic>\n\t</div>\n\t{$this->lang->words['welcome_prefix']} <strong><fb:name uid=loggedinuser useyou=false></fb:name></strong>\n</div>\n<div id='fb-template-notlinked' style='display:none'>\n\t<div class='desc'>\n\t\t{$this->lang->words['fb_logged_in']}\n\t\t<br clear='both'/>\n\t\t<br />{$this->lang->words['fb_no_forum_acct']}\n\t\t<br />\n\t\t<form action='{$this->settings['base_url']}app=core&module=global&section=login&do=fbc_loginWithNew' method='post' name='linkNewAccForm' id='fbc_linkNewAccForm'>\n\t\t\t<input type='button' class='input_submit' id='fbc_completeNewAcc' value='{$this->lang->words['fb_new_account']}' />\n\t\t</form>\n\t\t<br />\n\t\t<br />\n\t\t<strong>{$this->lang->words['or']}</strong> {$this->lang->words['fb_link_account']}\n\t\t<div class='message error' id='fbc_linkError' style='display:none'></div>\n\t\t<br />\n\t\t<form action='{$this->settings['base_url']}app=core&module=global&section=login&do=fbc_login' method='post' name='linkForm' id='fbc_linkForm'>\n\t\t{$this->lang->words['fb_link_email']} <input type='text' name='emailaddress' id='fbc_emailAddress' size='25' />\n\t\t<br />{$this->lang->words['fb_link_pass']} <input type='password' name='password' id='fbc_password' size='25' />\n\t\t<input type='button' class='input_submit' id='fbc_completeWithLink' value='{$this->lang->words['fb_link_complete']}' />\n\t\t</form>\n\t</div>\n</div>\n<div id='fb-template-linked' style='display:none'>\n\t<div class='desc'>\n\t\t{$this->lang->words['fb_logged_in']}\n\t</div>\n\t<br clear='both'/>\n\t<form action='{$this->settings['base_url']}app=core&module=global&section=login&do=fbc_loginFromLinked' method='post' name='linkAlreadyForm' id='fbc_linkAlreadyForm'>\n\t\t<input type='button' class='input_submit' id='fbc_complete' value='{$this->lang->words['fb_complete_login']}' />\n\t</form>\n</div>\n" . (IPSLib::fbc_enabled() === true ? "" . ($this->registry->output->isHTTPS ? "\n\t\t<script src=\"https://ssl.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php\" type=\"text/javascript\"></script>\n\t" : "\n\t\t<script src=\"http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php\" type=\"text/javascript\"></script>\n\t") . "\n<script type=\"text/javascript\">\n\t/* Init Facebook JS */\n\ttry\n\t{\n\t\tFB_RequireFeatures([\"XFBML\"], function()\n\t\t{\n\t\t\tFB.init(\"{$this->settings['fbc_api_id']}\", \"{$this->settings['fbc_xdlocation']}\" );\n\t\t\tFB.Facebook.get_sessionState().waitUntilReady(function()\n\t\t\t{\n\t\t\t\tFB.Connect.ifUserConnected( ipb.facebook.login_loadUser );\n\t\t\t} );\n\t\t} );\n\t}\n\tcatch( error )\n\t{\n\t\t//alert( error );\n\t}\n</script>" : "") . "";
return $IPBHTML;
}
示例13: statusUpdatesPage
function statusUpdatesPage($updates = array(), $pages = '')
{
$IPBHTML = "";
if (IPSLib::locationHasHooks('skin_profile', $this->_funcHooks['statusUpdatesPage'])) {
$count_b284dae10d4e778362b09ab9b5884953 = is_array($this->functionData['statusUpdatesPage']) ? count($this->functionData['statusUpdatesPage']) : 0;
$this->functionData['statusUpdatesPage'][$count_b284dae10d4e778362b09ab9b5884953]['updates'] = $updates;
$this->functionData['statusUpdatesPage'][$count_b284dae10d4e778362b09ab9b5884953]['pages'] = $pages;
}
$_first = reset($updates);
if (!isset($this->registry->templateStriping['recent_status'])) {
$this->registry->templateStriping['recent_status'] = array(FALSE, "row1", "row2 altrow");
}
$IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("status", "0") . "<h1 class='ipsType_pagetitle'>{$this->lang->words['status_updates__overview']}</h1>\n<br />\n<div id='status_standalone_page'>\n\t<div class='maintitle ipsFilterbar'>\n\t\t<ul class='ipsList_inline'>\n\t\t\t<li id='status_all' class='" . ((!$this->request['status_id'] and !$this->request['member_id'] and !$this->request['type'] or $this->request['type'] == 'all') ? "active" : "") . "'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=status&type=all", "public", ''), "true", "members_status_all") . "'>{$this->lang->words['status__all_updates']}</a></li>\n\t\t\t" . (($this->memberData['member_id'] and $this->settings['friends_enabled']) ? "<li id='status_all' class='tab_toggle " . ($this->request['type'] == 'friends' ? "active" : "") . "'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=status&type=friends", "public", ''), "true", "members_status_friends") . "'>{$this->lang->words['status__myfriends']}</a></li>" : "") . "" . ($this->request['member_id'] ? "\n\t\t\t\t<li id='status_by_id' class='active'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=status&type=memberall&member_id={$this->request['member_id']}", "public", ''), array($this->request['member_id'], $_first['members_seo_name']), "members_status_member_all") . "'>{$this->lang->words['status__membersupdats']}</a></li>\n\t\t\t" : "") . "" . ($this->request['status_id'] ? "\n\t\t\t\t<li id='status_by_sid' class='active'><a href='#'>{$this->lang->words['status__singleupdate']}</a></li>\n\t\t\t" : "") . "\n\t\t</ul>\n\t</div>\n\t" . (($this->memberData['member_id'] and $this->registry->getClass('memberStatus')->canCreate($this->memberData)) ? "<div class='status_update row2'>\n\t\t\t<form id='statusForm' action='{$this->settings['base_url']}app=members&module=profile&section=status&do=new&k={$this->member->form_hash}&id={$this->memberData['member_id']}' method='post'>\n\t\t\t<input type='text' id='statusUpdate_page' name='content' style='width:60%' class='input_text'> <input type='submit' class='ipsButton' id='statusSubmit_page' value='{$this->lang->words['gbl_post']}' />\n\t\t\t" . (((IPSLib::twitter_enabled() or IPSLib::fbc_enabled()) and ($this->memberData['fb_uid'] or $this->memberData['twitter_id'])) ? "<p class='desc' style='padding-top:5px;'>{$this->lang->words['st_update']}\n\t\t\t\t\t" . ((IPSLib::twitter_enabled() and $this->memberData['twitter_id']) ? "<input type='checkbox' id='su_Twitter' value='1' name='su_Twitter' /> <img src=\"{$this->settings['public_dir']}style_status/twitter.png\" style='vertical-align:top' alt='' />" : "") . "\n\t\t\t\t\t" . ((IPSLib::fbc_enabled() and $this->memberData['fb_uid']) ? "<input type='checkbox' id='su_Facebook' value='1' name='su_Facebook' /> <img src=\"{$this->settings['public_dir']}style_status/facebook.png\" style='vertical-align:top' alt='' />" : "") . "\n\t\t\t\t</p>" : "") . "\n\t\t\t</form>\n\t\t</div>" : "") . "\n\t<div id=\"status_wrapper\" class='ipsBox'>\n\t\t" . (count($updates) ? "\n\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('profile'), 'statusUpdates') ? $this->registry->getClass('output')->getTemplate('profile')->statusUpdates($updates) : '') . "\n\t\t" : "\n\t\t\t<p class='no-status'>{$this->lang->words['status_updates_none']}</p>\n\t\t") . "\n\t</div>\n\t" . ($pages ? "\n\t\t<div class='topic_controls clearfix'>\n\t\t\t{$pages}\n\t\t</div>\n\t" : "") . "\n</div>";
return $IPBHTML;
}
示例14: hookFacebookActivity
function hookFacebookActivity()
{
$IPBHTML = "";
if (IPSLib::locationHasHooks('skin_boards', $this->_funcHooks['hookFacebookActivity'])) {
$count_a56e3d36117d91564594c2642b33b42e = is_array($this->functionData['hookFacebookActivity']) ? count($this->functionData['hookFacebookActivity']) : 0;
}
$IPBHTML .= "" . (IPSLib::fbc_enabled() ? "\r\n<div class='general_box clearfix'>\r\n\t<h3>{$this->lang->words['hook_facebookactivity']}</h3>\r\n\t<div class='block_list clearfix _sbcollapsable'>\r\n\t\t<div><fb:activity site=\"\" width=\"270\" height=\"300\" header=\"false\" border_color=\"#FFF\" colorscheme=\"light\" /></div>\r\n\t</div>\r\n</div><div id=\"fb-root\"></div>\r\n<script>\r\n window.fbAsyncInit = function() {\r\n FB.init({appId: '{$this->settings['fbc_appid']}', status: true, cookie: true,\r\n xfbml: true});\r\n };\r\n (function() {\r\n var e = document.createElement('script'); e.async = true;\r\n e.src = document.location.protocol +\r\n '//connect.facebook.net/{$this->settings['fb_locale']}/all.js';\r\n document.getElementById('fb-root').appendChild(e);\r\n }());\r\n</script>\r\n" : "") . "";
return $IPBHTML;
}
示例15: canSocialShare
/**
* Determines if we can share socially or not
* @param string $method (If false, it'll check all services and return true of one or more allow it) facebook/twitter
* @param array $memberData
*/
public static function canSocialShare($method = false, $memberData = null)
{
$memberData = $memberData === null ? ipsRegistry::member()->fetchMemberData() : $memberData;
if ($method == false) {
$method = array('twitter', 'facebook');
} else {
if (is_string($method)) {
$method = array($method);
}
}
$canShare = false;
if (is_array($method)) {
foreach ($method as $s) {
switch ($s) {
case 'twitter':
$canShare = (IPSLib::twitter_enabled() and $memberData['twitter_token']) ? true : false;
break;
case 'facebook':
$canShare = (IPSLib::fbc_enabled() and $memberData['fb_token']) ? true : false;
break;
}
if ($canShare === true) {
return true;
}
}
}
return $canShare;
}