Exemplo n.º 1
0
 /**
  * Parse/format the online list data for the records
  *
  * @author	Brandon Farber
  * @param	array 			Online list rows to check against
  * @return	array 			Online list rows parsed
  */
 public function parseOnlineEntries($rows)
 {
     if (!is_array($rows) or !count($rows)) {
         return $rows;
     }
     $final = array();
     $profiles = array();
     $members = array();
     //-----------------------------------------
     // Extract the topic/forum data
     //-----------------------------------------
     foreach ($rows as $row) {
         if ($row['current_appcomponent'] != 'members' or !$row['current_module']) {
             continue;
         }
         if ($row['current_module'] == 'profile') {
             $profiles[] = $row['location_1_id'];
         }
     }
     if (count($profiles)) {
         ipsRegistry::DB()->build(array('select' => 'member_id, members_display_name, members_seo_name, member_banned, members_bitoptions', 'from' => 'members', 'where' => 'member_id IN(' . implode(',', $profiles) . ')'));
         $pr = ipsRegistry::DB()->execute();
         while ($r = ipsRegistry::DB()->fetch($pr)) {
             /* Setup bitwise option to check for banned/spammer members */
             $r = IPSMember::buildBitWiseOptions($r);
             if (!IPSMember::isInactive($r) || ipsRegistry::member()->getProperty('g_is_supmod')) {
                 $members[$r['member_id']] = array('members_display_name' => $r['members_display_name'], 'members_seo_name' => $r['members_seo_name']);
             }
         }
     }
     foreach ($rows as $row) {
         if ($row['current_appcomponent'] == 'members') {
             if ($row['current_module'] == 'online') {
                 $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_online'];
             }
             if ($row['current_module'] == 'list') {
                 $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_members'];
             }
             if ($row['current_module'] == 'messaging') {
                 $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_msg'];
             }
             if ($row['current_module'] == 'profile') {
                 if (isset($members[$row['location_1_id']])) {
                     $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_profile'];
                     $row['where_line_more'] = $members[$row['location_1_id']]['members_display_name'];
                     $row['where_link'] = 'showuser='******'location_1_id'];
                     $row['_whereLinkSeo'] = ipsRegistry::getClass('output')->buildSEOUrl($row['where_link'], 'public', $members[$row['location_1_id']]['members_seo_name'], 'showuser');
                 }
             }
         }
         $final[$row['id']] = $row;
     }
     return $final;
 }
Exemplo n.º 2
0
 function userSmallPhoto($member = array())
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_global', $this->_funcHooks['userSmallPhoto'])) {
         $count_82ad645103bd9793e710479e9fd6131b = is_array($this->functionData['userSmallPhoto']) ? count($this->functionData['userSmallPhoto']) : 0;
         $this->functionData['userSmallPhoto'][$count_82ad645103bd9793e710479e9fd6131b]['member'] = $member;
     }
     $IPBHTML .= "" . ($member['member_id'] && ($this->memberData['g_is_supmod'] || $this->memberData['g_mem_info'] && !IPSMember::isInactive($member)) ? "\n\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$member['member_id']}", "public", ''), "{$member['members_seo_name']}", "showuser") . "' class='ipsUserPhotoLink left'>\n" : "\n\t<div class='left'>\n") . "\n" . ($member['member_id'] ? "<img src='{$member['pp_small_photo']}' alt='" . ($member['alt'] ? "{$member['alt']}" : "{$this->lang->words['photo']}") . "' class='ipsUserPhoto " . (empty($member['_customClass']) ? "ipsUserPhoto_mini" : "{$member['_customClass']}") . "' />" : "\n\t" . IPSMember::buildNoPhoto(0, 'mini') . "\n") . "\n" . ($member['member_id'] && ($this->memberData['g_is_supmod'] || $this->memberData['g_mem_info'] && !IPSMember::isInactive($member)) ? "\n\t</a>\n" : "\n\t</div>\n") . "";
     return $IPBHTML;
 }
