/** * Function will generate chat block for current member ; * * @param : $iSender (integer) - sender member's Id; * @return : (array); */ function getChatBox($iSender) { global $oFunctions; $iSender = (int) $iSender; $oModuleDb = new BxDolModuleDb(); $oUserStatus = new BxDolUserStatusView(); $sMemberThumb = $oFunctions->getMemberThumbnail($iSender, 'none'); $sMemberIcon = $oFunctions->getMemberIcon($iSender, 'none', false, '_plain'); $aSenderInfo = getProfileInfo($iSender); $sSenderLink = getProfileLink($iSender); $sStatusIcon = $oUserStatus->getStatusIcon($iSender); // language keys; $aLanguageKeys = array('minimize' => _t('_simple_messenger_minimize_button'), 'close' => _t('_simple_messenger_close_button'), 'video_mess' => _t('_simple_messenger_switch_to_video')); // contain data for sender block; $aSenderBlock = array('sender_thumb' => $sMemberThumb, 'sender_link' => $sSenderLink, 'status_text' => $aSenderInfo['UserStatusMessage'], 'sender_nick' => getNickName($aSenderInfo['ID']), 'reduce_title' => $aLanguageKeys['minimize'], 'close_title' => $aLanguageKeys['close'], 'history_window_id' => $this->aCoreSettings['history_block_prefix'] . $iSender, 'sender_id' => $iSender, 'bx_if:video_messenger' => array('condition' => $oModuleDb->isModule('messenger'), 'content' => array('sender_id' => $this->iLoggedMemberId, 'sender_passw' => getPassword($this->iLoggedMemberId), 'recipient_id' => $iSender, 'video_messenger' => $aLanguageKeys['video_mess']))); $aMessagesList = $this->getMessagesHistory($this->iLoggedMemberId, $iSender, 0, false); // process nick name; $sNickName = getNickName($aSenderInfo['ID']); if (mb_strlen($sNickName) > $this->iMaxNickLength) { $sNickName = mb_substr($sNickName, 0, $this->iMaxNickLength) . '...'; } $aTemplateKeys = array('block_indent' => $this->sMemberMenuPosition == 'bottom' ? 'bottom_indent' : 'top_indent', 'chat_block_position' => $this->sMemberMenuPosition == 'bottom' ? 'chat_block_bottom_position' : 'chat_block_top_position', 'sender_nick' => $sNickName, 'sender_icon' => $sMemberIcon, 'member_status' => $sStatusIcon, 'history_window_id' => $this->aCoreSettings['history_block_prefix'] . $iSender, 'history_block_position' => $this->sMemberMenuPosition == 'bottom' ? 'history_bottom_position' : 'history_top_position', 'recipient_id' => $iSender, 'bx_if:menu_pos_top' => array('condition' => $this->sMemberMenuPosition == 'bottom', 'content' => $aSenderBlock), 'bx_if:menu_pos_bottom' => array('condition' => $this->sMemberMenuPosition != 'bottom', 'content' => $aSenderBlock), 'messages' => $aMessagesList['messages_list']); // generate the chat box's content; $sOutputCode = $this->_oTemplate->parseHtmlByName('chat_block.html', $aTemplateKeys); $aRetArray = array('chat_box' => $sOutputCode, 'last_message' => $aMessagesList['last_message'], 'count_messages' => $aMessagesList['count_messages']); return $aRetArray; }
<?php /** * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/ * CC-BY License - http://creativecommons.org/licenses/by/3.0/ */ require_once 'inc/header.inc.php'; require_once BX_DIRECTORY_PATH_INC . 'design.inc.php'; require_once BX_DIRECTORY_PATH_INC . 'params.inc.php'; require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php'; bx_import('BxDolPrivacy'); bx_import('BxDolUserStatusView'); bx_import('BxDolSubscription'); $iMemberId = getLoggedId(); if (!isset($_GET['ID']) && !(int) $_GET['ID']) { exit; } $iProfId = (int) $_GET['ID']; $aProfileInfo = getProfileInfo($iProfId); $sProfLink = '<a href="' . getProfileLink($iProfId) . '">' . getNickName($aProfileInfo['ID']) . '</a> '; $oUserStatus = new BxDolUserStatusView(); $sUserIcon = $oUserStatus->getStatusIcon($iProfId); $sUserStatus = $oUserStatus->getStatus($iProfId); $aUnit = array('status_icon' => $sUserIcon, 'profile_status' => _t('_prof_status', $sProfLink, $sUserStatus), 'profile_status_message' => $aProfileInfo['status_message'], 'profile_actions' => $oFunctions->getProfileViewActions($iProfId, true)); header('Content-type:text/html;charset=utf-8'); echo $oFunctions->transBox($oSysTemplate->parseHtmlByName('short_profile_info.html', $aUnit) . $sAddon);
} else { $aProfileInfo['cpt_edit'] = ''; $aProfileInfo['cpt_send_letter'] = ''; $aProfileInfo['cpt_fave'] = ''; $aProfileInfo['cpt_befriend'] = ''; $aProfileInfo['cpt_remove_friend'] = ''; $aProfileInfo['cpt_greet'] = ''; $aProfileInfo['cpt_get_mail'] = ''; $aProfileInfo['cpt_share'] = ''; $aProfileInfo['cpt_report'] = ''; $aProfileInfo['cpt_block'] = ''; $aProfileInfo['cpt_unblock'] = ''; } $sProfLink = '<a href="' . getProfileLink($iProfId) . '">' . $aProfileInfo['NickName'] . '</a> '; $oUserStatus = new BxDolUserStatusView(); $sUserIcon = $oUserStatus->getStatusIcon($iProfId, $aProfileInfo['UserStatus']); $sUserStatus = $oUserStatus->getStatus($iProfId); $aUnit = array('status_pic' => getTemplateIcon($sUserIcon), 'profile_status' => _t('_prof_status', $sProfLink, $sUserStatus), 'profile_status_message' => $aProfileInfo['status_message'], 'profile_actions' => $oFunctions->genObjectsActions($aProfileInfo, 'Profile'), 'bx_if:profile_status_cond' => array('condition' => $aProfileInfo['status'] == 'online', 'content' => array('chat_invite' => $sChat))); $sCloseIcon = getTemplateIcon('reduce.png'); ob_start(); ?> <div class="reduce"> <img src="<?php echo $sCloseIcon; ?> " class="login_ajx_close" /> </div> <?php $sClose = ob_get_clean(); $sClose = str_replace('__site_images__', $site['images'], $sClose); echo $oFunctions->transBox($sClose . $oSysTemplate->parseHtmlByName($sTemplate, $aUnit));
/** * Parse member menu structure * * @param $aMemberInfo array * @param $aMenuStructure array * @return text */ function _parseStructure($aMemberInfo, $aMenuStructure) { global $oSysTemplate, $oFunctions; if (!$aMenuStructure) { return; } $oCache = $this->getCacheObject(); $oPermalinks = new BxDolPermalinks(); $aReplaced = $aDefinedMenuItems = array(); $memberID = $aMemberInfo['ID']; $iIndex = 0; $sStartPosition = ''; //-- process menu structure --// $aDefinedMenuItems = $oCache->getData($this->getCacheKey($aMemberInfo['ID']), $this->iKeysFileTTL); if (!$aDefinedMenuItems) { foreach ($aMenuStructure as $sPosition => $aMenuItems) { foreach ($aMenuItems as $iKey => $aItems) { $isSkipItem = false; foreach ($aItems as $sMenuKey => $sValue) { if ($sMenuKey != 'PopupMenu' && $sMenuKey != 'linked_items') { if ($sMenuKey == 'Caption') { $aReplaced[$sPosition][$iKey][$sMenuKey] = $oFunctions->markerReplace($aMemberInfo, $sValue, $aItems['Eval'], true); } else { $aReplaced[$sPosition][$iKey][$sMenuKey] = $oFunctions->markerReplace($aMemberInfo, $sValue, $aItems['Eval']); } } else { $aReplaced[$sPosition][$iKey][$sMenuKey] = $sValue; } } if ($sStartPosition != $sPosition) { $iIndex = 0; $sStartPosition = $sPosition; } //-- process next --// // collect the link; if ($aReplaced[$sPosition][$iKey]['Type'] == 'link' && $aReplaced[$sPosition][$iKey]['Caption'] && ($aReplaced[$sPosition][$iKey]['Link'] || $aReplaced[$sPosition][$iKey]['Script'])) { $sMenuClass = $sPosition == 'top_extra' ? 'extra_item' : ''; $sPartCaption = $aReplaced[$sPosition][$iKey]['Caption']; //define some settings for "Add Content" if ($aReplaced[$sPosition][$iKey]['Name'] == 'AddContent') { $sMenuClass .= ' extra_item_add_content'; } //define some settings for "Member block" ; if ($aReplaced[$sPosition][$iKey]['Name'] == 'MemberBlock') { $oUserStatus = new BxDolUserStatusView(); $sUserThumbnail = $GLOBALS['oFunctions']->getMemberAvatar($aMemberInfo['ID'], 'small'); $sUserThumbnailDouble = $GLOBALS['oFunctions']->getMemberAvatar($aMemberInfo['ID'], 'small', true); if (empty($sUserThumbnailDouble)) { $sUserThumbnailDouble = $sUserThumbnail; } $bUserThumbnail = !empty($sUserThumbnail); $sMenuImage = $GLOBALS['oSysTemplate']->parseHtmlByName('member_menu_thumbnail.html', array('bx_if:show_thumbnail_image' => array('condition' => $bUserThumbnail, 'content' => array('thumbnail_url' => $sUserThumbnail, 'thumbnail_url_2x' => $sUserThumbnailDouble)), 'bx_if:show_thumbnail_icon' => array('condition' => !$bUserThumbnail, 'content' => array()), 'status_icon' => $oUserStatus->getStatusIcon($aMemberInfo['ID'], 'icon8'), 'status_title' => $oUserStatus->getStatus($aMemberInfo['ID']))); $sReduceImage = ''; } else { $sMenuImage = $aReplaced[$sPosition][$iKey]['Icon']; if (strpos($sMenuImage, '.') !== false) { $sMenuImage = getTemplateIcon($sMenuImage); } $sReduceImage = $sMenuImage; $sMenuImage = $this->getImage($sMenuImage); } if ($aReplaced[$sPosition][$iKey]['Caption'] == '{system}') { $sMenuImage = $aReplaced[$sPosition][$iKey]['Icon'] ? $aReplaced[$sPosition][$iKey]['Icon'] : 'spacer.gif'; if (strpos($sMenuImage, '.') !== false) { $sMenuImage = getTemplateIcon($sMenuImage); } $sMenuImage = $this->getImage($sMenuImage); $sPartCaption = eval($aReplaced[$sPosition][$iKey]['Eval']); } if ($aReplaced[$sPosition][$iKey]['Bubble']) { $sCode = str_replace('{iOldCount}', 0, $aReplaced[$sPosition][$iKey]['Bubble']); $sCode = str_replace('{ID}', $memberID, $sCode); eval($sCode); $this->sBubbles .= "\"{$aReplaced[$sPosition][$iKey]['Name']}\" : {count:'{$aRetEval['count']}'}, \n"; } if ($isSkipItem) { continue; } $sDescription = _t(!empty($aReplaced[$sPosition][$iKey]['Description']) ? $aReplaced[$sPosition][$iKey]['Description'] : $aReplaced[$sPosition][$iKey]['Caption']); $aDefinedMenuItems[$sPosition][$iIndex] = array('bx_if:show_class' => array('condition' => !empty($sMenuClass), 'content' => array('class' => $sMenuClass)), 'menu_caption' => $aReplaced[$sPosition][$iKey]['Name'] == 'MemberBlock' || $aReplaced[$sPosition][$iKey]['Caption'] == '{system}' ? $sPartCaption : null, 'menu_link' => $aReplaced[$sPosition][$iKey]['Script'] ? 'javascript:void(0)' : $oPermalinks->permalink($aReplaced[$sPosition][$iKey]['Link']), 'extended_action' => $aReplaced[$sPosition][$iKey]['Script'] ? 'onclick="' . $aReplaced[$sPosition][$iKey]['Script'] . '"' : null, 'target' => $aReplaced[$sPosition][$iKey]['Target'] == '_blank' ? 'target="_blank"' : null, 'menu_image' => $sMenuImage, 'bubble_box' => $aReplaced[$sPosition][$iKey]['Bubble'] ? $oSysTemplate->parseHtmlByName('member_menu_bubble.html', array('extra_styles' => $aRetEval['count'] ? null : 'style="display:none"', 'count' => $aRetEval['count'], 'bubble_id' => $this->sBubblePrefix . $aReplaced[$sPosition][$iKey]['Name'])) : null, 'indent' => $this->sMemberMenuPosition == 'bottom' ? 'menu_item_bottom' : 'menu_item_top', 'item_link_indent' => $this->sMemberMenuPosition == 'bottom' ? 'bottom_indent' : 'top_indent', 'menu_id' => $aReplaced[$sPosition][$iKey]['ID'], 'bx_if:menu_desc' => array('condition' => !empty($sDescription), 'content' => array('menu_id' => $aReplaced[$sPosition][$iKey]['ID'], 'desc_window' => $this->getDescriptionWindow($sDescription), 'desc_indent' => $this->sMemberMenuPosition == 'bottom' ? 'description_bottom' : 'description_top'))); if ($aReplaced[$sPosition][$iKey]['Caption'] == '{system}') { $sPartCaption = _t($aReplaced[$sPosition][$iKey]['Description']); } // define top menu's popup section ; $aContentKeys = array('menu_id' => $aReplaced[$sPosition][$iKey]['ID'], 'menu_name' => $aReplaced[$sPosition][$iKey]['Name'], 'bx_if:reduce_element_top' => array('condition' => $this->sMemberMenuPosition == 'bottom', 'content' => array('menu_id' => $aReplaced[$sPosition][$iKey]['ID'], 'item_link' => $aReplaced[$sPosition][$iKey]['Link'], 'extended_action' => empty($aReplaced[$sPosition][$iKey]['extended_action']) ? '' : $aReplaced[$sPosition][$iKey]['extended_action'], 'cover' => 'top_cover', 'item_name' => $sPartCaption, 'bx_if:part_image' => array('condition' => $sReduceImage, 'content' => array('item_img' => $this->getImage($sReduceImage, strip_tags($aReplaced[$sPosition][$iKey]['Caption'])))))), 'bx_if:reduce_element_bottom' => array('condition' => $this->sMemberMenuPosition == 'top' || $this->sMemberMenuPosition == 'static', 'content' => array('menu_id' => $aReplaced[$sPosition][$iKey]['ID'], 'item_link' => $aReplaced[$sPosition][$iKey]['Link'], 'extended_action' => empty($aReplaced[$sPosition][$iKey]['extended_action']) ? '' : $aReplaced[$sPosition][$iKey]['extended_action'], 'cover' => 'bottom_cover', 'item_name' => $sPartCaption, 'bx_if:part_image' => array('condition' => $sReduceImage, 'content' => array('item_img' => $this->getImage($sReduceImage, strip_tags($aReplaced[$sPosition][$iKey]['Caption']))))))); if ($aReplaced[$sPosition][$iKey]['PopupMenu']) { $aDefinedMenuItems[$sPosition][$iIndex]['menu_link'] = 'javascript:void(0)'; $aDefinedMenuItems[$sPosition][$iIndex]['extended_action'] = null; } $aDefinedMenuItems[$sPosition][$iIndex]['bx_if:sub_menu'] = array('condition' => $aReplaced[$sPosition][$iKey]['PopupMenu'], 'content' => $aContentKeys); $iIndex++; } //-- } } //generate cache file $aBubbles = array('bubbles' => $this->sBubbles); $aDefinedMenuItems = array_merge($aDefinedMenuItems, $aBubbles); $oCache->setData($this->getCacheKey($aMemberInfo['ID']), $aDefinedMenuItems, $this->iKeysFileTTL); } //-- if (BxDolRequest::serviceExists('pageac', 'menu_items_filter')) { BxDolService::call('pageac', 'menu_items_filter', array('member', &$aDefinedMenuItems)); } //define bubble list $sBubbleList = isset($aDefinedMenuItems['bubbles']) ? trim($aDefinedMenuItems['bubbles']) : trim($this->sBubbles); //generate data $aTemplateKeys = array('items' => $oSysTemplate->parseHtmlByName('extra_top_menu_items.html', array('bx_repeat:items' => $aDefinedMenuItems['top'])), 'items_extra' => $oSysTemplate->parseHtmlByName('extra_top_menu_items.html', array('bx_repeat:items' => $aDefinedMenuItems['top_extra'])), 'site_url' => BX_DOL_URL_ROOT, 'menu_position' => $this->sMemberMenuPosition, 'is_profile_page' => defined('BX_PROFILE_PAGE') ? 'true' : 'false', 'bubbles_list' => preg_replace('/,$/', '', $sBubbleList), 'bubbles_update_time' => $this->iBubblesUpdateTime, 'notify_destroy_time' => $this->iNotifyDestroyTime, 'page_reciver' => $this->sQueryPageReciver, 'bubble_prefix' => $this->sBubblePrefix, 'menu_popup_prefix' => $this->sMenuPopupPrefix, 'description_prefix' => $this->sDescriptionPrefix); $oSysTemplate->addJs('user_status.js'); return $oSysTemplate->parseHtmlByName('extra_top_menu.html', $aTemplateKeys); }
/** * Change profile status * * @param $iProfileId integer * @param $sStatus text * @return text */ function ActionChangeStatus($iProfileId, $sStatus = '') { $iProfileId = (int) $iProfileId; $sOutputCode = ''; $oUserStatus = new BxDolUserStatusView(); if ($oUserStatus->getRegisteredStatus($sStatus)) { //process status $sStatus = process_db_input($sStatus, BX_TAGS_STRIP, BX_SLASHES_AUTO); $sQuery = "UPDATE `Profiles` SET `UserStatus`='{$sStatus}', `DateLastNav` = NOW()\n WHERE `ID` = '{$iProfileId}'"; if (db_res($sQuery, 0)) { // send system event bx_import('BxDolAlerts'); $oZ = new BxDolAlerts('profile', 'edit_status', $iProfileId, $iProfileId); $oZ->alert(); bx_import('BxTemplMemberMenu'); $oMemberMenu = new BxTemplMemberMenu(); $oMemberMenu->deleteMemberMenuKeyFile($iProfileId); createUserDataFile($iProfileId); $sOutputCode = $oUserStatus->getStatusIcon($iProfileId); } } return $sOutputCode; }
/** * Parse member menu structure * * @param $aMemberInfo array * @param $aMenuStructure array * @return text */ function _parseStructure($aMemberInfo, $aMenuStructure) { global $oSysTemplate, $oFunctions; if (!$aMenuStructure) { return; } $oCache = $this->getCacheObject(); $oPermalinks = new BxDolPermalinks(); $oUserStatus = new BxDolUserStatusView(); $sMemberStatus = $oUserStatus->getStatusIcon($aMemberInfo['ID']); $aReplaced = $aDefinedMenuItems = array(); $memberID = $aMemberInfo['ID']; $iIndex = 0; $sStartPosition = ''; //-- process menu structure --// $aDefinedMenuItems = $oCache->getData($this->getCacheKey($aMemberInfo['ID']), $this->iKeysFileTTL); if (!$aDefinedMenuItems) { foreach ($aMenuStructure as $sPosition => $aMenuItems) { foreach ($aMenuItems as $iKey => $aItems) { foreach ($aItems as $sMenuKey => $sValue) { if ($sMenuKey != 'PopupMenu' && $sMenuKey != 'linked_items') { if ($sMenuKey == 'Caption') { $aReplaced[$sPosition][$iKey][$sMenuKey] = $oFunctions->markerReplace($aMemberInfo, $sValue, $aItems['Eval'], true); } else { $aReplaced[$sPosition][$iKey][$sMenuKey] = $oFunctions->markerReplace($aMemberInfo, $sValue, $aItems['Eval']); } } else { $aReplaced[$sPosition][$iKey][$sMenuKey] = $sValue; } } if ($sStartPosition != $sPosition) { $iIndex = 0; $sStartPosition = $sPosition; } //-- process next --// // collect the link; if ($aReplaced[$sPosition][$iKey]['Type'] == 'link' && $aReplaced[$sPosition][$iKey]['Caption'] && ($aReplaced[$sPosition][$iKey]['Link'] || $aReplaced[$sPosition][$iKey]['Script'])) { $sPartCaption = $aReplaced[$sPosition][$iKey]['Caption']; //define some settings for member's block ; $sMenuImage = $aReplaced[$sPosition][$iKey]['Name'] == 'MemberBlock' ? getTemplateIcon($sMemberStatus) : getTemplateIcon($aReplaced[$sPosition][$iKey]['Icon']); $sItemImgId = $aReplaced[$sPosition][$iKey]['Name'] == 'MemberBlock' ? 'current_members_status_img' : null; $sReduceImg = $aReplaced[$sPosition][$iKey]['Name'] != 'MemberBlock' ? $sMenuImage : null; if ($aReplaced[$sPosition][$iKey]['Caption'] == '{system}') { $sMenuImage = $aReplaced[$sPosition][$iKey]['Icon'] ? getTemplateIcon($aReplaced[$sPosition][$iKey]['Icon']) : getTemplateIcon('spacer.gif'); $sPartCaption = eval($aReplaced[$sPosition][$iKey]['Eval']); } if ($aReplaced[$sPosition][$iKey]['Bubble']) { $sCode = str_replace('{iOldCount}', 0, $aReplaced[$sPosition][$iKey]['Bubble']); $sCode = str_replace('{ID}', $memberID, $sCode); eval($sCode); $this->sBubbles .= "\"{$aReplaced[$sPosition][$iKey]['Name']}\" : {count:'{$aRetEval['count']}'}, \n"; } $aDefinedMenuItems[$sPosition][$iIndex] = array('menu_caption' => $aReplaced[$sPosition][$iKey]['Name'] == 'MemberBlock' || $aReplaced[$sPosition][$iKey]['Caption'] == '{system}' ? $sPartCaption : null, 'menu_link' => $aReplaced[$sPosition][$iKey]['Script'] ? 'javascript:void(0)' : $oPermalinks->permalink($aReplaced[$sPosition][$iKey]['Link']), 'extended_action' => $aReplaced[$sPosition][$iKey]['Script'] ? 'onclick="' . $aReplaced[$sPosition][$iKey]['Script'] . '"' : null, 'target' => $aReplaced[$sPosition][$iKey]['Target'] == '_blank' ? 'target="_blank"' : null, 'menu_image' => $sMenuImage, 'bubble_box' => $aReplaced[$sPosition][$iKey]['Bubble'] ? $oSysTemplate->parseHtmlByName('member_menu_bubble.html', array('extra_styles' => $aRetEval['count'] ? null : 'style="display:none"', 'count' => $aRetEval['count'], 'bubble_id' => $this->sBubblePrefix . $aReplaced[$sPosition][$iKey]['Name'])) : null, 'indent' => $this->sMemberMenuPosition == 'bottom' ? 'menu_item_bottom' : 'menu_item_top', 'item_link_indent' => $this->sMemberMenuPosition == 'bottom' ? 'bottom_indent' : 'top_indent', 'bx_if:item_id' => array('condition' => $sItemImgId, 'content' => array('item_img_id' => $sItemImgId)), 'menu_id' => $aReplaced[$sPosition][$iKey]['ID'], 'bx_if:menu_desc' => array('condition' => $aReplaced[$sPosition][$iKey]['Description'], 'content' => array('menu_id' => $aReplaced[$sPosition][$iKey]['ID'], 'desc_window' => $this->getDescriptionWindow(_t($aReplaced[$sPosition][$iKey]['Description'])), 'desc_indent' => $this->sMemberMenuPosition == 'bottom' ? 'description_bottom' : 'description_top'))); if ($aReplaced[$sPosition][$iKey]['Caption'] == '{system}') { $sPartCaption = _t($aReplaced[$sPosition][$iKey]['Description']); } // define top menu's popup section ; $aContentKeys = array('menu_id' => $aReplaced[$sPosition][$iKey]['ID'], 'bx_if:reduce_element_top' => array('condition' => $this->sMemberMenuPosition == 'bottom', 'content' => array('menu_id' => $aReplaced[$sPosition][$iKey]['ID'], 'item_link' => $aReplaced[$sPosition][$iKey]['Link'], 'extended_action' => empty($aReplaced[$sPosition][$iKey]['extended_action']) ? '' : $aReplaced[$sPosition][$iKey]['extended_action'], 'cover' => 'top_cover', 'item_name' => $sPartCaption, 'bx_if:part_image' => array('condition' => $sReduceImg, 'content' => array('item_img_src' => $sReduceImg, 'cleared_item_name' => strip_tags($aReplaced[$sPosition][$iKey]['Caption']))))), 'bx_if:reduce_element_bottom' => array('condition' => $this->sMemberMenuPosition == 'top' || $this->sMemberMenuPosition == 'static', 'content' => array('menu_id' => $aReplaced[$sPosition][$iKey]['ID'], 'item_link' => $aReplaced[$sPosition][$iKey]['Link'], 'extended_action' => empty($aReplaced[$sPosition][$iKey]['extended_action']) ? '' : $aReplaced[$sPosition][$iKey]['extended_action'], 'cover' => 'bottom_cover', 'item_name' => $sPartCaption, 'bx_if:part_image' => array('condition' => $sReduceImg, 'content' => array('item_img_src' => $sReduceImg, 'cleared_item_name' => strip_tags($aReplaced[$sPosition][$iKey]['Caption'])))))); if ($aReplaced[$sPosition][$iKey]['PopupMenu']) { $aDefinedMenuItems[$sPosition][$iIndex]['menu_link'] = 'javascript:void(0)'; $aDefinedMenuItems[$sPosition][$iIndex]['extended_action'] = null; } $aDefinedMenuItems[$sPosition][$iIndex]['bx_if:sub_menu'] = array('condition' => $aReplaced[$sPosition][$iKey]['PopupMenu'], 'content' => $aContentKeys); $iIndex++; } //-- } } //generate cache file $aBubbles = array('bubbles' => $this->sBubbles); $aDefinedMenuItems = array_merge($aDefinedMenuItems, $aBubbles); $oCache->setData($this->getCacheKey($aMemberInfo['ID']), $aDefinedMenuItems, $this->iKeysFileTTL); } //-- //define bubble list $sBubbleList = isset($aDefinedMenuItems['bubbles']) ? trim($aDefinedMenuItems['bubbles']) : trim($this->sBubbles); //generate data $aTemplateKeys = array('bx_repeat:items' => $aDefinedMenuItems['top'], 'bx_repeat:extra_items' => $aDefinedMenuItems['top_extra'], 'site_url' => BX_DOL_URL_ROOT, 'menu_position' => $this->sMemberMenuPosition, 'is_profile_page' => defined('BX_PROFILE_PAGE') ? 'true' : 'false', 'bubbles_list' => preg_replace('/,$/', '', $sBubbleList), 'bubbles_update_time' => $this->iBubblesUpdateTime, 'notify_destroy_time' => $this->iNotifyDestroyTime, 'page_reciver' => $this->sQueryPageReciver, 'bubble_prefix' => $this->sBubblePrefix); $oSysTemplate->addJs('user_status.js'); return $oSysTemplate->parseHtmlByName('extra_top_menu.html', $aTemplateKeys); }