function globalTemplate($html, $documentHeadItems, $css, $jsModules, $metaTags, array $header_items, $items = array(), $footer_items = array(), $stats = array())
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_global', $this->_funcHooks['globalTemplate'])) {
         $count_6d58bb86eb76915f3220063aef01c91c = is_array($this->functionData['globalTemplate']) ? count($this->functionData['globalTemplate']) : 0;
         $this->functionData['globalTemplate'][$count_6d58bb86eb76915f3220063aef01c91c]['html'] = $html;
         $this->functionData['globalTemplate'][$count_6d58bb86eb76915f3220063aef01c91c]['documentHeadItems'] = $documentHeadItems;
         $this->functionData['globalTemplate'][$count_6d58bb86eb76915f3220063aef01c91c]['css'] = $css;
         $this->functionData['globalTemplate'][$count_6d58bb86eb76915f3220063aef01c91c]['jsModules'] = $jsModules;
         $this->functionData['globalTemplate'][$count_6d58bb86eb76915f3220063aef01c91c]['metaTags'] = $metaTags;
         $this->functionData['globalTemplate'][$count_6d58bb86eb76915f3220063aef01c91c]['header_items'] = $header_items;
         $this->functionData['globalTemplate'][$count_6d58bb86eb76915f3220063aef01c91c]['items'] = $items;
         $this->functionData['globalTemplate'][$count_6d58bb86eb76915f3220063aef01c91c]['footer_items'] = $footer_items;
         $this->functionData['globalTemplate'][$count_6d58bb86eb76915f3220063aef01c91c]['stats'] = $stats;
     }
     $this->did_first = 0;
     $this->did_first_bottom = 0;
     $IPBHTML .= "<!DOCTYPE html>\n\t<html lang=\"en\" " . (IPSLib::fbc_enabled() === TRUE || $this->settings['fbc_appid'] ? " xmlns:fb=\"http://www.facebook.com/2008/fbml\"" : "") . ">\n\t<head>\n\t\t<meta charset=\"{$this->settings['gb_char_set']}\" />\n\t\t<title>{$header_items['title']}</title>\n\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\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\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: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=device-width;\">-->\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'>\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'>\n\t\t\t<!-- ::: TOP BAR: Sign in / register or user drop down and notification alerts ::: -->\n\t\t\t<div id='header_bar' class='clearfix'>\n\t\t\t\t<div class='main_width'>\n\t\t\t\t\t" . (($this->memberData['is_mod'] or !empty($this->memberData['access_report_center']) || ($this->memberData['g_access_cp'] and !$this->settings['security_remove_acp_link'])) ? "<ul id='admin_bar' class='ipsList_inline left'>\n\t\t\t\t\t\t\t" . (($this->memberData['g_access_cp'] and !$this->settings['security_remove_acp_link']) ? "\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href=\"{$this->settings['_admin_link']}\" title='{$this->lang->words['admin_cp']}' target=\"_blank\">{$this->lang->words['login_to_acp']}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=modcp", "public", ''), "", "") . "\" title='{$this->lang->words['gbl_modcp_link_title']}'>{$this->lang->words['gbl_modcp_link']}</a></li>\n\t\t\t\t\t\t\t" . ($this->memberData['access_report_center'] && $this->memberData['_cache']['report_num'] > 0 ? "\n\t\t\t\t\t\t\t\t<li class='active'>\n\t\t\t\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=reports&amp;do=index", "public", ''), "", "") . "\" title='{$this->lang->words['view_reports']}'>{$this->memberData['_cache']['report_num']} {$this->lang->words['report_member_bar']}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t</ul>" : "") . "\n\t\t\t\t\t" . ($this->memberData['member_id'] ? "<div id='user_navigation' class='logged_in'>\n\t\t\t\t\t\t\t<ul class='ipsList_inline right'>\n\t\t\t\t\t\t\t\t" . (!(!$this->memberData['member_id'] && $this->settings['force_login']) && !($this->settings['board_offline'] && !$this->memberData['g_access_offline']) ? "" . (($this->memberData['g_use_pm'] and $this->memberData['members_disable_pm'] == 0) ? "<li><a data-clicklaunch=\"getInboxList\" id='inbox_link' href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=messaging", "public", ''), "", "") . "' title='{$this->lang->words['your_messenger']}'>" . ($this->memberData['msg_count_new'] ? "<span class='ipsHasNotifications'>{$this->memberData['msg_count_new']}</span>" : "") . "&nbsp;</a></li>" : "") . "\n\t\t\t\t\t\t\t\t\t<li><a data-clicklaunch=\"getNotificationsList\" id='notify_link' href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=usercp&amp;area=notificationlog", "public", ''), "", "") . "\" title=\"{$this->lang->words['notifications_at_the_top']}\">" . ($this->memberData['notification_cnt'] ? "<span class='ipsHasNotifications'>{$this->memberData['notification_cnt']}</span>" : "") . "&nbsp;</a></li>" : "") . "\n\t\t\t\t\t\t\t\t<li><a id='user_link' 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']} &nbsp;<span id='user_link_dd'></span></a></li>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=login&amp;do=logout&amp;k={$this->member->form_hash}", "public", ''), "", "") . "\" title='{$this->lang->words['log_out']}'>{$this->lang->words['log_out']}</a></li>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t" . ($this->memberData['member_group_id'] == $this->settings['auth_group'] ? "" . ($this->memberData['ipsconnect_revalidate_url'] ? "\n\t\t\t\t\t\t\t\t\t\t<li>&nbsp;&nbsp;&nbsp;<a href=\"{$this->memberData['ipsconnect_revalidate_url']}\" target='_blank' title='{$this->lang->words['resend_val']}'>{$this->lang->words['resend_val']}</a></li>\n\t\t\t\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t\t\t\t<li>&nbsp;&nbsp;&nbsp;<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=register&amp;do=reval", "public", ''), "", "") . "\" title='{$this->lang->words['resend_val']}'>{$this->lang->words['resend_val']}</a></li>\n\t\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\t<!-- ::: USER DROP DOWN MENU ::: -->\n\t\t\t\t\t\t<div id='user_link_menucontent' class='ipsHeaderMenu clearfix boxShadow' style='display: none'>\n\t\t\t\t\t\t\t<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']}' class='ipsUserPhotoLink left'>\n\t\t\t\t\t\t\t\t<img src='{$this->memberData['pp_small_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $this->memberData['members_display_name']) . "\" class='ipsUserPhoto ipsUserPhoto_medium photo' />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class='left'>\n\t\t\t\t\t\t\t\t" . ($this->registry->getClass('memberStatus')->canCreate($this->memberData) && !($this->settings['board_offline'] && !$this->memberData['g_access_offline']) ? "<form id='statusForm' action='{$this->settings['base_url']}app=members&amp;module=profile&amp;section=status&amp;do=new&amp;k={$this->member->form_hash}&amp;id={$this->memberData['member_id']}' method='post'>\n\t\t\t\t\t\t\t\t\t\t<input type='text' id='statusUpdateGlobal' name='content' class='input_text' style='width: 97%' /><br />\n\t\t\t\t\t\t\t\t\t\t<input type='submit' id='statusSubmitGlobal' class='ipsButton_secondary' value='{$this->lang->words['global_update_status']}' />\n\t\t\t\t\t\t\t\t\t\t" . (((IPSLib::twitter_enabled() or IPSLib::fbc_enabled()) and ($this->memberData['fb_uid'] or $this->memberData['twitter_id'])) ? "&nbsp;&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t" . ((IPSLib::twitter_enabled() and $this->memberData['twitter_id']) ? "<input type='checkbox' id='su_TwitterGlobal' value='1' name='su_Twitter' /> <label for='su_TwitterGlobal' class='desc ipsType_smaller'>{$this->lang->words['su_cb_twitter']}</label>" : "") . " &nbsp; \n\t\t\t\t\t\t\t\t\t\t\t" . ((IPSLib::fbc_enabled() and $this->memberData['fb_uid']) ? "&nbsp;<input type='checkbox' id='su_FacebookGlobal' value='1' name='su_Facebook' /> <label for='su_FacebookGlobal' class='desc ipsType_smaller'>{$this->lang->words['su_cb_facebook']}</label>" : "") . "" : "") . "\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t\t\t\t</form>" : "") . "\n\t\t\t\t\t\t\t\t\t<ul id='links'>\n\t\t\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\t\t<li id='user_ucp'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;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\t\t<li id='user_content'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=search&amp;do=user_activity&amp;mid={$this->memberData['member_id']}", "public", ''), "", "") . "\" title=\"{$this->lang->words['my_content_link']}\">{$this->lang->words['my_content_link']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" . (count(IPSLib::getEnabledApplications('like')) ? "\n\t\t\t\t\t\t\t\t\t\t\t<li id='user_likes'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=search&amp;do=followed", "public", ''), "", "") . "' title='{$this->lang->words['your_likes']}'>{$this->lang->words['your_likes']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t" . ($this->settings['friends_enabled'] && $this->memberData['g_can_add_friends'] ? "\n\t\t\t\t\t\t\t\t\t\t\t<li id='user_friends'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=profile&amp;section=friends&amp;do=list", "public", ''), "", "") . "' title=\"{$this->lang->words['manage_friends']}\" class='manage_friends'>{$this->lang->words['manage_friends']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t<li id='user_enemies'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=usercp&amp;tab=core&amp;area=ignoredusers", "public", ''), "", "") . "' title=\"{$this->lang->words['manage_ignored_users']}\" class='manage_enemies'>{$this->lang->words['manage_ignored_users']}</a></li>\n\t\t\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\t\t<li id='user_blog'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&amp;module=manage", "public", ''), "false", "manageblog") . "\">{$this->lang->words['manage_blogs']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t" . ($this->memberData['members_disable_pm'] != 2 && $this->memberData['g_use_pm'] ? "\n\t\t\t\t\t\t\t\t\t\t\t<li id='user_pm'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=messaging", "public", ''), "", "") . "\">{$this->lang->words['user_dd_go_pm']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\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\t\t<li id='user_gallery'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&amp;user={$this->memberData['member_id']}", "public", ''), "{$this->memberData['members_seo_name']}", "useralbum") . "' title=\"{$this->lang->words['go_to_my_gallery']}\">{$this->lang->words['my_gallery']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t" . (IPSLib::appIsInstalled('nexus') ? "\n\t\t\t\t\t\t\t\t\t\t\t<li id='user_nexus'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=nexus&amp;module=clients", "public", ''), "", "") . "' title=\"{$this->lang->words['client_area']}\">{$this->lang->words['client_area']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>" : "<div id='user_navigation' class='not_logged_in'>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<ul class='ipsList_inline right'>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<span class='services'>\n\t\t\t\t\t\t\t\t\t\t" . (IPSLib::loginMethod_enabled('facebook') ? "\n\t\t\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=login&amp;serviceClick=facebook", "public", ''), "", "") . "'>" . $this->registry->getClass('output')->getReplacement("lim_facebook") . "</a>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t" . (IPSLib::loginMethod_enabled('twitter') ? "\n\t\t\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=login&amp;serviceClick=twitter", "public", ''), "", "") . "'>" . $this->registry->getClass('output')->getReplacement("lim_twitter") . "</a>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t" . (IPSLib::loginMethod_enabled('live') ? "\n\t\t\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=login&amp;do=process&amp;use_live=1&amp;auth_key={$this->member->form_hash}", "public", ''), "", "") . "'>" . $this->registry->getClass('output')->getReplacement("lim_windows") . "</a>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;\n\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=login", "public", ''), "", "") . "' title='{$this->lang->words['sign_in']}' id='sign_in'>{$this->lang->words['sign_in']}</a>&nbsp;&nbsp;&nbsp;\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=register", "public", ''), "", "") . "\" title='{$this->lang->words['register']}' id='register_link'>{$this->lang->words['register']}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>") . "\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- ::: BRANDING STRIP: Logo and search box ::: -->\n\t\t\t<div id='branding'>\n\t\t\t\t<div class='main_width'>\n\t\t\t\t\t<div id='logo'>\n\t\t\t\t\t\t" . (ipsRegistry::$applications[$this->registry->getCurrentApplication()]['hasCustomHeader'] ? "\n\t\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('' . $this->registry->getCurrentApplication() . '_global'), 'overwriteHeader') ? $this->registry->getClass('output')->getTemplate('' . $this->registry->getCurrentApplication() . '_global')->overwriteHeader() : '') . "\n\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'defaultHeader') ? $this->registry->getClass('output')->getTemplate('global')->defaultHeader() : '') . "\n\t\t\t\t\t\t") . "\n\t\t\t\t\t</div>\n\t\t\t\t\t" . ($this->memberData['g_use_search'] && $this->settings['allow_search'] ? "\n\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'quickSearch') ? $this->registry->getClass('output')->getTemplate('global')->quickSearch() : '') . "\n\t\t\t\t\t" : "") . "\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- ::: APPLICATION TABS ::: -->\n\t\t\t<div id='primary_nav' class='clearfix'>\n\t\t\t\t<div class='main_width'>\n\t\t\t\t\t<ul class='ipsList_inline' id='community_app_menu'>\n\t\t\t\t\t\t" . (!(!$this->memberData['member_id'] && $this->settings['force_login']) && !($this->settings['board_offline'] && !$this->memberData['g_access_offline']) && $this->memberData['g_view_board'] ? "\n\t\t\t\t\t\t\t<li class='right'>\n\t\t\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=navigation&amp;inapp=" . IPS_APP_COMPONENT . "", "public", ''), "", "") . "\" rel=\"quickNavigation\" accesskey='9' id='quickNavLaunch' title='{$this->lang->words['launch_quicknav']}'><span>&nbsp;</span></a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t<li id='nav_explore' class='right'>\n\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=search&amp;do=viewNewContent&amp;search_app=" . (($this->registry->getCurrentApplication() != 'core' and IPSLib::appIsSearchable($this->registry->getCurrentApplication())) ? "{$this->registry->getCurrentApplication()}" : "forums") . "", "public", ''), "", "") . "' accesskey='2' title='{$this->lang->words['view_new_posts']}'>{$this->lang->words['view_new_posts']}</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t" . (($this->settings['home_url'] and $this->settings['home_name']) ? "\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" . (!empty($header_items['primary_navigation_menu']) ? "\n\t\t\t\t\t\t\t{$header_items['primary_navigation_menu']}\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\t" . $this->__f__a62585487074a52c6628d82c3876e110($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t\t" : "") . "") . "\n\t\t\t\t\t\t<li id='nav_other_apps' style='display: none'>\n\t\t\t\t\t\t\t<a href='#' class='ipbmenu' id='more_apps'>{$this->lang->words['more_apps']} <img src='{$this->settings['img_url']}/useropts_arrow.png' /></a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\t\n\t\t\t\n\t\t\t<!-- ::: MAIN CONTENT AREA ::: -->\n\t\t\t<div id='content' class='clearfix'>\n\t\t\t\t<!-- ::: NAVIGATION BREADCRUMBS ::: -->\n\t\t\t\t" . (count($items['navigation']) ? "<div id='secondary_navigation' class='clearfix'>\n\t\t\t\t\t\t<ol class='breadcrumb top ipsList_inline left'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . ((!$this->settings['remove_forums_nav'] or ipsRegistry::$current_application == 'forums') ? "<li itemscope itemtype=\"http://data-vocabulary.org/Breadcrumb\">\n\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("act=idx", "public", ''), "false", "") . "' itemprop=\"url\">\n\t\t\t\t\t\t\t\t\t\t<span itemprop=\"title\">{$this->settings['board_name']}</span>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t" . (($this->did_first = 1) ? "" : "") . "" : "") . "\n\t\t\t\t\t\t\t" . $this->__f__0d4c6f6af396c9b3b3363a4c475d9a7f($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t</ol>\n\t\t\t\t\t</div>\n\t\t\t\t\t<br />" : "") . "\n\t\t\t\t<noscript>\n\t\t\t\t\t<div class='message error'>\n\t\t\t\t\t\t<strong>{$this->lang->words['gbl_no_js_title']}</strong>\n\t\t\t\t\t\t<p>{$this->lang->words['gbl_no_js']}</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<br />\n\t\t\t\t</noscript>\n\t\t\t\t<!-- ::: CONTENT ::: -->\n\t\t\t\t" . ($items['adHeaderCode'] ? "\n\t\t\t\t\t<div class='ipsAd'>{$items['adHeaderCode']}</div>\n\t\t\t\t" : "") . "\n\t\t\t\t" . ($html ? "{$html}" : "") . "\n\t\t\t\t" . ($items['adFooterCode'] ? "\n\t\t\t\t\t<div class='ipsAd'>{$items['adFooterCode']}</div>\n\t\t\t\t" : "") . "\n\t\t\t\t<ol class='breadcrumb bottom ipsList_inline left clearfix clear'>\n\t\t\t\t\t" . (count($items['navigation']) ? "\t\t\t\t\t\t" . ((!$this->settings['remove_forums_nav'] or ipsRegistry::$current_application == 'forums') ? "<li><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_bottom = 1) ? "" : "") . "" : "") . "\n\t\t\t\t\t\t" . $this->__f__fca2d91bf1367c001172b67788f657a7($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "" : "\n\t\t\t\t\t\t<li>&nbsp;</li>\n\t\t\t\t\t") . "\n\t\t\t\t\t" . ($this->settings['priv_title'] ? "\n\t\t\t\t\t<li class='right ipsType_smaller'>\n\t\t\t\t\t\t<a rel=\"nofollow\" href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=privacy", "public", ''), "false", "privacy") . "'>{$this->settings['priv_title']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t" : "") . "\n\t\t\t\t\t" . (($this->settings['gl_show'] and $this->settings['gl_title']) ? "<li class='right ipsType_smaller'>\n\t\t\t\t\t\t\t<a href='" . ($this->settings['gl_link'] ? "{$this->settings['gl_link']}" : "" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=boardrules", "public", ''), "", "") . "") . "' title='" . ($this->settings['gl_title'] ? "{$this->settings['gl_title']}" : "{$this->lang->words['board_rules']}") . "'>" . ($this->settings['gl_title'] ? "{$this->settings['gl_title']}" : "{$this->lang->words['board_rules']}") . "</a>" . ($this->settings['priv_title'] ? " &middot; " : "") . "\n\t\t\t\t\t\t</li>" : "") . "\t\n\t\t\t\t</ol>\n\t\t\t</div>\n\t\t\t<!-- ::: FOOTER (Change skin, language, mark as read, etc) ::: -->\n\t\t\t<div id='footer_utilities' class='main_width clearfix clear'>\n\t\t\t\t<a rel=\"nofollow\" href='#top' id='backtotop' title='{$this->lang->words['go_to_top']}'><img src='{$this->settings['img_url']}/top.png' alt='' /></a>\n\t\t\t\t<ul class='ipsList_inline left'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<img src='{$this->settings['img_url']}/feed.png' alt='{$this->lang->words['rss_feed']}' id='rss_feed' class='clickable' />\n\t\t\t\t\t</li>\n\t\t\t\t\t" . (!$this->member->is_not_human ? "" . (($this->memberData['userAgentLocked'] and !$this->memberData['userAgentBypass']) ? "\n\t\t\t\t\t\t\t<li id='useragent_msg'>\n\t\t\t\t\t\t\t\t{$this->lang->words['skin_browser_set']} <a href='#' data-clicklaunch='changeSkin' data-skinid='unlockUserAgent'>{$this->lang->words['override_browser_theme']}</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t" : "" . ($this->registry->output->isTouchDevice() ? "\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<a href='#' data-clicklaunch='changeSkin' data-skinid='setAsMobile'>{$this->lang->words['set_mobile_theme']}</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . (count($footer_items['skin_chooser']) > 1 ? "\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a rel=\"nofollow\" id='new_skin' href='#' title='{$this->lang->words['change_theme']}'>{$this->lang->words['change_theme']}</a>\t\t\t\n\t\t\t\t\t\t\t\t\t<ul id='new_skin_menucontent' class='ipbmenu_content with_checks' style='display: none'>\n\t\t\t\t\t\t\t\t\t\t" . $this->__f__1156e151a7185db1131bc7d8e3f6b51b($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t" : "") . "") . "" : "") . "\n\t\t\t\t\t" . (!$this->member->is_not_human && count($footer_items['lang_chooser']['options']) > 1 ? "\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a rel=\"nofollow\" href='#' id='new_language'>{$footer_items['lang_chooser']['default']}</a>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<ul id='new_language_menucontent' class='ipbmenu_content with_checks' style='display: none'>\n\t\t\t\t\t\t\t\t" . $this->__f__e05dd4b97e748ba89c1cd676e08a9337($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t" : "") . "\n\t\t\t\t\t" . (!$this->member->is_not_human && ($this->memberData['member_id'] || $this->settings['topic_marking_guests']) ? "\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a rel=\"nofollow\" id='mark_all_read' href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=forums&amp;section=markasread&amp;marktype=all&amp;k={$this->member->form_hash}", "public", ''), "", "") . "\" title='{$this->lang->words['mark_all_as_read']}'>{$this->lang->words['mark_board_as_read']}</a>\n\t\t\t\t\t\t\t<ul id='mark_all_read_menucontent' class='ipbmenu_content' style='display: none'>\n\t\t\t\t\t\t\t\t" . $this->__f__7f370447b0b396d1c2920623a517e34c($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=forums&amp;section=markasread&amp;marktype=all&amp;k={$this->member->form_hash}", "public", ''), "", "") . "\"><strong>{$this->lang->words['mark_all_as_read']}</strong></a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t" : "") . "\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=help", "public", ''), "", "") . "\" title='{$this->lang->words['view_help']}' rel=\"help\" accesskey='6'>{$this->lang->words['sj_help']}</a>\n\t\t\t\t\t</li>\t\t\t\t\n\t\t\t\t</ul>\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']}&amp;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{$stats['task']}\n\t\t\t" . ($this->settings['do_include_lightbox_real'] ? "\n\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'include_lightbox_real') ? $this->registry->getClass('output')->getTemplate('global')->include_lightbox_real() : '') . "\n\t\t\t" : "\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tipb.global.lightBoxIsOff();\n\t\t\t\t</script>\n\t\t\t") . "\n\t\t\t" . (!$this->memberData['member_id'] ? "" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'inlineLogin') ? $this->registry->getClass('output')->getTemplate('global')->inlineLogin() : '') . "" : "") . "\n\t\t</div>\n\t\t\n\t\t<!--DEBUG_STATS-->\n\t\t<script type='text/javascript'>\n\t\t\tif( \$('primary_nav') ){\tipb.global.activateMainMenu(); }\n\t\t</script>\n\t\t" . (($this->settings['viglink_enabled'] and (!$this->settings['viglink_groups'] or IPSMember::isInGroup($this->memberData, explode(',', $this->settings['viglink_groups'])))) ? "<script type=\"text/javascript\">\n\t\t\t  var vglnk = { api_url: '//api.viglink.com/api',\n\t\t\t                key: '{$this->settings['viglink_api_key']}'" . ($this->settings['viglink_subid'] ? ",\n\t\t\t                sub_id: '{$this->settings['sub_id']}'\n\t\t\t                " : "") . "\n\t\t\t              };\n\t\t\t\n\t\t\t  (function(d, t) {\n\t\t\t    var s = d.createElement(t); s.type = 'text/javascript'; s.async = true;\n\t\t\t    s.src = ('https:' == document.location.protocol ? vglnk.api_url :\n\t\t\t             '//cdn.viglink.com/api') + '/vglnk.js';\n\t\t\t    var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r);\n\t\t\t  }(document, 'script'));\n\t\t\t</script>" : "") . "\t</body>\n</html>";
     return $IPBHTML;
 }
Beispiel #2
0
 /**
  * Returns the editor for viewing ...
  * @param unknown_type $member
  */
 public function getEditorHtml(array $member)
 {
     /* Fetch member data */
     $member = IPSMember::buildDisplayData(IPSMember::load($member['member_id'], 'all'));
     $p_w = "";
     $p_h = "";
     $cur_photo = "";
     $rand = urlencode(microtime());
     $data = array('currentPhoto' => array('tag' => ''), 'custom' => array('tag' => ''), 'gravatar' => array('tag' => ''), 'twitter' => array('tag' => ''));
     /* Photo type */
     $data['type'] = $member['pp_photo_type'] = $this->getPhotoType($member);
     /* Got gravatar? */
     $member['pp_gravatar'] = $member['pp_gravatar'] ? $member['pp_gravatar'] : $member['email'];
     /* Quick permission check */
     if (!IPSMember::canUploadPhoto($member, TRUE)) {
         return false;
     }
     /* Set the current photo */
     $data['currentPhoto']['tag'] = IPSMember::buildProfilePhoto($member, 'full', IPS_MEMBER_PHOTO_NO_CACHE);
     /* Set up custom */
     $data['custom']['tag'] = $member['pp_photo_type'] != 'custom' ? IPSMember::buildNoPhoto($member, 'thumb', false, true) : "<img src='" . $member['pp_thumb_photo'] . '?__rand=' . $rand . "' width='" . $member['pp_thumb_width'] . "' height='" . $member['pp_thumb_height'] . "' />";
     /* Set up Gravatar */
     $data['gravatar']['tag'] = "<img src='http://www.gravatar.com/avatar/" . md5($member['pp_gravatar']) . "?s=100' alt='' />";
     /* Twitter linked? */
     if (IPSLib::twitter_enabled() && $member['twitter_token'] && $member['twitter_secret']) {
         $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/twitter/connect.php', 'twitter_connect');
         $twitter = new $classToLoad($this->registry, $member['twitter_token'], $member['twitter_secret']);
         $userData = $twitter->fetchUserData();
         if ($userData['profile_image_url']) {
             $data['twitter']['tag'] = "<img src='" . str_replace('_normal.', '.', $userData['profile_image_url']) . "' />";
         }
     }
     /* Facebook linked? */
     if (IPSLib::fbc_enabled() && $member['fb_uid']) {
         $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/facebook/connect.php', 'facebook_connect');
         $facebook = new $classToLoad($this->registry);
         /* Now get the linked user */
         $linkedMemberData = IPSMember::load(intval($member['fb_uid']), 'all', 'fb_uid');
         $userData = $facebook->fetchUserData();
         if ($userData['pic_big']) {
             $data['facebook']['tag'] = "<img src='" . $userData['pic_big'] . "' />";
         } else {
             if ($userData['pic']) {
                 $data['facebook']['tag'] = "<img src='" . $userData['pic'] . "' />";
             }
         }
     }
     $this->uploadFormMax = 5000 * 1024;
     return $this->registry->getClass('output')->getTemplate('profile')->photoEditor($data, $member);
 }
Beispiel #3
0
 /**
  * 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&amp;module=profile&amp;section=status&amp;type=single&amp;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);
         }
     }
 }
 /**
  * UserCP Save Form: Twitter
  *
  * @return	array	Errors
  */
 public function saveTwitter()
 {
     if (!IPSLib::twitter_enabled()) {
         $this->registry->getClass('output')->showError('twitter_disabled', 1005.2);
     }
     //-----------------------------------------
     // Data
     //-----------------------------------------
     $toSave = IPSBWOptions::thaw($this->memberData['tc_bwoptions'], 'twitter');
     //-----------------------------------------
     // Loop and save... simple
     //-----------------------------------------
     foreach (array('tc_s_pic', 'tc_s_status', 'tc_s_aboutme', 'tc_s_bgimg', 'tc_si_status') as $field) {
         $toSave[$field] = intval($this->request[$field]);
     }
     $this->memberData['tc_bwoptions'] = IPSBWOptions::freeze($toSave, 'twitter');
     $return = IPSMember::save($this->memberData['member_id'], array('extendedProfile' => array('tc_bwoptions' => $this->memberData['tc_bwoptions'])));
     //-----------------------------------------
     // Now sync
     //-----------------------------------------
     $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/twitter/connect.php', 'twitter_connect');
     $twitter = new $classToLoad($this->registry, $this->memberData['twitter_token'], $this->memberData['twitter_secret']);
     try {
         $twitter->syncMember($this->memberData);
     } catch (Exception $error) {
         $msg = $error->getMessage();
         switch ($msg) {
             case 'NOT_LINKED':
             case 'NO_MEMBER':
                 break;
         }
     }
     return TRUE;
 }
Beispiel #5
0
 /**
  * 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'])));
     }
 }
 /**
  * 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;
 }
 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&amp;module=profile&amp;section=status&amp;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&amp;module=profile&amp;section=status&amp;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&amp;module=profile&amp;section=status&amp;type=memberall&amp;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&amp;module=profile&amp;section=status&amp;do=new&amp;k={$this->member->form_hash}&amp;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;
 }
Beispiel #8
0
 /**
  * Post a status update to twitter
  *
  * @access	public
  * @return	mixed		status id (int) successful, FALSE, #ftl
  */
 public function updateStatus($text)
 {
     if (IPSLib::twitter_enabled() && $text and $this->isConnected()) {
         $status = $this->_api->post('statuses/update', array('status' => IPSText::convertCharsets($text, IPS_DOC_CHAR_SET, 'utf-8')));
         $code = $this->_api->http_code;
         /* 200 is OK, 403 is returned if API limit is hit */
         if ($code == 200 and $status['id_str']) {
             /* Update member */
             if ($this->memberData['member_id']) {
                 /* Update member */
                 IPSMember::save($this->memberData['member_id'], array('extendedProfile' => array('tc_last_sid_import' => $status['id_str'])));
             }
             return $status['id_str'];
         } else {
             return false;
         }
     }
     return false;
 }
 function globalTemplate($html, $documentHeadItems, $css, $jsModules, $metaTags, array $header_items, $items = array(), $footer_items = array(), $stats = array())
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_global', $this->_funcHooks['globalTemplate'])) {
         $count_68e2005a22cac3c53b26528c84a70bfd = is_array($this->functionData['globalTemplate']) ? count($this->functionData['globalTemplate']) : 0;
         $this->functionData['globalTemplate'][$count_68e2005a22cac3c53b26528c84a70bfd]['html'] = $html;
         $this->functionData['globalTemplate'][$count_68e2005a22cac3c53b26528c84a70bfd]['documentHeadItems'] = $documentHeadItems;
         $this->functionData['globalTemplate'][$count_68e2005a22cac3c53b26528c84a70bfd]['css'] = $css;
         $this->functionData['globalTemplate'][$count_68e2005a22cac3c53b26528c84a70bfd]['jsModules'] = $jsModules;
         $this->functionData['globalTemplate'][$count_68e2005a22cac3c53b26528c84a70bfd]['metaTags'] = $metaTags;
         $this->functionData['globalTemplate'][$count_68e2005a22cac3c53b26528c84a70bfd]['header_items'] = $header_items;
         $this->functionData['globalTemplate'][$count_68e2005a22cac3c53b26528c84a70bfd]['items'] = $items;
         $this->functionData['globalTemplate'][$count_68e2005a22cac3c53b26528c84a70bfd]['footer_items'] = $footer_items;
         $this->functionData['globalTemplate'][$count_68e2005a22cac3c53b26528c84a70bfd]['stats'] = $stats;
     }
     $this->did_first = 0;
     $IPBHTML .= "<!DOCTYPE html>\n\t<html lang=\"en\" " . (IPSLib::fbc_enabled() === TRUE || $this->settings['fbc_appid'] ? " xmlns:fb=\"http://www.facebook.com/2008/fbml\"" : "") . ">\n\t<head>\n\t\t<meta charset=\"{$this->settings['gb_char_set']}\" />\n\t\t<title>{$header_items['title']}</title>\n\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n\t\t<link rel=\"shortcut icon\" href='" . ($this->registry->output->isHTTPS ? "{$this->settings['board_url_https']}" : "{$this->settings['board_url']}") . "/favicon.ico' />\n                <link href=\"http://fonts.googleapis.com/css?family=Oswald|Droid+Sans:400,700\" rel=\"stylesheet\">\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\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: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=device-width;\">-->\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) : '') . "" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'audentio_config') ? $this->registry->getClass('output')->getTemplate('global')->audentio_config() : '') . "\n\t\t\n\n\t</head>\n\t<body id='ipboard_body'>\n\t\t\n<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'>\n<!-- ::: USER BAR: Sign in / register or user drop down and notification alerts ::: -->\n<div class=\"top_panel\">\n    <div class=\"wrapper\">\n\n<ul class=\"aud_list right\" style=\"float: left;\">\n\t\t\t\t\t" . ($this->memberData['g_use_search'] ? "\n\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'quickSearch') ? $this->registry->getClass('output')->getTemplate('global')->quickSearch() : '') . "\n\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t" . (!(!$this->memberData['member_id'] && $this->settings['force_login']) && !($this->settings['board_offline'] && !$this->memberData['g_access_offline']) && $this->memberData['g_view_board'] ? "\n\t\t\t\t\t\t\t<li class='right'>\n\t\t\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=navigation&inapp=" . IPS_APP_COMPONENT . "", "public", ''), "", "") . "\" rel=\"quickNavigation\" accesskey='9' id='quickNavLaunch' data-tooltip=\"{$this->lang->words['launch_quicknav']}\"><span> </span></a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t<li id='nav_explore' class='right'>\n\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app=" . (($this->registry->getCurrentApplication() != 'core' and IPSLib::appIsSearchable($this->registry->getCurrentApplication())) ? "{$this->registry->getCurrentApplication()}" : "forums") . "", "public", ''), "", "") . "' accesskey='2'>{$this->lang->words['view_new_posts']}</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t" . (($this->memberData['is_mod'] or !empty($this->memberData['access_report_center']) || ($this->memberData['g_access_cp'] and !$this->settings['security_remove_acp_link'])) ? "" . ($this->memberData['access_report_center'] && $this->memberData['_cache']['report_num'] > 0 ? "\n\t\t\t\t\t\t\t\t<li class='right active'>\n\t\t\t\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=reports&do=index", "public", ''), "", "") . "\" title='{$this->lang->words['view_reports']}'>{$this->memberData['_cache']['report_num']} {$this->lang->words['report_member_bar']}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t<li class='right'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=modcp", "public", ''), "", "") . "\" title='{$this->lang->words['gbl_modcp_link']}'>{$this->lang->words['gbl_modcp_link']}</a></li>\n\t\t\t\t\t\t\t" . (($this->memberData['g_access_cp'] and !$this->settings['security_remove_acp_link']) ? "\n\t\t\t\t\t\t\t\t<li class='right'>\n\t\t\t\t\t\t\t\t\t<a href=\"{$this->settings['_admin_link']}\" title='{$this->lang->words['admin_cp']}' target=\"_blank\">{$this->lang->words['login_to_acp']}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t" : "") . "" : "") . "\n</ul>\n<div style=\"float: right;\">\n            " . ($this->memberData['member_id'] ? "<div id='user_navigation' class='logged_in'>\n\t\t\t\t\t\t\t<ul class='ipsList_inline left'>\n\n\t\t\t\t\t\t\t\t<li class=\"right_border\"><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$this->memberData['member_id']}", "public", ''), "{$this->memberData['members_seo_name']}", "showuser") . "\" data-tooltip='{$this->lang->words['your_profile']}' class='aud_userPhotoLink'>\n\t\t\t\t\t\t\t\t<img class=\"aud_userPhoto ipsUserPhoto\" src='{$this->memberData['pp_small_photo']}' alt=\"{$this->memberData['members_display_name']}{$this->lang->words['users_photo']}\" />\n                                </a></li>\n\n\t\t\t\t\t\t\t\t<li><a id='user_link' href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$this->memberData['member_id']}", "public", ''), "{$this->memberData['members_seo_name']}", "showuser") . "\">{$this->memberData['members_display_name']}  <span id='user_link_dd'></span></a></li>\t\n\t\t\t\t\t\t\t\t" . (!(!$this->memberData['member_id'] && $this->settings['force_login']) && !($this->settings['board_offline'] && !$this->memberData['g_access_offline']) ? "" . (($this->memberData['g_use_pm'] and $this->memberData['members_disable_pm'] == 0) ? "<li><a data-clicklaunch=\"getInboxList\" id='inbox_link' href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=messaging", "public", ''), "", "") . "' data-tooltip='{$this->lang->words['your_messenger']}'>" . ($this->memberData['msg_count_new'] ? "<span class='ipsHasNotifications'>{$this->memberData['msg_count_new']}</span>" : "") . " </a></li>" : "") . "\n\t\t\t\t\t\t\t\t\t<li><a data-clicklaunch=\"getNotificationsList\" id='notify_link' href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=usercp&area=notificationlog", "public", ''), "", "") . "\" data-tooltip=\"{$this->lang->words['notifications_at_the_top']}\">" . ($this->memberData['notification_cnt'] ? "<span class='ipsHasNotifications'>{$this->memberData['notification_cnt']}</span>" : "") . " </a></li>" : "") . "\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li><a id=\"logout_link\" 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", ''), "", "") . "\" data-tooltip=\"{$this->lang->words['log_out']}\"></a></li>\t\t\t\t\t\t\t\t\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><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></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\t\n\t\t\t\t\t\t<!-- ::: USER DROP DOWN MENU ::: -->\n\t\t\t\t\t\t<div id='user_link_menucontent' class='ipsHeaderMenu clearfix boxShadow' style='display: none'>\n\t\t\t\t\t\t\t<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']}' class='ipsUserPhotoLink left'>\n\t\t\t\t\t\t\t\t<img src='{$this->memberData['pp_small_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $this->memberData['members_display_name']) . "\" class='ipsUserPhoto ipsUserPhoto_medium photo' />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class='left'>\n\t\t\t\t\t\t\t\t" . ($this->registry->getClass('memberStatus')->canCreate($this->memberData) && !($this->settings['board_offline'] && !$this->memberData['g_access_offline']) ? "<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\t\t\t\t\t\t\t<input type='text' id='statusUpdateGlobal' name='content' class='input_text' style='width: 97%' /><br />\n\t\t\t\t\t\t\t\t\t\t<input type='submit' id='statusSubmitGlobal' class='ipsButton_secondary' value='{$this->lang->words['global_update_status']}' />\n\t\t\t\t\t\t\t\t\t\t" . (((IPSLib::twitter_enabled() or IPSLib::fbc_enabled()) and ($this->memberData['fb_uid'] or $this->memberData['twitter_id'])) ? "  \n\t\t\t\t\t\t\t\t\t\t\t" . ((IPSLib::twitter_enabled() and $this->memberData['twitter_id']) ? "<input type='checkbox' id='su_TwitterGlobal' value='1' name='su_Twitter' /> <label for='su_TwitterGlobal' class='desc ipsType_smaller'>Twitter</label>" : "") . "   \n\t\t\t\t\t\t\t\t\t\t\t" . ((IPSLib::fbc_enabled() and $this->memberData['fb_uid']) ? " <input type='checkbox' id='su_FacebookGlobal' value='1' name='su_Facebook' /> <label for='su_FacebookGlobal' class='desc ipsType_smaller'>Facebook</label>" : "") . "" : "") . "\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t\t\t\t</form>" : "") . "\n\t\t\t\t\t\t\t\t\t<ul id='links'>\n\t\t\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\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\t\t<li id='user_content'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&mid={$this->memberData['member_id']}", "public", ''), "", "") . "\" title=\"{$this->lang->words['my_content_link']}\">{$this->lang->words['my_content_link']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" . (count(IPSLib::getEnabledApplications('like')) ? "\n\t\t\t\t\t\t\t\t\t\t\t<li id='user_likes'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=followed", "public", ''), "", "") . "' title='{$this->lang->words['your_likes']}'>{$this->lang->words['your_likes']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t" . ($this->settings['friends_enabled'] && $this->memberData['g_can_add_friends'] ? "\n\t\t\t\t\t\t\t\t\t\t\t<li id='user_friends'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=list", "public", ''), "", "") . "' title=\"{$this->lang->words['manage_friends']}\" class='manage_friends'>{$this->lang->words['manage_friends']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t<li id='user_enemies'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=usercp&tab=core&area=ignoredusers", "public", ''), "", "") . "' title=\"{$this->lang->words['manage_ignored_users']}\" class='manage_enemies'>{$this->lang->words['manage_ignored_users']}</a></li>\n\t\t\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\t\t<li id='user_blog'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&module=manage", "public", ''), "false", "manageblog") . "\">{$this->lang->words['manage_blogs']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t" . ($this->memberData['members_disable_pm'] != 2 ? "\n\t\t\t\t\t\t\t\t\t\t\t<li id='user_pm'><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=messaging", "public", ''), "", "") . "\">{$this->lang->words['user_dd_go_pm']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\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\t\t<li id='user_gallery'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&user={$this->memberData['member_id']}", "public", ''), "{$this->memberData['members_seo_name']}", "useralbum") . "' title=\"{$this->lang->words['go_to_my_gallery']}\">{$this->lang->words['my_gallery']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t\t" . (IPSLib::appIsInstalled('nexus') ? "\n\t\t\t\t\t\t\t\t\t\t\t<li id='user_nexus'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=nexus&module=clients", "public", ''), "", "") . "' title=\"{$this->lang->words['client_area']}\">{$this->lang->words['client_area']}</a></li>\n\t\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>" : "<div id='user_navigation' class='not_logged_in'>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<ul class='ipsList_inline cubic_list left'>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<span class='services'>\n\t\t\t\t\t\t\t\t\t" . (IPSLib::loginMethod_enabled('facebook') ? "\n\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login&serviceClick=facebook", "public", ''), "", "") . "'>" . $this->registry->getClass('output')->getReplacement("lim_facebook") . "</a>\n\t\t\t\t\t\t\t\t\t" : "") . "\n\n\t\t\t\t\t\t\t\t\t" . (IPSLib::loginMethod_enabled('twitter') ? "\n\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login&serviceClick=twitter", "public", ''), "", "") . "'>" . $this->registry->getClass('output')->getReplacement("lim_twitter") . "</a>\n\t\t\t\t\t\t\t\t\t" : "") . "\n\n\t\t\t\t\t\t\t\t\t" . (IPSLib::loginMethod_enabled('live') ? "\n\t\t\t\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&auth_key={$this->member->form_hash}", "public", ''), "", "") . "'>" . $this->registry->getClass('output')->getReplacement("lim_windows") . "</a>\n\t\t\t\t\t\t\t\t\t" : "") . "\t\t\t\t\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<a class=\"border_bord\" href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login", "public", ''), "", "") . "' title='{$this->lang->words['sign_in']}' id='sign_in'>\n\t\t\t\t\t\t\t\t\t<i class=\"aud_icon icon-login\"></i> {$this->lang->words['sign_in']}</a>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\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']}' id='register_link'><i class=\"aud_icon icon-register\"></i> {$this->lang->words['register']}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>") . "\n        </div>\n    </div>\n</div>\n<div class=\"wrapper\">\n                                        <div id='logo'>\n\t\t\t\t\t\t" . (ipsRegistry::$applications[$this->registry->getCurrentApplication()]['hasCustomHeader'] ? "\n\t\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('' . $this->registry->getCurrentApplication() . '_global'), 'overwriteHeader') ? $this->registry->getClass('output')->getTemplate('' . $this->registry->getCurrentApplication() . '_global')->overwriteHeader() : '') . "\n\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'defaultHeader') ? $this->registry->getClass('output')->getTemplate('global')->defaultHeader() : '') . "\n\t\t\t\t\t\t") . "\n\t\t\t\t\t</div>\n                                        <div style=\"float: right; clear: both; margin-top: 66px;\">\n                                        " . ($this->facebook_url ? "\n\t\t\t\t\t\t\t<a href=\"{$this->facebook_url}\" data-tooltip=\"{$this->facebook_title}\" target=\"_blank\"><img src=\"{style_images_url}/facebook.png\" alt=\"Facebook\" height=\"40\" width=\"40\"></a>\n\t\t\t\t\t" : "") . "" . ($this->twitter_name ? "\n\t\t\t\t\t\t\t<a href=\"http://twitter.com/{$this->twitter_name}\" data-tooltip=\"{$this->twitter_title}\" target=\"_blank\"><img src=\"{style_images_url}/twitter.png\" alt=\"Facebook\" height=\"40\" width=\"40\"></a>\n\t\t\t\t\t" : "") . "\n                </div>\n</div>\n\t\t\t<div id=\"aud_wrapper\" class='main_width'>\n\t\t\t\t<!-- ::: BRANDING/NAV BAR: Logo and navigation menu ::: -->\n\t\t\t\t<div id='branding'>\n\t\t\t\t\t\n\t\t\t\t\t<!-- ::: APPLICATION TABS ::: -->\n\t\t\t\t\t\t<div id='primary_nav' class='clearfix right'>\n\t\t\t\t\t\t\t<ul class='ipsList_inline' id='community_app_menu'>\n\t\t\t\t\t\t\t\t" . (($this->settings['home_url'] and $this->settings['home_name']) ? "\n\t\t\t\t\t\t\t\t\t<li id='nav_home'><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\t\t" : "") . "\n\t\t\t\t\t\t\t\t" . (!empty($header_items['primary_navigation_menu']) ? "\n\t\t\t\t\t\t\t\t\t{$header_items['primary_navigation_menu']}\n\t\t\t\t\t\t\t\t" : "" . ((is_array($header_items['applications']) and count($header_items['applications'])) ? "\n\t\t\t\t\t\t\t\t\t\t" . $this->__f__758c3640fe48bb04e47e743dc6faffdd($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t\t\t\t" : "") . "") . "\n\t\t\t\t\t\t\t\t<li id='nav_other_apps' style='display: none'>\n\t\t\t\t\t\t\t\t\t<a href='#' class='ipbmenu' id='more_apps'>{$this->lang->words['more_apps']} <img src='{$this->settings['img_url']}/dropdown.png' /></a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n<div class=\"g_12 separator\" style=\"margin-left: 22px;\"><span></span></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tif( \$('primary_nav') ){\tipb.global.activateMainMenu(); }\n\t\t\t\t\t\t</script>\n\t\t\t\t</div>\n\t\t\t\t<!-- ::: MAIN CONTENT AREA ::: -->\n\n\t\t\t\t<div id='content' class='clearfix'>\n\t\t\t\t\t<!-- ::: NAVIGATION BREADCRUMBS ::: -->\n\t\t\t\t\t" . (count($items['navigation']) ? "<div id='secondary_navigation' class='clearfix'>\n\t\t\t\t\t\t\t<ol class='breadcrumb top ipsList_inline left'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . ((!$this->settings['remove_forums_nav'] or ipsRegistry::$current_application == 'forums') ? "<li itemscope itemtype=\"http://data-vocabulary.org/Breadcrumb\">\n\t\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("act=idx", "public", ''), "false", "") . "' itemprop=\"url\">\n\t\t\t\t\t\t\t\t\t\t\t<span itemprop=\"title\">{$this->settings['board_name']}</span>\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t" . (($this->did_first = 1) ? "" : "") . "" : "") . "\n\t\t\t\t\t\t\t\t" . $this->__f__171a69a5fc28f509840cf15566243945($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t</div>" : "") . "" . ($this->show_global_messages == yes ? "<span style=\"margin-top: 5px; display: block;\"></span>" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'aud_announcements') ? $this->registry->getClass('output')->getTemplate('global')->aud_announcements() : '') . "" : "") . "\n\n\t\t\t\t\t<noscript>\n\t\t\t\t\t\t<div class='message error'>\n\t\t\t\t\t\t\t<strong>{$this->lang->words['gbl_no_js_title']}</strong>\n\t\t\t\t\t\t\t<p>{$this->lang->words['gbl_no_js']}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t</noscript>\n\t\t\t\t\t<!-- ::: CONTENT ::: -->\n\t\t\t\t\t" . ($items['adHeaderCode'] ? "\n\t\t\t\t\t\t<div class='ipsAd'>{$items['adHeaderCode']}</div>\n\t\t\t\t\t" : "") . "\n\t\t\t\t\t" . ($html ? "{$html}" : "") . "\n\t\t\t\t\t" . ($items['adFooterCode'] ? "\n\t\t\t\t\t\t<div class='ipsAd'>{$items['adFooterCode']}</div>\n\t\t\t\t\t" : "") . "\n\t\t\t\t</div>\n\t\t\t\n\t\t\t\t<!-- ::: FOOTER (Change skin, social links etc) ::: -->\n\t\t\t\t<div id='footer_utilities' class='clearfix clear'>\n\t\t\t\t\t<ul class='aud_list left'>\n\t\t\t\t\t\t" . ($this->enable_adstyler == yes ? "<li>\n\t\t\t\t\t\t\t<a id=\"sbOpen\" href=\"#\" data-tooltip=\"Theme Styler\"><img src=\"{style_images_url}/brush_icon.png\" alt=\"Theme styler\"></a>\n\t\t\t\t\t\t</li>" : "") . "\n\t\t\t\t\t\t" . (!$this->member->is_not_human ? "" . (($this->memberData['userAgentLocked'] and !$this->memberData['userAgentBypass']) ? "\n\t\t\t\t\t\t\t\t<li id='useragent_msg'>\n\t\t\t\t\t\t\t\t\t{$this->lang->words['skin_browser_set']} <a href='#' data-clicklaunch='changeSkin' data-skinid='unlockUserAgent'>{$this->lang->words['override_browser_theme']}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t" : "" . ($this->registry->output->isTouchDevice() ? "\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href='#' data-clicklaunch='changeSkin' data-skinid='setAsMobile'>{$this->lang->words['set_mobile_theme']}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t" . (count($footer_items['skin_chooser']) > 1 ? "\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t<a rel=\"nofollow\" id='new_skin' href='#'>{$this->lang->words['change_theme']}</a>\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul id='new_skin_menucontent' class='ipbmenu_content with_checks' style='display: none'>\n\t\t\t\t\t\t\t\t\t\t\t" . $this->__f__ec09aa5f6024ece0cc832e649f62820e($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t" : "") . "") . "" : "") . "\n\t\t\t\t\t\t\n\t\t\t\t\t\t" . (!$this->member->is_not_human && count($footer_items['lang_chooser']['options']) > 1 ? "\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<a rel=\"nofollow\" href='#' id='new_language'>{$footer_items['lang_chooser']['default']}</a>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<ul id='new_language_menucontent' class='ipbmenu_content with_checks' style='display: none'>\n\t\t\t\t\t\t\t\t\t" . $this->__f__3c867bcfb1300de730709b3b53153eb4($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\n\t\t\t\t\t\t" . (!$this->member->is_not_human ? "\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<a rel=\"nofollow\" id='mark_all_read' 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>\n\t\t\t\t\t\t\t\t<ul id='mark_all_read_menucontent' class='ipbmenu_content' style='display: none'>\n\t\t\t\t\t\t\t\t\t" . $this->__f__fb5f156f8d7b2071393c16fed14ebfdd($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t<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", ''), "", "") . "\"><strong>{$this->lang->words['mark_all_as_read']}</strong></a>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t" . (($this->settings['gl_show'] and $this->settings['gl_title']) ? "<li class='ipsType_smaller'>\n\t\t\t\t\t\t\t<a href='" . ($this->settings['gl_link'] ? "{$this->settings['gl_link']}" : "" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=boardrules", "public", ''), "", "") . "") . "'>" . ($this->settings['gl_title'] ? "{$this->settings['gl_title']}" : "{$this->lang->words['board_rules']}") . "</a>" . ($this->settings['priv_title'] ? " &middot; " : "") . "\n\t\t\t\t\t\t</li>" : "") . "\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=help", "public", ''), "", "") . "\" title='{$this->lang->words['view_help']}' rel=\"help\" accesskey='6'>{$this->lang->words['sj_help']}</a>\n\t\t\t\t\t\t</li>\t\n\t\t\t\n\t\t\t\t\t</ul>\n\t\t\t\t<ul class=\"aud_list right\">\n\t\t\t\t\t<li>\n\t\t\t\t\t<a rel=\"nofollow\" href='#top' id='backtotop' data-tooltip='{$this->lang->words['go_to_top']}'></a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t\t<div class=\"footer_copyright\">\n<span class=\"copyright_row\">\n<span id=\"footer_links\" class=\"label\">\n                    <a href=\"/?page=Faq\">FAQ</a>\n                    | <a href=\"/?page=Terms\">Terms and Conditions</a>\n                    | <a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=privacy", "public", ''), "false", "privacy") . "\">Privacy Policy</a>\n                    | <a href=\"/?page=Contact+Us\">Contact Us</a>\n                </span>\n</span>\n\t<p id=\"copyright\">All Rights Reserved <a href=\"http://www.grabviews.com\">GrabViews.com</a> © 2013</p>\n</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t" . (($this->memberData['member_id'] and $this->settings['debug_level']) ? "<div id='ipsDebug_footer'>\n\t\t\t\t\t\t<strong>{$this->lang->words['time_now']}</strong> {$footer_items['time']}\n\t\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\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\t<strong>{$this->lang->words['stat_load']}</strong> {$stats['server_load']}\n\t\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\t<strong>{$this->lang->words['stat_gzip']}</strong> {$stats['gzip_status']}\n\t\t\t\t\t</div>" : "") . "\n\t\t\t\t<div style=\"display:none;\">\n\t\t\t\t\t{$stats['task']}\n\t\t\t\t</div>\n\t\t\t\t" . ($this->settings['do_include_lightbox_real'] ? "\n\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'include_lightbox_real') ? $this->registry->getClass('output')->getTemplate('global')->include_lightbox_real() : '') . "\n\t\t\t\t" : "\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tipb.global.lightBoxIsOff();\n\t\t\t\t\t</script>\n\t\t\t\t") . "\n\t\t\t\t" . (!$this->memberData['member_id'] ? "" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'inlineLogin') ? $this->registry->getClass('output')->getTemplate('global')->inlineLogin() : '') . "" : "") . "\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!--DEBUG_STATS-->\n\t\t<script type='text/javascript'>\n\t\t\tif( \$('primary_nav') ){\tipb.global.activateMainMenu(); }\n\t\t</script>\n\t\t" . (($this->settings['viglink_enabled'] and (!$this->settings['viglink_groups'] or IPSMember::isInGroup($this->memberData, explode(',', $this->settings['viglink_groups'])))) ? "<script type=\"text/javascript\">\n\t\t\t  var vglnk = { api_url: '//api.viglink.com/api',\n\t\t\t                key: '{$this->settings['viglink_api_key']}'" . ($this->settings['viglink_subid'] ? ",\n\t\t\t                sub_id: '{$this->settings['sub_id']}'\n\t\t\t                " : "") . "\n\t\t\t              };\n\t\t\t\n\t\t\t  (function(d, t) {\n\t\t\t    var s = d.createElement(t); s.type = 'text/javascript'; s.async = true;\n\t\t\t    s.src = ('https:' == document.location.protocol ? vglnk.api_url :\n\t\t\t             '//cdn.viglink.com/api') + '/vglnk.js';\n\t\t\t    var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r);\n\t\t\t  }(document, 'script'));\n\t\t\t</script>" : "") . "" . ($this->enable_adstyler == yes ? "\n\t\t<!-- Start styleBar -->\n\t\t<form id=\"styleBar\"></form>\n\t\t<!-- End styleBar -->\n\n\t\t<!-- Start styleBar js -->\n\t\t<script>\n\t\t\t(function( jQuery ) {\n\t\t\t\tjQuery( '#styleBar' ).styleBar( { overlay: true } );;\n\t\t\t})( jQuery );\n\t\t</script>\n\t\t<!-- end styleBar js -->\n\t\t" : "") . "\n\t\t\n\t\t<span class=\"mcolor\"></span>\n\t</body>\n</html>";
     return $IPBHTML;
 }
Beispiel #10
0
 /**
  * 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);
 }