Exemplo n.º 3
0
 function topicViewTemplate($forum, $topic, $post_data, $displayData)
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_topic', $this->_funcHooks['topicViewTemplate'])) {
         $count_c2d0483c01f253f726099ed929330517 = is_array($this->functionData['topicViewTemplate']) ? count($this->functionData['topicViewTemplate']) : 0;
         $this->functionData['topicViewTemplate'][$count_c2d0483c01f253f726099ed929330517]['forum'] = $forum;
         $this->functionData['topicViewTemplate'][$count_c2d0483c01f253f726099ed929330517]['topic'] = $topic;
         $this->functionData['topicViewTemplate'][$count_c2d0483c01f253f726099ed929330517]['post_data'] = $post_data;
         $this->functionData['topicViewTemplate'][$count_c2d0483c01f253f726099ed929330517]['displayData'] = $displayData;
     }
     $pluginEditorHook = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite');
     $editor = new $pluginEditorHook();
     $IPBHTML .= "" . ($forum['forum_allow_rating'] ? "\r\n" . $this->registry->getClass('output')->addJSModule("rating", "0") . "\r\n" : "") . "\r\n" . $this->registry->getClass('output')->addJSModule("topic", "0") . "\r\n<script type=\"text/javascript\">\r\n//<![CDATA[\r\n\tipb.topic.inSection    = 'topicview';\r\n\tipb.topic.topic_id     = {$topic['tid']};\r\n\tipb.topic.forum_id     = {$forum['id']};\r\n\tipb.topic.redirectPost = 1;\r\n\tipb.topic.start_id     = " . $this->registry->getClass('topics')->pageToSt(intval($this->request['page'])) . ";\r\n\tipb.topic.page_id      = " . intval($this->request['page']) . ";\r\n\tipb.topic.topPid       = 0;\r\n\tipb.topic.counts       = { postTotal: " . intval($topic['posts'] + 1) . ",\r\n\t\t\t\t\t\t\t  curStart:  ipb.topic.start_id,\r\n\t\t\t\t\t\t\t  perPage:   " . intval($this->settings['display_max_posts']) . " };\r\n\t//Search Setup\r\n\tipb.vars['search_type']\t\t\t= 'forum';\r\n\tipb.vars['search_type_id']\t\t= {$forum['id']};\r\n\tipb.vars['search_type_2']\t\t= 'topic';\r\n\tipb.vars['search_type_id_2']\t= {$topic['tid']};\r\n\t\r\n\t" . (!$this->member->is_not_human ? "\r\n\t// Delete stuff set up\r\n\tipb.topic.deleteUrls['hardDelete'] = new Template( ipb.vars['base_url'] + \"app=forums&module=moderate&section=moderate&do=04&f={$forum['id']}&t={$topic['tid']}&page={$this->request['page']}&auth_key={$this->member->form_hash}&p=#{pid}\" );\r\n\tipb.topic.deleteUrls['softDelete'] = new Template( ipb.vars['base_url'] + \"app=forums&module=moderate&section=moderate&do=postchoice&tact=sdelete&t={$topic['tid']}&f={$forum['id']}&auth_key={$this->member->form_hash}&selectedpids[#{pid}]=#{pid}&pid=#{pid}\" );\r\n\t" : "") . "\r\n\t\r\n\tipb.topic.modPerms\t  = [];\r\n\t" . ($this->memberData['g_is_supmod'] ? "\r\n\t\tipb.topic.modPerms['approve'] = 1;\r\n\t\tipb.topic.modPerms['delete'] = 1;\r\n\t\tipb.topic.modPerms['hide'] = 1;\r\n\t\tipb.topic.modPerms['unhide'] = 1;\r\n\t\tipb.topic.modPerms['merge'] = 1;\r\n\t\tipb.topic.modPerms['split'] = 1;\r\n\t\tipb.topic.modPerms['move'] = 1;\r\n\t" : "" . (isset($this->memberData['forumsModeratorData'][$forum['id']]) ? "\r\n\t\t\tipb.topic.modPerms['approve'] = {$this->memberData['forumsModeratorData'][$forum['id']]['post_q']};\r\n\t\t\tipb.topic.modPerms['delete'] = {$this->memberData['forumsModeratorData'][$forum['id']]['delete_post']};\r\n\t\t\tipb.topic.modPerms['hide'] = {$this->memberData['forumsModeratorData'][$forum['id']]['bw_mod_soft_delete']};\r\n\t\t\tipb.topic.modPerms['unhide'] = {$this->memberData['forumsModeratorData'][$forum['id']]['bw_mod_un_soft_delete']};\r\n\t\t\tipb.topic.modPerms['merge'] = {$this->memberData['forumsModeratorData'][$forum['id']]['split_merge']};\r\n\t\t\tipb.topic.modPerms['split'] = {$this->memberData['forumsModeratorData'][$forum['id']]['split_merge']};\r\n\t\t\tipb.topic.modPerms['move'] = {$this->memberData['forumsModeratorData'][$forum['id']]['split_merge']};\r\n\t\t" : "") . "") . "\r\n\t\r\n\tipb.templates['post_moderation'] = new Template(\"<div id='comment_moderate_box' class='ipsFloatingAction' style='display: none'><span class='desc'>{$this->lang->words['comment_action_count']} </span><select id='tactInPopup' class='input_select'><option value='approve'>{$this->lang->words['cpt_approve']}</option><option value='delete'>{$this->lang->words['cpt_hide']}</option><option value='sundelete'>{$this->lang->words['cpt_undelete']}</option><option value='deletedo'>{$this->lang->words['cpt_delete']}</option><option value='merge'>{$this->lang->words['cpt_merge']}</option><option value='split'>{$this->lang->words['cpt_split']}</option><option value='move'>{$this->lang->words['cpt_move']}</option></select>&nbsp;&nbsp;<input type='button' class='input_submit' id='submitModAction' value='{$this->lang->words['comments_act_go']}' /></div>\");\r\n\t\r\n//]]>\r\n</script>\r\n" . (!$this->settings['disable_lightbox'] ? "\r\n" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'include_lightbox') ? $this->registry->getClass('output')->getTemplate('global')->include_lightbox() : '') . "\r\n" : "") . "\r\n<div class=\"aud_pagetitle\">\r\n" . ($this->memberData['member_id'] ? "\r\n{$displayData['follow_data']}\r\n" : "") . "\r\n" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userSmallPhoto') ? $this->registry->getClass('output')->getTemplate('global')->userSmallPhoto(array_merge($topic['_starter'], array('_customClass' => 'ipsUserPhoto_medium'))) : '') . "\r\n<div itemscope itemtype=\"http://schema.org/Article\" class='ipsBox_withphoto'>\r\n\r\n\t<h1 itemprop=\"name\" class='ipsType_pagetitle'>{$topic['title']}</h1>\r\n\t<div class='desc lighter blend_links'>\r\n\t\t {$this->lang->words['started_by']} <span itemprop=\"creator\">" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard($topic['_starter']) : '') . "</span>, <span itemprop=\"dateCreated\" datetime=\"" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($topic['start_date'], "YMD", 1)) . "\">" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($topic['start_date'], "SHORT", 0)) . "</span>\r\n\t</div>\r\n" . ($forum['forum_allow_rating'] ? "<span itemprop=\"aggregateRating\" itemscope itemtype=\"http://schema.org/AggregateRating\" class='rating ipsType_smaller'>\r\n\t\t\t" . ($topic['_allow_rate'] ? "\r\n\t\t\t\t<strong>{$this->lang->words['js_rate_me']}</strong>&nbsp;&nbsp;\r\n\t\t\t" : "") . "" . ($topic['_allow_rate'] ? "\r\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=rating&amp;t={$topic['tid']}&amp;rating=1&amp;secure_key={$this->member->form_hash}", "public", ''), "", "") . "' id='topic_rate_1' title='{$this->lang->words['top_js_1star']}'>\r\n\t\t\t" : "") . "\r\n\t\t\t" . ($topic['_rate_int'] >= 1 ? "\r\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("rate_on") . "\r\n\t\t\t" : "\r\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("rate_off") . "\r\n\t\t\t") . "\r\n\t\t\t" . ($topic['_allow_rate'] ? "\r\n\t\t\t\t</a><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=rating&amp;t={$topic['tid']}&amp;rating=2&amp;secure_key={$this->member->form_hash}", "public", ''), "", "") . "' id='topic_rate_2' title='{$this->lang->words['top_js_2star']}'>\r\n\t\t\t" : "") . "\r\n\t\t\t" . ($topic['_rate_int'] >= 2 ? "\r\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("rate_on") . "\r\n\t\t\t" : "\r\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("rate_off") . "\r\n\t\t\t") . "\r\n\t\t\t" . ($topic['_allow_rate'] ? "\r\n\t\t\t\t</a><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=rating&amp;t={$topic['tid']}&amp;rating=3&amp;secure_key={$this->member->form_hash}", "public", ''), "", "") . "' id='topic_rate_3' title='{$this->lang->words['top_js_3star']}'>\r\n\t\t\t" : "") . "\r\n\t\t\t" . ($topic['_rate_int'] >= 3 ? "\r\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("rate_on") . "\r\n\t\t\t" : "\r\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("rate_off") . "\r\n\t\t\t") . "\r\n\t\t\t" . ($topic['_allow_rate'] ? "\r\n\t\t\t\t</a><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=rating&amp;t={$topic['tid']}&amp;rating=4&amp;secure_key={$this->member->form_hash}", "public", ''), "", "") . "' id='topic_rate_4' title='{$this->lang->words['top_js_4star']}'>\r\n\t\t\t" : "") . "\r\n\t\t\t" . ($topic['_rate_int'] >= 4 ? "\r\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("rate_on") . "\r\n\t\t\t" : "\r\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("rate_off") . "\r\n\t\t\t") . "\r\n\t\t\t" . ($topic['_allow_rate'] ? "\r\n\t\t\t\t</a><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=rating&amp;t={$topic['tid']}&amp;rating=5&amp;secure_key={$this->member->form_hash}", "public", ''), "", "") . "' id='topic_rate_5' title='{$this->lang->words['top_js_5star']}'>\r\n\t\t\t" : "") . "\r\n\t\t\t" . ($topic['_rate_int'] >= 5 ? "\r\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("rate_on") . "\r\n\t\t\t" : "\r\n\t\t\t\t" . $this->registry->getClass('output')->getReplacement("rate_off") . "\r\n\t\t\t") . "\r\n\t\t\t" . ($topic['_allow_rate'] ? "\r\n\t\t\t\t</a>\r\n\t\t\t" : "") . "\r\n\t\t\t<span id='rating_text'>\r\n\t\t\t\t" . ($topic['topic_rating_hits'] > 0 ? "\r\n\t\t\t\t\t<span itemprop=\"ratingCount\" id='rating_hits'>{$topic['topic_rating_hits']}</span> <span>{$this->lang->words['poll_s_votes']}</span>\r\n\t\t\t\t\t<meta itemprop=\"ratingValue\" content=\"" . floor($topic['_rate_int']) . "\" />\r\n\t\t\t\t" : "") . "\r\n\t\t\t</span>\r\n\t\t\t" . ($topic['_allow_rate'] ? "<script type='text/javascript'>\r\n\t\t\t\t//<![CDATA[\r\n\t\t\t\t\trating = new ipb.rating( 'topic_rate_', { \r\n\t\t\t\t\t\t\t\t\t\turl: ipb.vars['base_url'] + 'app=forums&module=ajax&section=topics&do=rateTopic&t={$topic['tid']}&md5check=' + ipb.vars['secure_hash'],\r\n\t\t\t\t\t\t\t\t\t\tcur_rating: {$topic['_rate_int']},\r\n\t\t\t\t\t\t\t\t\t\trated: " . ($topic['_rating_value'] != -1 ? "1" : "0") . ",\r\n\t\t\t\t\t\t\t\t\t\tallow_rate: {$topic['_allow_rate']},\r\n\t\t\t\t\t\t\t\t\t\tmulti_rate: 1,\r\n\t\t\t\t\t\t\t\t\t\tshow_rate_text: true\r\n\t\t\t\t\t\t\t\t\t  } );\r\n\t\t\t\t//]]>\r\n\t\t\t\t</script>" : "") . "\r\n\t\t</span>" : "") . "\r\n\t" . (is_array($topic['tags']) ? "\r\n\t\t{$topic['tags']['formatted']['parsedWithoutComma']}\r\n\t\t<br />\r\n\t" : "") . "\r\n\t<meta itemprop=\"interactionCount\" content=\"UserComments:" . intval($topic['posts'] + 1) . "\" />\r\n\r\n</div>\r\n</div>\r\n" . ($displayData['best_answer_post_data'] ? "<br />\r\n<div class='post post_block feature_box'>\r\n\t" . (($this->memberData['g_is_supmod'] or $this->memberData['g_mem_info'] && !IPSMember::isInactive($displayData['best_answer_post_data']['author'])) ? "\r\n\t<a itemprop=\"url\" href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$displayData['best_answer_post_data']['author']['member_id']}", "public", ''), "{$displayData['best_answer_post_data']['author']['members_seo_name']}", "showuser") . "\" title=\"{$this->lang->words['view_profile']}: {$displayData['best_answer_post_data']['author']['members_display_name']}\" class='ipsUserPhotoLink'>\r\n\t" : "") . "\r\n\t<img itemprop=\"image\" src='{$displayData['best_answer_post_data']['author']['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_medium left' />\r\n\t" . (($this->memberData['g_is_supmod'] or $this->memberData['g_mem_info'] && !IPSMember::isInactive($displayData['best_answer_post_data']['author'])) ? "\r\n\t</a>\r\n\t" : "") . "\r\n\t<div class=\"ipsBox_withphoto\">\r\n\t<p class='ipsType_sectiontitle'>\r\n\t\t<span class='ipsBadge ipsBadge_green'>{$this->lang->words['topic_best_answer']}</span>\r\n\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard($displayData['best_answer_post_data']['author']) : '') . ",\r\n\t\t" . (isset($post_data[$displayData['best_answer_post_data']['post']['pid']]) ? "" . ($this->request['page'] ? "\r\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showtopic={$topic['tid']}&amp;page={$this->request['page']}{$post_data[$displayData['best_answer_post_data']['post']['pid']]['post']['PermalinkUrlBit']}#entry{$displayData['best_answer_post_data']['post']['pid']}", "public", ''), "{$topic['title_seo']}", "showtopic") . "'>" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($displayData['best_answer_post_data']['post']['post_date'], "long", 0)) . "</a>\r\n\t\t\t" : "\r\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showtopic={$topic['tid']}{$post_data[$displayData['best_answer_post_data']['post']['pid']]['post']['PermalinkUrlBit']}#entry{$displayData['best_answer_post_data']['post']['pid']}", "public", ''), "{$topic['title_seo']}", "showtopic") . "'>" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($displayData['best_answer_post_data']['post']['post_date'], "long", 0)) . "</a>\r\n\t\t\t") . "" : "\r\n\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=forums&amp;section=findpost&amp;pid={$displayData['best_answer_post_data']['post']['pid']}", "public", ''), "", "") . "\">" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($displayData['best_answer_post_data']['post']['post_date'], "long", 0)) . "</a>\r\n\t\t") . "\r\n\t</p>\r\n\t<p class='ipsPad_top desc'>\r\n\t\t{$displayData['best_answer_post_data']['post']['post']} \r\n\t</p>\r\n" . (isset($post_data[$displayData['best_answer_post_data']['post']['pid']]) ? "" . ($this->request['page'] ? "\r\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showtopic={$topic['tid']}&amp;page={$this->request['page']}{$post_data[$displayData['best_answer_post_data']['post']['pid']]['post']['PermalinkUrlBit']}#entry{$displayData['best_answer_post_data']['post']['pid']}", "public", ''), "{$topic['title_seo']}", "showtopic") . "'>\r\n\t\t\t" : "\r\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showtopic={$topic['tid']}{$post_data[$displayData['best_answer_post_data']['post']['pid']]['post']['PermalinkUrlBit']}#entry{$displayData['best_answer_post_data']['post']['pid']}", "public", ''), "{$topic['title_seo']}", "showtopic") . "'>\r\n\t\t\t") . "" : "\r\n\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=forums&amp;section=findpost&amp;pid={$displayData['best_answer_post_data']['post']['pid']}", "public", ''), "", "") . "\">\r\n\t\t") . "\r\n\t\t\t<span class='ipsBadge has_icon ipsBadge_lightgrey'>{$this->lang->words['answer_gotopost']} <img class='icon' src=\"{$this->settings['img_url']}/right_white_10px.png\"></span></a>\r\n\t</div>\r\n</div>" : "") . "\r\n" . ($topic['approved'] == -1 ? "<br />\r\n\t<div class='message error'>\r\n\t\t" . sprintf($this->lang->words['tdb__forumindex'], $this->registry->output->getTemplate('global')->userHoverCard($topic['sdData'])) . " " . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($topic['sdData']['sdl_obj_date'], "long", 0)) . "\r\n\t\t" . ($this->registry->getClass('class_forums')->canSeeSoftDeleteReason($forum['id']) ? "<br /><span>" . ($topic['sdData']['sdl_obj_reason'] ? "{$topic['sdData']['sdl_obj_reason']}" : "{$this->lang->words['tdb__noreasongi']}") . "</span>" : "") . "\r\n\t\t<br /><br />\r\n\t\t" . ($this->memberData['g_is_supmod'] == 1 || $this->memberData['forumsModeratorData'][$forum['id']]['bw_mod_un_soft_delete_topic'] ? "\r\n\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=moderate&amp;section=moderate&amp;f={$forum['id']}&amp;t={$topic['tid']}&amp;page={$this->request['page']}&amp;auth_key={$this->member->form_hash}&amp;do=sundelete", "public", ''), "", "") . "' title='{$this->lang->words['dl_ths_restore']}' class='ipsButton_secondary'>{$this->lang->words['dl_ths_restore']}</a>\r\n\t\t" : "") . "\r\n\t\t" . ($this->memberData['g_is_supmod'] == 1 || $this->memberData['forumsModeratorData'][$forum['id']]['delete_topic'] ? "\r\n\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=moderate&amp;section=moderate&amp;f={$forum['id']}&amp;page={$this->request['page']}&amp;t={$topic['tid']}&amp;auth_key={$this->member->form_hash}&amp;do=08", "public", ''), "", "") . "' title='{$this->lang->words['dl_ths_delete']}' class='ipsButton_secondary important'>{$this->lang->words['dl_ths_delete']}</a>\r\n\t\t" : "") . "\r\n\t</div>" : "") . "\r\n" . ($topic['approved'] == 2 ? "\r\n\t<br />\r\n\t<div class='message error'>\r\n\t\t{$this->lang->words['topic_deleted']}\r\n\t\t<br /><br />\r\n\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=moderate&amp;section=moderate&amp;do=topic_restore&amp;t={$topic['tid']}&amp;f={$forum['id']}&amp;auth_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['dl_ths_restore']}' class='ipsButton_secondary'>{$this->lang->words['restore_post']}</a>\r\n\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=moderate&amp;section=moderate&amp;do=09&amp;t={$topic['tid']}&amp;f={$forum['id']}&amp;auth_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['dl_ths_delete']}' class='ipsButton_secondary'>{$this->lang->words['perm_delete_post']}</a>\r\n\t</div>\r\n" : "") . "\r\n<br />\r\n<div class='topic_controls'>\r\n\t{$topic['SHOW_PAGES']}\r\n\t" . ($topic['_isArchived'] ? "\r\n\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('topic'), 'archiveStatusMessage') ? $this->registry->getClass('output')->getTemplate('topic')->archiveStatusMessage($topic, $forum) : '') . "\r\n\t" : "<ul class='topic_buttons'>\r\n\t\t\t" . ($displayData['reply_button']['image'] == 'locked' ? "<li class='important'>\r\n\t\t\t\t\t" . (isset($displayData['poll_data']['poll']['poll_only']) && $displayData['poll_data']['poll']['poll_only'] ? "" . ($displayData['reply_button']['url'] ? "\r\n\t\t\t\t\t\t\t<a href='{$displayData['reply_button']['url']}' accesskey='r'>" . $this->registry->getClass('output')->getReplacement("lock_icon") . " {$this->lang->words['top_poll_only_reply']}</a>\r\n\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t<span>" . $this->registry->getClass('output')->getReplacement("lock_icon") . " {$this->lang->words['top_poll_only']}</span>\r\n\t\t\t\t\t\t") . "" : "" . ($displayData['reply_button']['url'] ? "\r\n\t\t\t\t\t\t\t<a href='{$displayData['reply_button']['url']}' accesskey='r'>" . $this->registry->getClass('output')->getReplacement("lock_icon") . " {$this->lang->words['top_locked_reply']}</a>\r\n\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t<span>" . $this->registry->getClass('output')->getReplacement("lock_icon") . " {$this->lang->words['top_locked']}</span>\r\n\t\t\t\t\t\t") . "") . "\r\n\t\t\t\t</li>" : "" . ($displayData['reply_button']['image'] ? "" . ($displayData['reply_button']['url'] ? "\r\n\t\t\t\t\t\t<li><a href='{$displayData['reply_button']['url']}' title='{$this->lang->words['topic_add_reply']}' accesskey='r'>{$this->lang->words['topic_add_reply']}</a></li>\r\n\t\t\t\t\t" : "<li class='disabled'><span>" . (!$this->memberData['member_id'] ? "{$this->lang->words['topic_no_reply_guest']}" : "{$this->lang->words['top_cannot_reply']}") . "</span></li>") . "" : "") . "") . "\r\n\t\t\t" . (($topic['hasUnreadPosts'] and $topic['posts'] + 1 > $this->settings['display_max_posts']) ? "\r\n\t\t\t\t<li class='non_button'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showtopic={$topic['tid']}&amp;view=getnewpost", "public", ''), "{$topic['title_seo']}", "showtopic") . "' title='{$this->lang->words['first_unread_post']}'>{$this->lang->words['go_to_first_unread']}</a></li>\r\n\t\t\t" : "") . "\r\n\t\t\t" . (($displayData['mod_links'] and ($this->memberData['is_mod'] or $this->memberData['member_id'] == $topic['starter_id'])) ? "\r\n\t\t\t\t<li class='non_button'><a href='#' id='topic_mod_options' title='{$this->lang->words['topic_moderation']}'>{$this->lang->words['topic_moderation']}</a></li>\r\n\t\t\t" : "") . "\r\n\t\t</ul>") . "\r\n</div>\r\n" . (($displayData['mod_links'] and ($this->memberData['is_mod'] or $this->memberData['member_id'] == $topic['starter_id'])) ? "<ul class='ipbmenu_content' id='topic_mod_options_menucontent'  style='display:none'>\r\n\t" . $this->__f__22e606c3116c7b44ae2a61154d222f5f($forum, $topic, $post_data, $displayData) . "\t" . (($topic['topic_queuedposts'] and $this->registry->class_forums->canQueuePosts($forum['id'])) ? "\r\n\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=moderate&amp;section=moderate&amp;t={$topic['tid']}&amp;f={$topic['forum_id']}&amp;page={$this->request['page']}&amp;auth_key={$this->member->form_hash}&amp;_fromTopic=1&amp;do=p_approve", "public", ''), "", "") . "\">" . sprintf($this->lang->words['nmo_p_approve'], $topic['topic_queuedposts']) . "</a></li>\r\n\t" : "") . "" . (($topic['topic_queuedposts'] and $this->registry->class_forums->canHardDeletePosts($forum['id'], $topic)) ? "\r\n\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=moderate&amp;section=moderate&amp;t={$topic['tid']}&amp;f={$topic['forum_id']}&amp;page={$this->request['page']}&amp;auth_key={$this->member->form_hash}&amp;_fromTopic=1&amp;do=p_delete_approve", "public", ''), "", "") . "\">" . sprintf($this->lang->words['nmo_p_delete_approve'], $topic['topic_queuedposts']) . "</a></li>\r\n\t" : "") . "" . (($this->registry->class_forums->can_Un_SoftDeletePosts($forum['id']) and $topic['topic_deleted_posts']) ? "\r\n\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=moderate&amp;section=moderate&amp;t={$topic['tid']}&amp;f={$topic['forum_id']}&amp;page={$this->request['page']}&amp;auth_key={$this->member->form_hash}&amp;_fromTopic=1&amp;do=p_restore", "public", ''), "", "") . "\">" . sprintf($this->lang->words['nmo_p_restore'], $topic['topic_deleted_posts']) . "</a></li>\r\n\t" : "") . "" . (($topic['topic_deleted_posts'] and $this->registry->class_forums->canHardDeletePosts($forum['id'], $topic)) ? "\r\n\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=moderate&amp;section=moderate&amp;t={$topic['tid']}&amp;f={$topic['forum_id']}&amp;page={$this->request['page']}&amp;auth_key={$this->member->form_hash}&amp;_fromTopic=1&amp;do=p_delete_softed", "public", ''), "", "") . "\">" . sprintf($this->lang->words['nmo_p_delete_softed'], $topic['topic_deleted_posts']) . "</a></li>\t\r\n\t" : "") . "\r\n\t" . ((is_array($displayData['multi_mod']) and count($displayData['multi_mod'])) ? "\r\n\t\t" . $this->__f__0e3ef980bf6a36017bffa148b7b8a0a7($forum, $topic, $post_data, $displayData) . "\t" : "") . "\r\n</ul>\r\n<script type='text/javascript'>\r\n\tdocument.observe(\"dom:loaded\", function()\r\n\t{\r\n\t\tnew ipb.Menu( \$('topic_mod_options'), \$('topic_mod_options_menucontent') );\r\n\t} );\r\n</script>" : "") . "\r\n<div class='maintitle clear clearfix'>\r\n\t<span class='ipsType_small'>\r\n\t\t" . ($topic['posts'] ? "" . sprintf($topic['posts'] > 1 ? $this->lang->words['x_replies_to_topic'] : $this->lang->words['x_reply_to_topic'], $topic['posts']) . "" : "\r\n\t\t\t{$this->lang->words['no_replies_to_topic']}\r\n\t\t") . "\r\n\t</span>\r\n\t" . ($this->settings['reputation_enabled'] && $this->settings['reputation_point_types'] != 'like' && $this->settings['reputation_show_content'] && $this->memberData['member_id'] != 0 && is_array($this->caches['reputation_levels']) ? "<a href='#rep_filter_menucontent' id='rep_filter' class='right ipsType_smaller'>\r\n\t\t\t" . ($this->memberData['_members_cache']['rep_filter'] && $this->memberData['_members_cache']['rep_filter'] === '*' ? "\r\n\t\t\t\t{$this->lang->words['rep_f_viewing_all']}\r\n\t\t\t" : "\r\n\t\t\t\t" . sprintf($this->lang->words['rep_f_hiding'], $this->memberData['_members_cache']['rep_filter']) . "\r\n\t\t\t") . "\r\n\t\t\t<img src='{$this->settings['img_url']}/useropts_arrow.png' />\r\n\t\t</a>" : "") . "\t\r\n<span class=\"viewSwitch right\">\r\n<a href='#' id=\"viewSwitch_normal\" class=\"viewSwitch_active\"></a>\r\n<a href='#' id=\"viewSwitch_compact\"></a>\r\n</span>\r\n</div>\r\n" . ($this->settings['reputation_enabled'] && $this->settings['reputation_point_types'] != 'like' && $this->settings['reputation_show_content'] && $this->memberData['member_id'] != 0 && is_array($this->caches['reputation_levels']) ? "<ul id='rep_filter_menucontent' class='ipbmenu_content with_checks' style='display: none'>\r\n\t\t<li " . ((isset($this->memberData['_members_cache']['rep_filter']) and $this->memberData['_members_cache']['rep_filter'] === '*') ? "class='selected'" : "") . ">\r\n\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=forums&amp;section=topics&amp;rep_filter=update&amp;f={$topic['forum_id']}&amp;t={$topic['tid']}&amp;secure_key={$this->member->form_hash}&amp;page={$this->request['page']}&amp;rep_filter_set=*", "public", ''), "", "") . "'>{$this->lang->words['rep_f_all_posts']}</a>\r\n\t\t</li>\r\n\t\t" . (is_array($this->caches['reputation_levels']) ? "\r\n\t\t\t" . $this->__f__819a6dc15f373c8280e18a6a1ba0c040($forum, $topic, $post_data, $displayData) . "\t\t" : "") . "\r\n\t</ul>\r\n\t<script type='text/javascript'>\r\n\t\tnew ipb.Menu( \$('rep_filter'), \$('rep_filter_menucontent') );\r\n\t</script>" : "") . "\r\n<div class='topic hfeed clear clearfix'>\r\n\t\r\n\t{$displayData['poll_data']['html']}\r\n" . ((is_array($post_data) and count($post_data)) ? "\r\n\t<div class='ipsBox'>\r\n\t\t<div class='ipsBox_container' id='ips_Posts'>\r\n\t\t\t" . $this->__f__a05249cca02045a3f408667ab42c49bf($forum, $topic, $post_data, $displayData) . "\t\t</div>\r\n\t</div>\r\n" : "") . "\r\n<hr />\r\n<div class='topic_controls clear ipsPad_top_bottom_half'>\r\n\t" . ($topic['SHOW_PAGES'] ? "\r\n\t\t<div class='left'>{$topic['SHOW_PAGES']}</div>\r\n\t" : "") . "\r\n\t<div class='ipsPad_top_slimmer right'>\r\n\t\t" . (($displayData['mod_links'] and ($this->memberData['is_mod'] or $this->memberData['member_id'] == $topic['starter_id'])) ? "\r\n\t\t\t<a href='#' id='topic_mod_options_alt'  class=\"ipsType_small desc\" title='{$this->lang->words['topic_moderation']}'>{$this->lang->words['topic_moderation']}</a> &middot;\r\n\t\t" : "") . "\r\n\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showforum={$forum['id']}", "public", ''), "{$forum['name_seo']}", "showforum") . "' class=\"ipsType_small desc\">" . sprintf($this->lang->words['go_back_to'], $forum['name']) . "</a>\r\n\t\t" . ($forum['_hasUnreadTopics'] ? "\r\n\t\t\t&middot; <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showtopic={$topic['tid']}&amp;view=getnextunread", "public", ''), "{$topic['title_seo']}", "showtopicnextunread") . "' class=\"ipsType_small desc\">{$this->lang->words['goto_next_unread_topic']}</a>\r\n\t\t" : "") . "\r\n\t</div>\t\r\n</div>\r\n" . ($displayData['fast_reply'] && $displayData['reply_button']['url'] ? "<hr />\r\n<div class='ipsBox' id='fast_reply_wrapper'>\r\n\t<div class='ipsBox_container ipsPad'>\r\n\t\t<h1 class='ipsType_subtitle'>{$this->lang->words['topic_add_reply']}</h1>\r\n\t\t" . ($topic['state'] == 'closed' ? "<span class='error'>{$this->lang->words['locked_reply_fr']}</span><br />" : "") . "\r\n\t\t<br />\r\n\t\t" . ($this->memberData['member_id'] ? "\r\n\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'><img src='{$this->memberData['pp_small_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $this->memberData['members_display_name']) . "\" class='ipsUserPhoto ipsUserPhoto_medium' /></a>\r\n\t\t" : "\r\n\t\t\t<div class='left'>" . IPSMember::buildNoPhoto(0, 'small') . "</div>\r\n\t\t") . "\r\n\t\t<div class='ipsBox_withphoto clearfix'>\r\n\t\t\t<form action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("", "public", ''), "", "") . "\" method=\"post\" id='ips_fastReplyForm'>\r\n\t\t\t\t<input type=\"hidden\" name=\"app\" value=\"forums\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"module\" value=\"post\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"section\" value=\"post\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"do\" value=\"reply_post_do\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"f\" value=\"{$forum['id']}\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"t\" value=\"{$topic['tid']}\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"st\" value=\"{$this->request['st']}\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"auth_key\" value=\"{$this->member->form_hash}\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"fast_reply_used\" value=\"1\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"enableemo\" value=\"yes\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"enablesig\" value=\"yes\" />\r\n\t\t\t\t" . ($this->memberData['auto_track'] ? "\r\n\t\t\t\t\t<input type=\"hidden\" name=\"enabletrack\" value=\"1\" />\r\n\t\t\t\t" : "\r\n\t\t\t\t\t<input type=\"hidden\" name=\"enabletrack\" value=\"{$topic['_isLiked']}\" />\r\n\t\t\t\t") . "" . ((is_array($topic['_fastReplyStatusMessage']) and count($topic['_fastReplyStatusMessage']) and strlen($topic['_fastReplyStatusMessage'][0])) ? "\r\n\t\t\t\t\t<div class='message'>" . implode('<br />', $topic['_fastReplyStatusMessage']) . "</div>\r\n\t\t\t\t" : "") . "" . $editor->show('Post', array('type' => 'full', 'minimize' => 1, 'isTypingCallBack' => 'ipb.topic.isTypingCallBack', 'height' => 180, 'legacyMode' => 'off', 'autoSaveKey' => 'reply-' . $topic[tid], 'warnInfo' => 'fastReply', 'modAll' => $topic['_fastReplyModAll']), "") . "\r\n\t\t\t\t<br />\r\n\t\t\t\t\r\n\t\t\t\t<fieldset class='right' id='fast_reply_controls'>\r\n\t\t\t\t\t<input type='submit' name=\"submit\" class='input_submit' value='{$this->lang->words['qr_post']}' tabindex='50' accesskey='s' id='submit_post' />&nbsp;&nbsp;<input type='submit' name=\"preview\" class='input_submit alt' value='{$this->lang->words['qr_more_opts']}' tabindex='51' id='full_compose' />\t\t\t\r\n\t\t\t\t</fieldset>\r\n\t\t\t</form>\r\n\t\t</div>\r\n\t\t<div id='ips_HasReplies'></div>\r\n\t</div>\r\n</div>\r\n<script type='text/javascript'>\r\n\tipb.topic.fastReplyId\t= '{$this->settings['_lastEditorId']}';\r\n</script>" : "" . ($displayData['load_editor_js'] ? "\r\n\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('editors'), 'editorLoadJs') ? $this->registry->getClass('output')->getTemplate('editors')->editorLoadJs(array('smilies' => $displayData['smilies'])) : '') . "\r\n\t" : "") . "") . "\r\n<!-- Close topic -->\r\n</div>\r\n<!-- BOTTOM BUTTONS -->\r\n" . ((!$forum['disable_sharelinks'] and $this->settings['sl_enable']) ? "\r\n\t<br />\r\n\t<div class='clear clearfix left'>\r\n\t\t" . IPSLib::shareLinks($topic['title'], $topic['posts'] > 300 ? array('skip' => array('print', 'download')) : array()) . "\r\n\t</div>\r\n\t<br />\r\n" : "") . "\r\n<!-- SAME TAGGED -->\r\n" . ((is_array($displayData['same_tagged']) and count($displayData['same_tagged'])) ? "\r\n\t<br />\r\n\t<div class='ipsBox'>\r\n\t\t<h3 class='maintitle'>" . sprintf($this->lang->words['topic_same_tagged_as'], $topic['tags']['formatted']['string']) . "</h3>\r\n\t\t<div class='ipsBox_container'>\r\n\t\t\t<table class='ipb_table topic_list'>\r\n\t\t\t" . $this->__f__26b4095dc75e552fb5bcb8bba6e0dc6e($forum, $topic, $post_data, $displayData) . "\t\t\t</table>\r\n\t\t</div>\r\n\t</div>\r\n" : "") . "\r\n<!-- ACTIVE USERS -->\r\n" . ((is_array($displayData['active_users']) and count($displayData['active_users'])) ? "<div id='topic_stats' class='statistics clear clearfix'>\r\n\t\t<div id='topic_active_users' class='active_users'>\r\n\t\t\t<h4 class='statistics_head'>" . sprintf($this->lang->words['active_users_title'], $displayData['active_users']['stats']['total']) . "</h4>\r\n\t\t\t<p class='statistics_brief desc'>" . sprintf($this->lang->words['active_users_detail'], $displayData['active_users']['stats']['members'], $displayData['active_users']['stats']['guests'], $displayData['active_users']['stats']['anon']) . "</p>\r\n\t\t\t" . ((is_array($displayData['active_users']['names']) and count($displayData['active_users']['names'])) ? "\r\n\t\t\t\t<br />\r\n\t\t\t\t<ul class='ipsList_inline'>\r\n\t\t\t\t\t" . implode(', ', $displayData['active_users']['names']) . "\r\n\t\t\t\t</ul>\r\n\t\t\t" : "") . "\r\n\t\t</div>\r\n\t</div>" : "") . "\r\n" . ($this->request['gopid'] ? "\r\n<script type='text/javascript'>\r\n\tvar gopid = \"{$this->request['gopid']}\".replace(/&amp;/g, '');\r\n\tipb.topic.scrollToPost( parseInt( gopid ) );\r\n</script>\r\n" : "") . "\r\n" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'include_highlighter') ? $this->registry->getClass('output')->getTemplate('global')->include_highlighter(1) : '') . "\r\n<div id='multiQuoteInsert' style='display: none;' class='ipsFloatingAction'>\r\n\t<span class='ipsButton no_width' id='mqbutton'>{$this->lang->words['mq_reply_quoted_posts']}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='#' id='multiQuoteClear' class='ipsType_smaller desc' title='{$this->lang->words['mq_clear_desc']}'>{$this->lang->words['mq_clear']}</a> &nbsp;&nbsp;&nbsp;\r\n</div>\r\n<form id=\"modform\" method=\"post\" action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("", "public", ''), "", "") . "\">\r\n\t<input type=\"hidden\" name=\"app\" value=\"forums\" />\r\n\t<input type=\"hidden\" name=\"module\" value=\"moderate\" />\r\n\t<input type=\"hidden\" name=\"section\" value=\"moderate\" />\r\n\t<input type=\"hidden\" name=\"do\" value=\"postchoice\" />\r\n\t<input type=\"hidden\" name=\"f\" value=\"{$topic['forum_id']}\" />\r\n\t<input type=\"hidden\" name=\"t\" value=\"{$topic['tid']}\" />\r\n\t<input type=\"hidden\" name=\"auth_key\" value=\"{$this->member->form_hash}\" />\r\n\t<input type=\"hidden\" name=\"st\" value=\"{$this->request['st']}\" />\r\n\t<input type=\"hidden\" value=\"{$this->request['selectedpids']}\" name=\"selectedpidsJS\" id='selectedpidsJS' />\r\n\t<input type=\"hidden\" name=\"tact\" id=\"tact\" value=\"\" />\r\n</form>";
     return $IPBHTML;
 }
Exemplo n.º 4
0
 /**
  * Modern profile
  *
  * @return	@e void		[Outputs to screen]
  */
 protected function _viewModern()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $member_id = intval($this->request['id']) ? intval($this->request['id']) : intval($this->request['MID']);
     if (!$member_id) {
         $this->registry->output->showError('profiles_no_member', 10246.0, null, null, 404);
     }
     //-----------------------------------------
     // Grab all data...
     //-----------------------------------------
     $member = IPSMember::load($member_id, 'profile_portal,pfields_content,sessions,groups', 'id');
     //-----------------------------------------
     // Can we access?
     //-----------------------------------------
     if (!$this->memberData['g_mem_info'] && $this->memberData['member_id'] != $member['member_id']) {
         $this->registry->output->showError('profiles_off', 10245, null, null, 403);
     }
     $tab = substr(IPSText::alphanumericalClean(str_replace('..', '', trim($this->request['tab']))), 0, 20);
     $firsttab = '';
     $friends = array();
     $visitors = array();
     $comment_perpage = 5;
     $pips = 0;
     $default_tab = '';
     $tabs = array();
     $_tabs = array();
     $_positions = array(0 => 0);
     $_member_ids = array();
     $sql_extra = '';
     $pass = 0;
     $mod = 0;
     $_todays_date = getdate();
     $_rCustom = intval($this->request['removeCustomization']);
     $_dCustom = intval($this->request['disableCustomization']);
     $time_adjust = $this->settings['time_adjust'] == "" ? 0 : $this->settings['time_adjust'];
     $board_posts = $this->caches['stats']['total_topics'] + $this->caches['stats']['total_replies'];
     $seenFiles = array();
     /* Removing customization? */
     if ($_rCustom and ($member_id == $this->memberData['member_id'] or $this->memberData['g_access_cp'] or $this->memberData['g_is_supmod'] and !$member['g_access_cp']) and $this->request['secure_key'] == $this->member->form_hash) {
         IPSMember::save($member_id, array('extendedProfile' => array('pp_customization' => serialize(array()))));
     } else {
         if ($_rCustom) {
             $this->registry->output->showError('profile_no_remove_perm', '10246.-1', null, null, 403);
         }
     }
     /* Disable? */
     if ($_dCustom and ($this->memberData['g_access_cp'] or $this->memberData['g_is_supmod'] and !$member['g_access_cp']) and $this->request['secure_key'] == $this->member->form_hash) {
         IPSMember::save($member_id, array('core' => array('bw_disable_customization' => 1)));
     } else {
         if ($_dCustom) {
             $this->registry->output->showError('profile_no_remove_perm', '10246.-1', null, null, 403);
         }
     }
     if (!$member['member_id']) {
         $this->registry->output->showError('profiles_no_member', 10246, null, null, 404);
     }
     /* Member banned or is spammer? */
     if (IPSMember::isInactive($member) && !$this->memberData['g_is_supmod']) {
         $this->registry->output->showError('profiles_not_active', '10246.1', null, null, 403);
     }
     //-----------------------------------------
     // Configure tabs
     //-----------------------------------------
     foreach (IPSLib::getEnabledApplications() as $appDir => $app) {
         /* Path to tabs */
         $custom_path = IPSLib::getAppDir($appDir) . '/extensions/profileTabs';
         if (is_dir($custom_path)) {
             foreach (new DirectoryIterator($custom_path) as $f) {
                 if (!$f->isDot() && !$f->isDir()) {
                     $file = $f->getFileName();
                     if ($file[0] == '.') {
                         continue;
                     }
                     if (preg_match('#\\.conf\\.php$#i', $file)) {
                         $classname = str_replace(".conf.php", "", $file);
                         /* Block the old about me file */
                         if ($classname == 'aboutme') {
                             continue;
                         }
                         $CONFIG = array();
                         require $custom_path . '/' . $file;
                         /*noLibHook*/
                         //-------------------------------
                         // Allowed to use?
                         //-------------------------------
                         if ($CONFIG['plugin_enabled']) {
                             /* Block friends tab if we have disabled friends or friends feature is shut off */
                             if ($CONFIG['plugin_key'] == 'friends' and (!$member['pp_setting_count_friends'] or !$this->settings['friends_enabled'])) {
                                 continue;
                             }
                             $CONFIG['app'] = $appDir;
                             $_position = $this->_getTabPosition($_positions, $CONFIG['plugin_order']);
                             $_tabs[$_position] = $CONFIG;
                             $_positions[] = $_position;
                         }
                     }
                 }
             }
         }
     }
     ksort($_tabs);
     foreach ($_tabs as $_pos => $data) {
         $data['_lang'] = isset($this->lang->words[$data['plugin_lang_bit']]) ? $this->lang->words[$data['plugin_lang_bit']] : $data['plugin_name'];
         $tabs[$data['plugin_key']] = $data;
     }
     if ($tab && @is_file(IPSLib::getAppDir($tabs[$tab]['app']) . '/extensions/profileTabs/' . $tab . '.php')) {
         $default_tab = $tabs[$tab]['app'] . ':' . $tab;
         /* Update <title> */
         $this->lang->words['page_title_pp'] .= ': ' . $tabs[$tab]['_lang'];
     } else {
         $default_tab = 'core:info';
     }
     $friends = $this->_getRandomFriends($member);
     /* Check USER permalink... */
     $this->registry->getClass('output')->checkPermalink($member['members_seo_name'] ? $member['members_seo_name'] : IPSText::makeSeoTitle($member['members_display_name']));
     /* Build data */
     $member = IPSMember::buildDisplayData($member, array('customFields' => 1, 'cfSkinGroup' => 'profile', 'checkFormat' => 1, 'cfGetGroupData' => 1, 'signature' => 1, 'spamStatus' => 1));
     //-----------------------------------------
     // Recent visitor?
     //-----------------------------------------
     if ($member['member_id'] != $this->memberData['member_id'] && !IPSMember::isLoggedInAnon($this->memberData)) {
         $this->_addRecentVisitor($member, $this->memberData['member_id']);
     }
     //-----------------------------------------
     // DST?
     //-----------------------------------------
     if ($member['dst_in_use'] == 1) {
         $member['time_offset'] += 1;
     }
     //-----------------------------------------
     // Format extra user data
     //-----------------------------------------
     $member['_age'] = $member['bday_year'] ? date('Y') - $member['bday_year'] : 0;
     if ($member['bday_month'] > date('n')) {
         $member['_age'] -= 1;
     } else {
         if ($member['bday_month'] == date('n')) {
             if ($member['bday_day'] > date('j')) {
                 $member['_age'] -= 1;
             }
         }
     }
     $member['_local_time'] = $member['time_offset'] != "" ? gmstrftime($this->settings['clock_long'], time() + $member['time_offset'] * 3600 + $time_adjust * 60) : '';
     $member['g_title'] = IPSMember::makeNameFormatted($member['g_title'], $member['g_id'], $member['prefix'], $member['suffix']);
     $member['_bday_month'] = $member['bday_month'] ? $this->lang->words['M_' . $member['bday_month']] : 0;
     //-----------------------------------------
     // Visitors
     //-----------------------------------------
     if ($member['pp_setting_count_visitors']) {
         $_pp_last_visitors = unserialize($member['pp_last_visitors']);
         $_visitor_info = array();
         if (is_array($_pp_last_visitors)) {
             krsort($_pp_last_visitors);
             $_members = IPSMember::load(array_values($_pp_last_visitors), 'extendedProfile');
             foreach ($_members as $_id => $_member) {
                 $_visitor_info[$_id] = IPSMember::buildDisplayData($_member, array('reputation' => 0, 'warn' => 0));
             }
             foreach ($_pp_last_visitors as $_time => $_id) {
                 if (!$_visitor_info[$_id]['members_display_name_short']) {
                     $_visitor_info[$_id] = IPSMember::buildDisplayData(IPSMember::setUpGuest(), array('reputation' => 0, 'warn' => 0));
                 }
                 $_visitor_info[$_id]['_visited_date'] = ipsRegistry::getClass('class_localization')->getDate($_time, 'TINY');
                 $_visitor_info[$_id]['members_display_name_short'] = $_visitor_info[$_id]['members_display_name_short'] ? $_visitor_info[$_id]['members_display_name_short'] : $this->lang->words['global_guestname'];
                 $visitors[] = $_visitor_info[$_id];
                 if (count($visitors) == 5) {
                     break;
                 }
             }
         }
     }
     //-----------------------------------------
     // Online location
     //-----------------------------------------
     $member = IPSMember::getLocation($member);
     //-----------------------------------------
     // Add profile view
     //-----------------------------------------
     $this->DB->insert('profile_portal_views', array('views_member_id' => $member['member_id']), true);
     //-----------------------------------------
     // Grab default tab...
     //-----------------------------------------
     $tab_html = '';
     if ($tab) {
         if (@is_file(IPSLib::getAppDir($tabs[$tab]['app']) . '/extensions/profileTabs/' . $tab . '.php')) {
             require IPSLib::getAppDir('members') . '/sources/tabs/pluginParentClass.php';
             /*noLibHook*/
             $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir($tabs[$tab]['app']) . '/extensions/profileTabs/' . $tab . '.php', 'profile_' . $tab, $tabs[$tab]['app']);
             $plugin = new $classToLoad($this->registry);
             $tab_html = $plugin->return_html_block($member);
         }
     }
     //-----------------------------------------
     // Set description tag
     //-----------------------------------------
     $_desc = $member['pp_about_me'] ? $member['pp_about_me'] : $member['signature'];
     if ($_desc) {
         $this->registry->output->addMetaTag('description', $member['members_display_name'] . ': ' . IPSText::xssMakeJavascriptSafe(IPSText::getTextClass('bbcode')->stripAllTags($_desc)));
     }
     /* Reputation */
     if ($this->settings['reputation_protected_groups']) {
         if (in_array($member['member_group_id'], explode(",", $this->settings['reputation_protected_groups']))) {
             $this->settings['reputation_show_profile'] = false;
         }
     }
     //-----------------------------------------
     // Try to "fix" empty custom field groups
     //-----------------------------------------
     foreach ($member['custom_fields'] as $group => $mdata) {
         if ($group != 'profile_info' and $group != 'contact') {
             if (is_array($member['custom_fields'][$group]) and count($member['custom_fields'][$group])) {
                 $_count = 0;
                 foreach ($member['custom_fields'][$group] as $key => $value) {
                     if ($value) {
                         $_count++;
                     }
                 }
                 if (!$_count) {
                     unset($member['custom_fields'][$group]);
                 }
             }
         } else {
             if ($group == 'contact') {
                 $show_contact = false;
                 foreach ($member['custom_fields'][$group] as $key => $value) {
                     $_val = preg_replace('/<!--(.|\\s)*?-->/', '', $value);
                     if ($_val) {
                         $show_contact = true;
                         break;
                     }
                 }
             }
         }
     }
     //-----------------------------------------
     // Format signature
     //-----------------------------------------
     if ($member['signature']) {
         IPSText::getTextClass('bbcode')->parse_html = $member['g_dohtml'];
         IPSText::getTextClass('bbcode')->parse_nl2br = 1;
         IPSText::getTextClass('bbcode')->parse_smilies = 0;
         IPSText::getTextClass('bbcode')->parse_bbcode = 1;
         IPSText::getTextClass('bbcode')->parsing_section = 'signatures';
         IPSText::getTextClass('bbcode')->parsing_mgroup = $member['member_group_id'];
         IPSText::getTextClass('bbcode')->parsing_mgroup_others = $member['mgroup_others'];
         $member['signature'] = IPSText::getTextClass('bbcode')->preDisplayParse($member['signature']);
         $member['signature'] = $this->registry->getClass('output')->getTemplate('global')->signature_separator($member['signature']);
     }
     //-----------------------------------------
     // Format 'About me'
     //-----------------------------------------
     if ($member['pp_about_me']) {
         IPSText::getTextClass('bbcode')->parse_html = $member['g_dohtml'];
         IPSText::getTextClass('bbcode')->parse_nl2br = 1;
         IPSText::getTextClass('bbcode')->parse_smilies = 1;
         IPSText::getTextClass('bbcode')->parse_bbcode = 1;
         IPSText::getTextClass('bbcode')->parsing_section = 'aboutme';
         IPSText::getTextClass('bbcode')->parsing_mgroup = $member['member_group_id'];
         IPSText::getTextClass('bbcode')->parsing_mgroup_others = $member['mgroup_others'];
         $member['pp_about_me'] = IPSText::getTextClass('bbcode')->preDisplayParse(IPSText::getTextClass('bbcode')->preDbParse($member['pp_about_me']));
     }
     /* final data */
     if ($default_tab == 'core:info') {
         /* Load status class */
         if (!$this->registry->isClassLoaded('memberStatus')) {
             $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/member/status.php', 'memberStatus');
             $this->registry->setClass('memberStatus', new $classToLoad(ipsRegistry::instance()));
         }
         /* Fetch */
         $status = $this->registry->getClass('memberStatus')->fetchMemberLatest($member['member_id']);
     }
     //-----------------------------------------
     // Warnings?
     //-----------------------------------------
     $warns = array();
     if ($member['show_warn']) {
         if ($member['member_banned']) {
             $warns['ban'] = 0;
             $_warn = ipsRegistry::DB()->buildAndFetch(array('select' => 'wl_id', 'from' => 'members_warn_logs', 'where' => "wl_member={$member['member_id']} AND wl_suspend<>0 AND wl_suspend<>-2", 'order' => 'wl_date DESC', 'limit' => 1));
             if ($_warn['wl_id']) {
                 $warns['ban'] = $_warn['wl_id'];
             }
         }
         if ($member['temp_ban']) {
             $warns['suspend'] = 0;
             $_warn = ipsRegistry::DB()->buildAndFetch(array('select' => 'wl_id', 'from' => 'members_warn_logs', 'where' => "wl_member={$member['member_id']} AND wl_suspend<>0 AND wl_suspend<>-2", 'order' => 'wl_date DESC', 'limit' => 1));
             if ($_warn['wl_id']) {
                 $warns['suspend'] = $_warn['wl_id'];
             }
         }
         if ($member['restrict_post']) {
             $warns['rpa'] = 0;
             $_warn = ipsRegistry::DB()->buildAndFetch(array('select' => 'wl_id', 'from' => 'members_warn_logs', 'where' => "wl_member={$member['member_id']} AND wl_rpa<>0", 'order' => 'wl_date DESC', 'limit' => 1));
             if ($_warn['wl_id']) {
                 $warns['rpa'] = $_warn['wl_id'];
             }
         }
         if ($member['mod_posts']) {
             $warns['mq'] = 0;
             $_warn = ipsRegistry::DB()->buildAndFetch(array('select' => 'wl_id', 'from' => 'members_warn_logs', 'where' => "wl_member={$member['member_id']} AND wl_mq<>0", 'order' => 'wl_date DESC', 'limit' => 1));
             if ($_warn['wl_id']) {
                 $warns['mq'] = $_warn['wl_id'];
             }
         }
     }
     //-----------------------------------------
     // Add to output
     //-----------------------------------------
     $this->request['member_id'] = intval($this->request['showuser']);
     $this->member_name = $member['members_display_name'];
     $this->output = $this->registry->getClass('output')->getTemplate('profile')->profileModern($tabs, $member, $visitors, $default_tab, $tab_html, $friends, $status, $warns, $show_contact);
 }
Exemplo n.º 5
0
    /**
     * Member editing screen
     *
     * @param	array 		Member data
     * @param	array 		Content
     * @param	string		Menu
     * @param	array 		Notification data
     * @return	string		HTML
     */
    public function member_view($member, $content, $menu, $notifications)
    {
        // Let's get to work..... :/
        $_m_groups = array();
        $_m_groups_others = array();
        $member['_cache'] = @unserialize($member['members_cache']);
        foreach (ipsRegistry::cache()->getCache('group_cache') as $id => $data) {
            // If we are viewing our own profile, don't show non admin groups as a primary group option to prevent the user from
            // accidentally removing their own ACP access.  Groups without ACP access can still be selected as secondary groups.
            if ($member['member_id'] == $this->memberData['member_id']) {
                //-----------------------------------------
                // If we can't access cp via primary group
                //-----------------------------------------
                if (!$this->caches['group_cache'][$member['member_group_id']]['g_access_cp']) {
                    //-----------------------------------------
                    // Can this group access cp?
                    //-----------------------------------------
                    if (!$data['g_access_cp']) {
                        $_m_groups[] = array($data['g_id'], $data['g_title']);
                        $_m_groups_others[] = array($data['g_id'], $data['g_title']);
                    } else {
                        $_m_groups_others[] = array($data['g_id'], $data['g_title']);
                    }
                } else {
                    if (!$data['g_access_cp']) {
                        $_m_groups_others[] = array($data['g_id'], $data['g_title']);
                    } else {
                        $_m_groups[] = array($data['g_id'], $data['g_title']);
                        $_m_groups_others[] = array($data['g_id'], $data['g_title']);
                    }
                }
            } else {
                $_m_groups[] = array($data['g_id'], $data['g_title']);
                $_m_groups_others[] = array($data['g_id'], $data['g_title']);
            }
        }
        $years = array(array(0, '----'));
        $months = array(array(0, '--------'));
        $days = array(array(0, '--'));
        foreach (range(1, 31) as $_day) {
            $days[] = array($_day, $_day);
        }
        foreach (array_reverse(range(date('Y') - 100, date('Y'))) as $_year) {
            $years[] = array($_year, $_year);
        }
        foreach (range(1, 12) as $_month) {
            $months[] = array($_month, $this->lang->words['M_' . $_month]);
        }
        $time_zones = array();
        foreach ($this->lang->words as $k => $v) {
            if (strpos($k, 'time_') === 0) {
                if (preg_match("/[\\-0-9]/", substr($k, 5))) {
                    $offset = floatval(substr($k, 5));
                    $time_zones[] = array($offset, $v);
                }
            }
        }
        $languages = array();
        foreach (ipsRegistry::cache()->getCache('lang_data') as $language) {
            $languages[] = array($language['lang_id'], $language['lang_title']);
        }
        $pm_options = array(0 => array(0, $this->lang->words['mem_edit_pm_no']), 1 => array(1, $this->lang->words['mem_edit_pm_yes']), 2 => array(2, $this->lang->words['mem_edit_pm_yes_really']));
        $_skin_list = $this->registry->output->generateSkinDropdown();
        array_unshift($_skin_list, array(0, $this->lang->words['sm_skinnone']));
        $skinList = ipsRegistry::getClass('output')->formDropdown("skin", $_skin_list, $member['skin']);
        $sigHtmlChecked = $member['bw_html_sig'] ? 'checked="checked"' : '';
        $form_member_group_id = ipsRegistry::getClass('output')->formDropdown("member_group_id", $_m_groups, $member['member_group_id']);
        $form_mgroup_others = ipsRegistry::getClass('output')->formMultiDropdown("mgroup_others[]", $_m_groups_others, explode(",", $member['mgroup_others']), 8, 'mgroup_others');
        $form_title = ipsRegistry::getClass('output')->formInput("title", $member['title']);
        $form_warn = ipsRegistry::getClass('output')->formInput("warn_level", $member['warn_level']);
        $_form_year = ipsRegistry::getClass('output')->formDropdown("bday_year", $years, $member['bday_year']);
        $_form_month = ipsRegistry::getClass('output')->formDropdown("bday_month", $months, $member['bday_month']);
        $_form_day = ipsRegistry::getClass('output')->formDropdown("bday_day", $days, $member['bday_day']);
        $form_time_offset = ipsRegistry::getClass('output')->formDropdown("time_offset", $time_zones, $member['time_offset'] ? floatval($member['time_offset']) : 0);
        $form_auto_dst = ipsRegistry::getClass('output')->formCheckbox("dstCheck", $member['members_auto_dst'], 1, "dst", "onclick='toggle_dst()'");
        $form_dst_now = ipsRegistry::getClass('output')->formCheckbox("dstOption", $member['dst_in_use'], 1, "dstManual");
        $form_language = ipsRegistry::getClass('output')->formDropdown("language", $languages, $member['language']);
        $form_allow_admin_mails = ipsRegistry::getClass('output')->formYesNo("allow_admin_mails", $member['allow_admin_mails']);
        $form_members_disable_pm = ipsRegistry::getClass('output')->formDropdown("members_disable_pm", $pm_options, $member['members_disable_pm']);
        $form_view_sig = ipsRegistry::getClass('output')->formYesNo("view_sigs", $member['view_sigs']);
        $form_reputation_points = ipsRegistry::getClass('output')->formInput('pp_reputation_points', $member['pp_reputation_points']);
        $bw_no_status_update = ipsRegistry::getClass('output')->formYesNo("bw_no_status_update", $member['bw_no_status_update']);
        $bw_disable_customization = ipsRegistry::getClass('output')->formYesNo("bw_disable_customization", $member['bw_disable_customization']);
        $form_uploader = ipsRegistry::getClass('output')->formDropdown("member_uploader", array(array('flash', $this->lang->words['mem__flashuploader']), array('default', $this->lang->words['mem__defuploader'])), $member['member_uploader']);
        $form_popup = ipsRegistry::getClass('output')->formYesNo("show_notification_popup", $member['_cache']['show_notification_popup']);
        $form_autotrack = ipsRegistry::getClass('output')->formYesNo("auto_track", $member['auto_track'] ? 1 : 0);
        $form_autotrackmthd = ipsRegistry::getClass('output')->formDropdown("auto_track_method", array(array('none', $this->lang->words['mem__auto_none']), array('immediate', $this->lang->words['mem__auto_immediate']), array('offline', $this->lang->words['mem__auto_delayed']), array('daily', $this->lang->words['mem__auto_daily']), array('weekly', $this->lang->words['mem__auto_weekly'])), $member['auto_track']);
        $secure_key = ipsRegistry::getClass('adminFunctions')->getSecurityKey();
        $ban_member_text = $member['member_banned'] ? $this->lang->words['sm_unban'] : $this->lang->words['sm_ban'];
        $spam_member_text = $member['bw_is_spammer'] ? $this->lang->words['sm_unspam'] : $this->lang->words['sm_spam'];
        $bw_disable_tagging = ipsRegistry::getClass('output')->formYesNo("bw_disable_tagging", $member['bw_disable_tagging']);
        $bw_disable_prefixes = ipsRegistry::getClass('output')->formYesNo("bw_disable_prefixes", $member['bw_disable_prefixes']);
        //-----------------------------------------
        // Comments and friends..
        //-----------------------------------------
        $pp_visitors = ipsRegistry::getClass('output')->formYesNo("pp_setting_count_visitors", $member['pp_setting_count_visitors']);
        $pp_enable_comments = ipsRegistry::getClass('output')->formYesNo("pp_setting_count_comments", $member['pp_setting_count_comments']);
        $pp_enable_friends = ipsRegistry::getClass('output')->formYesNo("pp_setting_count_friends", $member['pp_setting_count_friends']);
        $_commentsApprove = array(array('0', $this->lang->words['sm_comments_app_none']), array('1', $this->lang->words['sm_comments_app_on']));
        $_friendsApprove = array(array('0', $this->lang->words['sm_friends_app_none']), array('1', $this->lang->words['sm_friends_app_on']));
        $pp_comments_approve = ipsRegistry::getClass('output')->formDropdown("pp_setting_moderate_comments", $_commentsApprove, $member['pp_setting_moderate_comments']);
        $pp_friends_approve = ipsRegistry::getClass('output')->formDropdown("pp_setting_moderate_friends", $_friendsApprove, $member['pp_setting_moderate_friends']);
        $suspend_date = '';
        if ($member['temp_ban']) {
            $s_ban = IPSMember::processBanEntry($member['temp_ban']);
            $suspend_date = "<div class='warning'>" . $this->lang->words['member_supsended_til'] . ' ' . ipsRegistry::getClass('class_localization')->getDate($s_ban['date_end'], 'LONG', 1) . "</div>";
        }
        $IPBHTML = "";
        $IPBHTML .= <<<HTML
<script type="text/javascript" src="{$this->settings['js_main_url']}acp.members.js"></script>

<div class='section_title'>
\t<h2>{$this->lang->words['editing_member']} {$member['members_display_name']}</h2>
\t<ul class='context_menu'>
HTML;
        if (IPSLib::appIsInstalled('nexus')) {
            $IPBHTML .= <<<HTML
\t\t<li>
\t\t\t<a href="{$this->settings['base_url']}app=nexus&amp;module=customers&amp;section=view&amp;member_id={$member['member_id']}">
\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icon_components/nexus.png' alt='{$this->lang->words['view_customer_data']}' />
\t\t\t\t{$this->lang->words['form_viewcustomer']}
\t\t\t</a>
\t\t</li>
HTML;
        }
        if ($this->registry->getClass('class_permissions')->checkPermission('member_login', 'members', 'members')) {
            if (IPSMember::isInactive($member)) {
                $IPBHTML .= <<<HTML
\t\t<li class='disabled'>
\t\t\t<a href="#" onclick='alert("{$this->lang->words['member_login_ban_or_spam']}")'>
\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/key.png' alt='{$this->lang->words['member_login']}' />
\t\t\t\t{$this->lang->words['member_login']}
\t\t\t</a>
\t\t</li>
HTML;
            } else {
                $IPBHTML .= <<<HTML
\t\t<li>
\t\t\t<a href="{$this->settings['base_url']}app=members&amp;module=members&amp;section=members&amp;do=member_login&amp;member_id={$member['member_id']}" target="_blank">
\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/key.png' alt='{$this->lang->words['member_login']}' />
\t\t\t\t{$this->lang->words['member_login']}
\t\t\t</a>
\t\t</li>
HTML;
            }
        }
        if ($member['member_id'] != $this->memberData['member_id']) {
            $IPBHTML .= <<<HTML
\t\t<li>
\t\t\t<a href='#' id='MF__ban2' title='{$this->lang->words['title_ban']}'>
\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/user_warn.png' alt='{$this->lang->words['title_ban']}' />
\t\t\t\t{$ban_member_text}
\t\t\t</a>
\t\t\t
\t\t\t<script type='text/javascript'>
\t\t\t\t\$('MF__ban2').observe('click', acp.members.banManager.bindAsEventListener( this, "app=members&amp;module=ajax&amp;section=editform&amp;do=show&amp;name=inline_ban_member&amp;member_id={$member['member_id']}" ) );
\t\t\t</script>
\t\t</li>
HTML;
        }
        $IPBHTML .= <<<HTML
\t\t<li>
\t\t\t<a href='#' class='ipbmenu' id='member_tasks' title='{$this->lang->words['title_tasks']}'><img src='{$this->settings['skin_acp_url']}/images/icons/cog.png' /> {$this->lang->words['mem_tasks']} <img src='{$this->settings['skin_acp_url']}/images/useropts_arrow.png' /></a>
\t\t</li>
\t\t<li class='closed'>
\t\t\t<a href="#" title='{$this->lang->words['title_delete']}' onclick="return acp.confirmDelete( '{$this->settings['base_url']}app=members&amp;module=members&amp;section=members&amp;do=member_delete&amp;member_id={$member['member_id']}')">
\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/delete.png' alt='{$this->lang->words['title_delete']}' />
\t\t\t\t{$this->lang->words['form_deletemember']}
\t\t\t</a>
\t\t</li>
\t</ul>
</div>

<ul class='ipbmenu_content' id='member_tasks_menucontent' style='display: none'>
\t<li>
\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/flag_red.png' alt='{$spam_member_text}' /> <a style='text-decoration: none' href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=toggleSpam&amp;member_id={$member['member_id']}&amp;secure_key={$secure_key}' title='{$this->lang->words['title_spam']}'>{$spam_member_text}</a>
\t</li>
HTML;
        if ($member['member_group_id'] == $this->settings['auth_group']) {
            $IPBHTML .= <<<HTML
\t\t<li>
\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/tick.png' alt='{$this->lang->words['title_validate']}' /> <a style='text-decoration: none' href="{$this->settings['base_url']}app=members&amp;module=members&amp;section=tools&amp;do=do_validating&amp;mid_{$member['member_id']}=1&amp;type=approve&amp;_return={$member['member_id']}" title='{$this->lang->words['title_validate']}'>{$this->lang->words['button_validate']}</a>
\t\t</li>
HTML;
        }
        if (is_array($menu) and count($menu)) {
            foreach ($menu as $app => $link) {
                if (is_array($link) and count($link)) {
                    foreach ($link as $alink) {
                        $img = $alink['img'] ? $alink['img'] : $this->settings['skin_acp_url'] . '/images/icons/user.png';
                        if (stristr($alink['url'], '</a>') && stristr($alink['url'], '<a ')) {
                            $IPBHTML .= <<<HTML
\t\t\t\t\t\t<li><img src='{$img}' alt='-' /> {$alink['url']}</li>
HTML;
                        } else {
                            $thisLink = $alink['js'] ? 'href="#" onclick="' . $alink['url'] . '"' : "href='{$this->settings['_base_url']}app={$app}&amp;{$alink['url']}&amp;member_id={$member['member_id']}'";
                            $IPBHTML .= <<<HTML
\t\t\t\t\t\t<li><img src='{$img}' alt='-' /> <a {$thisLink} style='text-decoration: none' >{$alink['title']}</a></li>
HTML;
                        }
                    }
                }
            }
        }
        $IPBHTML .= <<<HTML
</ul>
{$suspend_date}
<br style='clear: both' />
HTML;
        $_public = PUBLIC_DIRECTORY;
        $IPBHTML .= <<<HTML
<div class='acp-box'>
<form style='display:block' action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=member_edit&amp;member_id={$member['member_id']}&amp;secure_key={$secure_key}' method='post'>

<h3>{$this->lang->words['editing_member']}</h3>
<div id='tabstrip_members' class='ipsTabBar with_left with_right'>
\t<span class='tab_left'>&laquo;</span>
\t<span class='tab_right'>&raquo;</span>
\t<ul>
\t\t<li id='tab_MEMBERS_1'>{$this->lang->words['mem_tab_basics']}</li>
\t\t<li id='tab_MEMBERS_2'>{$this->lang->words['mem_tab_profile']}</li>
\t\t<li id='tab_MEMBERS_3'>{$this->lang->words['mem_tab_notifications']}</li>
HTML;
        // Got blocks from other apps?
        $IPBHTML .= implode("\n", $content['tabs']);
        if ($this->settings['auth_allow_dnames']) {
            $display_name = <<<HTML
\t\t\t<tr>
\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['mem_display_name']}</strong></td>
\t\t\t\t<td class='field_field'>
\t\t\t\t\t<span class='member_detail' id='MF__member_display_name'>{$member['members_display_name']}</span>
\t\t\t\t\t<a class='change_icon' id='MF__member_display_name_popup' href='' style='cursor:pointer' title='{$this->lang->words['title_display_name']}'>{$this->lang->words['mem_change_button']}</a>
\t\t\t\t\t
\t\t\t\t\t<script type='text/javascript'>
\t\t\t\t\t\t\$('MF__member_display_name_popup').observe('click', acp.members.editField.bindAsEventListener( this, 'MF__member_display_name', "{$this->lang->words['sm_display']}", "app=members&amp;module=ajax&amp;section=editform&amp;do=show&amp;name=inline_form_display_name&amp;member_id={$member['member_id']}" ) );
\t\t\t\t\t</script>
\t\t\t\t</td>
\t\t\t</tr>
HTML;
        } else {
            $display_name = '';
        }
        /* Facebook doesn't pass a size, so in IPB we get around that by passing * as a width. This confuses the form here, so.. */
        $_pp_box_width = ($member['pp_main_width'] == '*' or $member['pp_main_width'] < 100) ? '100' : $member['pp_main_width'];
        $_pp_max_width = $member['pp_main_width'] == '*' ? ';max-width:100px' : '';
        $IPBHTML .= <<<HTML
</ul>
 </div>
<div id='tabstrip_members_content' class='ipsTabBar_content'>
\t<div id='tab_MEMBERS_1_content' class='row1'>
\t\t<div style='float: left; width: 70%'>
\t\t\t<table class='ipsTable double_pad'>
\t\t\t\t{$display_name}
\t\t\t\t<tr>
\t\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['mem_login_name']}</strong></td>
\t\t\t\t\t<td class='field_field'>
\t\t\t\t\t\t<span class='member_detail' id='MF__name'>{$member['name']}</span>
\t\t\t\t\t\t<a href='' class='change_icon' style='cursor:pointer' id='MF__name_popup' title='{$this->lang->words['title_login_name']}'>{$this->lang->words['mem_change_button']}</a>
\t\t\t\t\t\t<script type='text/javascript'>
\t\t\t\t\t\t\t\$('MF__name_popup').observe('click', acp.members.editField.bindAsEventListener( this, 'MF__name', "{$this->lang->words['sm_loginname']}", "app=members&amp;module=ajax&amp;section=editform&amp;do=show&amp;name=inline_form_name&amp;member_id={$member['member_id']}" ) );
\t\t\t\t\t\t</script>
\t\t\t\t\t</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['mem_password']}</strong></td>
\t\t\t\t\t<td class='field_field'>
\t\t\t\t\t\t
\t\t\t\t\t\t<span class='member_detail' id='MF__password'>************</span> 
\t\t\t\t\t\t<a href='' class='change_icon' style='cursor:pointer' id='MF__password_popup' title='{$this->lang->words['title_password']}'>{$this->lang->words['mem_change_button']}</a>
\t\t\t\t\t\t<script type='text/javascript'>
\t\t\t\t\t\t\t\$('MF__password_popup').observe('click', acp.members.editField.bindAsEventListener( this, 'MF__password', "{$this->lang->words['sm_password']}", "app=members&amp;module=ajax&amp;section=editform&amp;do=show&amp;name=inline_password&amp;member_id={$member['member_id']}" ) );
\t\t\t\t\t\t</script>
\t\t\t\t\t</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['mem_email']}</strong></td>
\t\t\t\t\t<td class='field_field'>
\t\t\t\t\t\t<span class='member_detail' id='MF__email'>{$member['email']}</span> 
\t\t\t\t\t\t<a href='' class='change_icon' style='cursor:pointer' id='MF__email_popup' title='{$this->lang->words['title_email']}'>{$this->lang->words['mem_change_button']}</a>
\t\t\t\t\t\t<script type='text/javascript'>
\t\t\t\t\t\t\t\$('MF__email_popup').observe('click', acp.members.editField.bindAsEventListener( this, 'MF__email', "{$this->lang->words['sm_email']}", "app=members&amp;module=ajax&amp;section=editform&amp;do=show&amp;name=inline_email&amp;member_id={$member['member_id']}" ) );
\t\t\t\t\t\t</script>
\t\t\t\t\t</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['mem_form_title']}</strong></td>
\t\t\t\t\t<td class='field_field'>
\t\t\t\t\t\t<span id='MF__title'>{$form_title}</span>
\t\t\t\t\t</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['mem_p_group']}</strong></td>
\t\t\t\t\t<td class='field_field'>
\t\t\t\t\t\t<span id='MF__member_group_id'>{$form_member_group_id}</span>
\t\t\t\t\t</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['mem_s_group']}</strong></td>
\t\t\t\t\t<td class='field_field'>
\t\t\t\t\t\t<span id='MF__mgroup_others'>{$form_mgroup_others}</span>
\t\t\t\t\t</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['mem_warn_level']}</strong></td>
\t\t\t\t\t<td class='field_field'>\t\t
\t\t\t\t\t\t<span id='MF__warn_level'>{$form_warn}</span>&nbsp;&nbsp;<a href='#' onclick="return acp.openWindow('{$this->settings['board_url']}/index.php?app=members&amp;module=profile&amp;section=warnings&amp;member={$member['member_id']}','980','600'); return false;" title='{$this->lang->words['sm_viewnotes']}'><img src='{$this->settings['skin_acp_url']}/images/icons/view.png' alt='{$this->lang->words['sm_viewnotes']}' /></a>
\t\t\t\t\t</td>
\t\t\t\t </tr>
\t\t\t</table>
\t\t</div>
\t\t<div class='acp-sidebar'>
\t\t\t<div style='width:{$_pp_box_width}px; max-width: 125px;' id='MF__pp_photo_container'>
\t\t\t\t<img id='MF__pp_photo' src="{$member['pp_main_photo']}" style='{$_pp_max_width};max-width:125px' />
\t\t\t\t<br />
\t\t\t\t<ul class='photo_options'>
HTML;
        if ($member['_has_photo']) {
            $IPBHTML .= <<<HTML
\t\t\t\t<li><a style='float:none;width:auto;text-align:center;cursor:pointer' id='MF__removephoto' title='{$this->lang->words['mem_remove_photo']}'><img src='{$this->settings['skin_acp_url']}/images/picture_delete.png' alt='{$this->lang->words['mem_remove_photo']}' /></a></li>
\t\t\t\t<li><a style='float:none;width:auto;text-align:center;cursor:pointer' id='MF__newphoto' title='{$this->lang->words['sm_uploadnew']}'><img src='{$this->settings['skin_acp_url']}/images/picture_add.png' alt='{$this->lang->words['sm_uploadnew']}' /></a></li>
HTML;
        } else {
            $IPBHTML .= <<<HTML
\t\t\t\t<li><a style='float:none;width:auto;text-align:center;cursor:pointer' id='MF__newphoto' title='{$this->lang->words['sm_uploadnew']}'><img src='{$this->settings['skin_acp_url']}/images/picture_add.png' alt='{$this->lang->words['sm_uploadnew']}' /></a></li>
HTML;
        }
        $IPBHTML .= <<<HTML
\t\t\t\t</ul>
\t\t\t\t<script type='text/javascript'>
\t\t\t\t\t\$('MF__newphoto').observe('click', acp.members.newPhoto.bindAsEventListener( this, "app=members&amp;module=ajax&amp;section=editform&amp;do=show&amp;name=inline_form_new_photo&amp;member_id={$member['member_id']}" ) );
\t\t\t\t</script>
\t\t\t</div>
\t\t\t
\t\t\t<div class='sidebar_box'>
\t\t\t\t<ul>
\t\t\t\t\t<li><strong>{$this->lang->words['mem_joined']}:</strong> <span>{$member['_joined']}</span></li>
\t\t\t\t\t<li><strong>{$this->lang->words['mem_ip_address_f']}:</strong> <span><a href='{$this->settings['base_url']}&amp;module=members&amp;section=tools&amp;do=learn_ip&amp;ip={$member['ip_address']}' title='{$this->lang->words['mem_ip_title']}'>{$member['ip_address']}</a></span></li>
\t\t\t\t</ul>
\t\t\t</div>
\t\t</div>
\t\t<div style='clear: both;'></div>
\t</div>
HTML;
        $IPBHTML .= <<<HTML
\t<!-- PROFILE PANE-->
\t<div id='tab_MEMBERS_2_content'>
\t<table class='ipsTable double_pad'>
\t\t<tr>
\t\t\t<th colspan='2'>{$this->lang->words['sm_settings']}</th>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_timeoffset']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__time_offset'>{$form_time_offset}</span>
\t\t\t\t<div class='ipsPad_top_slimmer'>{$form_auto_dst} <label for='dst'>{$this->lang->words['sm_dst_auto']}</label></div>
\t\t\t\t<div class='ipsPad_top_slimmer' id='dst-manual'>{$form_dst_now} <label for='dstManual'>{$this->lang->words['sm_dst_now']}</label></div>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_langchoice']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__language'>{$form_language}</span>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_skinchoice']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__skin'>
\t\t\t\t\t{$skinList}
\t\t\t\t</span>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_uploaderchoice']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__uploader'>
\t\t\t\t\t{$form_uploader}
\t\t\t\t</span>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_viewsig']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__view_sig'>{$form_view_sig}</span>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['bw_disable_customization']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span>{$bw_disable_customization}</span>
\t\t\t\t<div class='ipsPad_top_slimmer'><input type="checkbox" name="removeCustomization" value="1" /> {$this->lang->words['remove_custom_stuff']}
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<th colspan='2'>{$this->lang->words['mf_t_tagging']}<!--You're it--></th>
\t\t</tr>
\t \t<tr>
\t \t\t<td class='field_title'><strong class='title'>{$this->lang->words['bw_disable_tagging']}</strong></td>
\t \t\t<td class='field_field'>
\t \t\t\t{$bw_disable_tagging}<br />
\t\t\t\t<span class='desctext'>{$this->lang->words['bw_disable_tagging_desc']}</span>
\t \t\t</td>
\t \t</tr>
\t \t<tr>
\t \t\t<td class='field_title'>
\t \t\t\t<strong class='title'>{$this->lang->words['bw_disable_prefixes']}</strong></td>
\t \t\t</td>
\t \t\t<td class='field_field'>
\t \t\t\t{$bw_disable_prefixes}<br />
\t\t\t\t<span class='desctext'>{$this->lang->words['bw_disable_prefixesm_desc']}</span>
\t \t\t</td>
\t \t</tr>
\t\t<tr>
\t\t\t<th colspan='2'>{$this->lang->words['sm_profile']}</th>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_bday']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__birthday'>{$_form_month} {$_form_day} {$_form_year}</span>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['frm_no_status']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__frm_no_status'>{$bw_no_status_update}</span>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_reputation']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__pp_reputation_points'>
\t\t\t\t\t{$form_reputation_points} 
\t\t\t\t</span>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_latest_visitors']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__visitors'>{$pp_visitors}</span>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_enable_comments']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__profile_comments'>{$pp_enable_comments}</span>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_approve_comments']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__comments_approve'>{$pp_comments_approve}</span>
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_friends_profile']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__profile_friends'>{$pp_enable_friends}</span>
\t\t\t</td>\t\t\t\t\t\t
\t\t</tr>
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_approve_friends']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='MF__friends_approve'>{$pp_friends_approve}</span>
\t\t\t</td>\t\t\t\t\t\t
\t\t</tr>
\t</table>
HTML;
        if (is_array($member['custom_fields']) and count($member['custom_fields'])) {
            $IPBHTML .= <<<HTML
\t<table class='ipsTable double_pad'>
\t\t<tr>
\t\t\t<th colspan='2'>{$this->lang->words['sm_custom']}</th>
\t\t</tr>
HTML;
            foreach ($member['custom_fields'] as $_id => $_data) {
                $IPBHTML .= <<<HTML
\t\t<tr>
\t\t\t<td class='field_title'><strong class='title'>{$_data['name']}</strong></td>
\t\t\t<td class='field_field'>
\t\t\t\t<span id='custom_fields_{$_id}'>{$_data['data']}</span>
\t\t\t</td>
\t\t</tr>
HTML;
            }
            $IPBHTML .= <<<HTML
\t</table>
HTML;
        }
        $IPBHTML .= <<<HTML
\t<!-- / CUSTOM FIELDS PANE -->
\t
\t<!-- SIGNATURE-->
\t<table class='ipsTable double_pad'>
\t\t<tr>
\t\t\t<th colspan='2'>{$this->lang->words['sm_sigtab']}</th>
\t\t</tr>
\t\t<tr>
\t\t\t<td>
\t\t\t\t<div class='tablerow1 has_editor'>
\t\t\t\t\t<div class='editor'>
\t\t\t\t\t\t{$member['signature_editor']}
\t\t\t\t\t\t<br />
\t\t\t\t\t\t<input type="checkbox" name="bw_html_sig" class="input_check" value="1" id='bw_html_sig' {$sigHtmlChecked} /> {$this->lang->words['sig_is_html']}
\t\t\t\t\t\t<script type="text/javascript">
\t\t\t\t\t\t\tipb.textEditor.bindHtmlCheckbox( \$('bw_html_sig') );
\t\t\t\t\t\t</script>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</td>
\t\t</tr>
\t</table>
\t<!-- / SIGNATURE-->
\t\t
\t<!-- ABOUT ME-->
\t<table class='ipsTable double_pad'>
\t\t<tr>
\t\t\t<th>{$this->lang->words['sm_abouttab']}</th>
\t\t</tr>
\t\t<tr>
\t\t\t<td>
\t\t\t\t<div class='tablerow1 has_editor'>
\t\t\t\t\t<div class='editor'>
\t\t\t\t\t\t{$member['aboutme_editor']}
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</td>
\t\t</tr>
\t</table>
\t<!-- / ABOUT ME-->
\t
\t</div>
\t<div id='tab_MEMBERS_3_content'>
\t\t<table class='ipsTable double_pad'>
\t\t\t<tr>
\t\t\t\t<th colspan='2'>{$this->lang->words['memt_privacysettings']}</th>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_allowadmin']}</strong></td>
\t\t\t\t<td class='field_field'>
\t\t\t\t\t<span id='MF__allow_admin_mails'>{$form_allow_admin_mails}</span>
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['sm_disablepm']}</strong></td>
\t\t\t\t<td class='field_field'>
\t\t\t\t\t<span id='MF__members_disable_pm'>{$form_members_disable_pm}</span>
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<th colspan='2'>{$this->lang->words['memt_boardprefs']}</th>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['show_notification_popup']}</strong></td>
\t\t\t\t<td class='field_field'>
\t\t\t\t\t<span id='MF__xxx'>{$form_popup}</span>
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['auto_track']}</strong></td>
\t\t\t\t<td class='field_field'>
\t\t\t\t\t<span id='MF__xxx'>{$form_autotrack}</span>
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['auto_track_type']}</strong></td>
\t\t\t\t<td class='field_field'>
\t\t\t\t\t<span id='MF__xxx'>{$form_autotrackmthd}</span>
\t\t\t\t</td>
\t\t\t</tr>
\t\t</table>
HTML;
        $notifyGroups = array('topics_posts' => array('new_topic', 'new_reply', 'post_quoted'), 'status_updates' => array('reply_your_status', 'reply_any_status', 'friend_status_update'), 'profiles_friends' => array('profile_comment', 'profile_comment_pending', 'friend_request', 'friend_request_pending', 'friend_request_approve'), 'private_msgs' => array('new_private_message', 'reply_private_message', 'invite_private_message'));
        $IPBHTML .= <<<HTML
\t<table class='ipsTable double_pad'>
\t\t<tr>
\t\t\t<th width='20%'>&nbsp;</th>
\t\t\t<th width='20%' style='text-align: center'>{$this->lang->words['notify_type_email']}</th>
\t\t\t<th width='20%' style='text-align: center'>{$this->lang->words['notify_type_inline']}</th>
\t\t\t<th width='20%' style='text-align: center'>{$this->lang->words['notify_type_mobile']}</th>
\t\t</tr>
HTML;
        foreach ($notifyGroups as $groupKey => $group) {
            $IPBHTML .= <<<HTML
\t\t\t<th colspan='4'>
\t\t\t\t{$this->lang->words['notifytitle_' . $groupKey]}
\t\t\t</th>
HTML;
            foreach ($group as $key) {
                if ($notifications[$key]) {
                    $IPBHTML .= <<<HTML
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['notify__' . $key]}</strong></td>
\t\t\t\t\t\t<td align='center'>
HTML;
                    if (isset($notifications[$key]['options']['email'])) {
                        $_disabled = $notifications[$key]['disabled'] ? " disabled='disabled'" : '';
                        $_selected = (is_array($notifications[$key]['defaults']) and in_array('email', $notifications[$key]['defaults'])) ? " checked='checked'" : '';
                        $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t\t<input type='checkbox' class='input_check' id='email_{$key}' name="config_{$key}[]" value="email"{$_selected}{$_disabled} />
HTML;
                    } else {
                        $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t\t<input type='checkbox' class='input_check' name='' disabled='disabled' />
HTML;
                    }
                    $IPBHTML .= <<<HTML
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td align='center'>
HTML;
                    if (isset($notifications[$key]['options']['inline'])) {
                        $_disabled = $notifications[$key]['disabled'] ? " disabled='disabled'" : '';
                        $_selected = (is_array($notifications[$key]['defaults']) and in_array('inline', $notifications[$key]['defaults'])) ? " checked='checked'" : '';
                        $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t\t<input type='checkbox' class='input_check' id='inline_{$key}' name="config_{$key}[]" value="inline"{$_selected}{$_disabled} />
HTML;
                    } else {
                        $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t\t<input type='checkbox' class='input_check' name='' disabled='disabled' />
HTML;
                    }
                    $IPBHTML .= <<<HTML
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td align='center'>
HTML;
                    if (isset($notifications[$key]['options']['mobile'])) {
                        $_disabled = $notifications[$key]['disabled'] ? " disabled='disabled'" : '';
                        $_selected = (is_array($notifications[$key]['defaults']) and in_array('mobile', $notifications[$key]['defaults'])) ? " checked='checked'" : '';
                        $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t\t<input type='checkbox' class='input_check' id='mobile_{$key}' name="config_{$key}[]" value="mobile"{$_selected}{$_disabled} />
HTML;
                    } else {
                        $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t\t<input type='checkbox' class='input_check' name='' disabled='disabled' />
HTML;
                    }
                    $IPBHTML .= <<<HTML
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
HTML;
                    $notifications[$key]['_done'] = 1;
                }
            }
        }
        $_lastApp = '';
        foreach ($notifications as $key => $_config) {
            if (!isset($_config['_done']) && $_config['_done'] != 1) {
                if ($_lastApp != $_config['app']) {
                    $_title = $_config['app'] == 'core' ? $this->lang->words['notifytitle_other'] : IPSLib::getAppTitle($_config['app']);
                    $_lastApp = $_config['app'];
                    $IPBHTML .= <<<HTML
\t\t\t<th colspan='4'>
\t\t\t\t{$_title}
\t\t\t</th>
HTML;
                }
                $IPBHTML .= <<<HTML
\t\t\t\t<tr>
\t\t\t\t\t<td class='field_title'><strong class='title'>{$this->lang->words['notify__' . $_config['key']]}</strong></td>
\t\t\t\t\t<td align='center'>
HTML;
                if (isset($_config['options']['email'])) {
                    $_disabled = $_config['disabled'] ? " disabled='disabled'" : '';
                    $_selected = (is_array($_config['defaults']) and in_array('email', $_config['defaults'])) ? " checked='checked'" : '';
                    $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t\t<input type='checkbox' class='input_check' id='email_{$key}' name="config_{$key}[]" value="email"{$_selected}{$_disabled} />
HTML;
                } else {
                    $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t\t<input type='checkbox' class='input_check' name='' disabled='disabled' />
HTML;
                }
                $IPBHTML .= <<<HTML
\t\t\t\t\t</td>
\t\t\t\t\t<td align='center'>
HTML;
                if (isset($_config['options']['inline'])) {
                    $_disabled = $_config['disabled'] ? " disabled='disabled'" : '';
                    $_selected = (is_array($_config['defaults']) and in_array('inline', $_config['defaults'])) ? " checked='checked'" : '';
                    $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t<input type='checkbox' class='input_check' id='inline_{$key}' name="config_{$key}[]" value="inline"{$_selected}{$_disabled} />
HTML;
                } else {
                    $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t<input type='checkbox' class='input_check' name='' disabled='disabled' />
HTML;
                }
                $IPBHTML .= <<<HTML
\t\t\t\t\t</td>
\t\t\t\t\t<td align='center'>
HTML;
                if (isset($_config['options']['mobile'])) {
                    $_disabled = $_config['disabled'] ? " disabled='disabled'" : '';
                    $_selected = (is_array($_config['defaults']) and in_array('mobile', $_config['defaults'])) ? " checked='checked'" : '';
                    $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t<input type='checkbox' class='input_check' id='mobile_{$key}' name="config_{$key}[]" value="mobile"{$_selected}{$_disabled} />
HTML;
                } else {
                    $IPBHTML .= <<<HTML
\t\t\t\t\t\t\t<input type='checkbox' class='input_check' name='' disabled='disabled' />
HTML;
                }
                $IPBHTML .= <<<HTML
\t\t\t\t\t</td>
\t\t\t\t</tr>
HTML;
            }
        }
        $IPBHTML .= <<<HTML
\t</table>
</div>
HTML;
        // Got blocks from other apps?
        $IPBHTML .= implode("\n", $content['area']);
        $IPBHTML .= <<<HTML
</div>
\t<div class='acp-actionbar'>
\t\t<input class='button primary' type='submit' value='{$this->lang->words['sm_savebutton']}' />
\t</div>
</div>

<script type='text/javascript'>
\tjQ("#tabstrip_members").ipsTabBar({tabWrap: "#tabstrip_members_content"});
</script>

</form>
</div>

<script type='text/javascript'>\t
\tif( \$('MF__removephoto') )
\t{
\t\t\$('MF__removephoto').observe( 'click', acp.members.removePhoto.bindAsEventListener( this, '{$member['member_id']}' ) );
\t}
</script>

<script type="text/javascript">
function toggle_dst()
{
\tif ( \$( 'dst' ) )
\t{
\t\tif ( \$( 'dst' ).checked ){
\t\t\t\$( 'dst-manual' ).hide();
\t\t} else {
\t\t\t\$( 'dst-manual' ).show();
\t\t}
\t}
}
toggle_dst();
</script>
HTML;
        return $IPBHTML;
    }