当前位置: 首页>>代码示例>>PHP>>正文


PHP getNickName函数代码示例

本文整理汇总了PHP中getNickName函数的典型用法代码示例。如果您正苦于以下问题:PHP getNickName函数的具体用法?PHP getNickName怎么用?PHP getNickName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getNickName函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetLove

function GetLove($limit, $justUser)
{
    global $user;
    if (!defined('LIVE_FEED_ROTATION_DELAY')) {
        $rotationDelay = 5000;
    } else {
        $rotationDelay = LIVE_FEED_ROTATION_DELAY;
    }
    // Get user
    $userid = $user->getId();
    //if we have no user, just return empty array
    if (!$userid) {
        return json_encode(array());
    }
    if ($justUser === true) {
        $username = $user->getUsername();
        $query = "SELECT `giver`,`receiver`,`why`,TIMESTAMPDIFF(SECOND,at,NOW()) as delta\n    \t\t      FROM `" . LOVE . "`\n\tWHERE `company_id` = " . (array_key_exists('company_id', $_SESSION) ? $_SESSION['company_id'] : MAIN_COMPANY) . "\n    \t\t      AND `private` = 0\n    \t\t      AND at > DATE_SUB(NOW(), INTERVAL 31 DAY)\n    \t\t      AND (`giver` = '{$username}' OR `receiver` = '{$username}')\n    \t\t      ORDER BY `at` DESC LIMIT {$limit}";
    } else {
        $query = "SELECT `giver`,`receiver`,`why`,TIMESTAMPDIFF(SECOND,at,NOW()) as delta\n    \t\t      FROM `" . LOVE . "`\n\tWHERE `company_id` = " . (array_key_exists('company_id', $_SESSION) ? $_SESSION['company_id'] : MAIN_COMPANY) . "\n    \t\t      AND `private` = 0\n    \t\t      AND at > DATE_SUB(NOW(), INTERVAL 31 DAY)\n    \t\t      ORDER BY `at` DESC LIMIT {$limit}";
    }
    $rt = mysql_query($query) or error_log("GetLove: " . mysql_error() . "\n" . $query);
    $result = array();
    while ($row = mysql_fetch_assoc($rt)) {
        $why = strip_tags(stripslashes($row['why']));
        $givername = getNickName($row['giver']);
        $receivername = getNickName($row['receiver']);
        $result[] = array($givername, $receivername, $why, $row['delta']);
    }
    return json_encode(array("rotationDelay" => $rotationDelay, "result" => $result));
}
开发者ID:highfidelity,项目名称:love,代码行数:30,代码来源:stage.back.php

示例2: displayOrders

 function displayOrders($sType, $aParams)
 {
     if (empty($aParams['per_page'])) {
         $aParams['per_page'] = $this->_oConfig->getPerPage('orders');
     }
     $sJsObject = $this->_oConfig->getJsObject('orders');
     $sMethodNameInfo = 'get' . ucfirst($sType) . 'Orders';
     $aOrders = $this->_oDb->{$sMethodNameInfo}($aParams);
     if (empty($aOrders)) {
         return MsgBox(_t('_payment_txt_empty'));
     }
     $aAdministrator = $this->_oDb->getVendorInfoProfile(BX_PMT_ADMINISTRATOR_ID);
     //--- Get Orders ---//
     $aResultOrders = array();
     foreach ($aOrders as $aOrder) {
         if (empty($aOrder['user_id']) || empty($aOrder['user_name'])) {
             $aOrder['user_name'] = $aAdministrator['profile_name'];
             $aOrder['user_url'] = $aAdministrator['profile_url'];
         } else {
             $aOrder['user_name'] = getNickName($aOrder['user_id']);
             $aOrder['user_url'] = getProfileLink($aOrder['user_id']);
         }
         $aResultOrders[] = array_merge($aOrder, array('type' => $sType, 'bx_if:show_link' => array('condition' => !empty($aOrder['user_url']), 'content' => array('user_name' => $aOrder['user_name'], 'user_url' => $aOrder['user_url'])), 'bx_if:show_text' => array('condition' => empty($aOrder['user_url']), 'content' => array('user_name' => $aOrder['user_name'])), 'bx_if:pending' => array('condition' => $sType == BX_PMT_ORDERS_TYPE_PENDING, 'content' => array('id' => $aOrder['id'], 'order' => $aOrder['order'])), 'bx_if:processed' => array('condition' => $sType == BX_PMT_ORDERS_TYPE_PROCESSED || $sType == BX_PMT_ORDERS_TYPE_HISTORY, 'content' => array('order' => $aOrder['order'])), 'products' => $aOrder['products'], 'items' => $aOrder['items'], 'js_object' => $sJsObject));
     }
     //--- Get Paginate Panel ---//
     $sPaginatePanel = "";
     $sMethodNameCount = 'get' . ucfirst($sType) . 'OrdersCount';
     if (($iCount = $this->_oDb->{$sMethodNameCount}($aParams)) > $aParams['per_page']) {
         $oPaginate = new BxDolPaginate(array('page_url' => 'javascript:void(0);', 'start' => $aParams['start'], 'count' => $iCount, 'per_page' => $aParams['per_page'], 'per_page_step' => 2, 'per_page_interval' => 3, 'page_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . ($sType == BX_PMT_ORDERS_TYPE_HISTORY ? 'history' : 'orders') . '/', 'on_change_page' => $sJsObject . ".changePage('" . $sType . "', {start}, {per_page}, " . $aParams['seller_id'] . ")"));
         $sPaginatePanel = $oPaginate->getPaginate();
     }
     return $this->parseHtmlByName($sType . '_orders.html', array('bx_repeat:orders' => $aResultOrders, 'paginate_panel' => $sPaginatePanel));
 }
开发者ID:Arvindvi,项目名称:dolphin,代码行数:33,代码来源:BxPmtTemplate.php

示例3: getProcessedMessages

 /**
  * Get processed message
  *
  * @param $aMessages array
  * @param $bDeleteAllowed boolean
  * @param $bBlockAllowed boolean
  * @return text
  */
 function getProcessedMessages($aMessages = array(), $bDeleteAllowed = false, $bBlockAllowed = false)
 {
     global $oFunctions;
     if (!$aMessages) {
         return;
     }
     $sOutputCode = '';
     $aLanguageKeys = array('by' => _t('_bx_shoutbox_by'), 'visitor' => _t('_Visitor'), 'delete' => _t('_bx_shoutbox_delete_message'), 'sure' => _t('_Are_you_sure'), 'block' => _t('_bx_shoutbox_block_ip'));
     foreach ($aMessages as $iKey => $aItems) {
         $sMemberIcon = '';
         $aProfileInfo = $aItems['OwnerID'] > 0 ? getProfileInfo($aItems['OwnerID']) : array();
         // define some profile's data;
         if ($aProfileInfo) {
             $sNickName = getNickName($aProfileInfo['ID']);
             $sLink = getProfileLink($aItems['OwnerID']);
             $sMemberIcon = $oFunctions->getMemberIcon($aItems['OwnerID']);
         } else {
             $sLink = 'javascript:void(0)';
             $sNickName = $aLanguageKeys['visitor'];
         }
         $aKeys = array('owner_icon' => $sMemberIcon, 'message' => WordWrapStr($aItems['Message']), 'by' => $aLanguageKeys['by'], 'owner_nick' => $sNickName, 'date' => defineTimeInterval($aItems['DateTS'], true, true), 'owner_link' => $sLink, 'bx_if:delete_allowed' => array('condition' => $bDeleteAllowed, 'content' => array('delete_cpt' => bx_html_attribute($aLanguageKeys['delete']), 'sure_cpt' => bx_js_string($aLanguageKeys['sure']), 'message_id' => $aItems['ID'])), 'bx_if:block_allowed' => array('condition' => $bBlockAllowed, 'content' => array('block_cpt' => bx_html_attribute($aLanguageKeys['block']), 'sure_cpt' => bx_js_string($aLanguageKeys['sure']), 'message_id' => $aItems['ID'])));
         $sTemplateName = $aProfileInfo ? 'message.html' : 'visitor_message.html';
         $sOutputCode .= $this->parseHtmlByName($sTemplateName, $aKeys);
     }
     return $sOutputCode;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:34,代码来源:BxShoutBoxTemplate.php

示例4: getLoveHistory

 public function getLoveHistory($page, $justUser = false)
 {
     $front = Frontend::getInstance();
     $page--;
     $l = $this->getLimit() * $page;
     $where = '';
     $sql = "SELECT count(*) " . "FROM " . LOVE_LOVE;
     $res = mysql_query($sql);
     $row = mysql_fetch_row($res);
     $loves = $row[0];
     $sql = "SELECT count(*) " . "FROM " . LOVE_LOVE . " " . "WHERE " . LOVE_LOVE . ".receiver = '" . $front->getUser()->getUsername() . "' " . "OR " . LOVE_LOVE . ".giver = '" . $front->getUser()->getUsername() . "' " . ($sql .= $justUser ? '' : "OR " . LOVE_LOVE . ".company_id = '" . $front->getUser()->getCompany_id() . "' ");
     $sql .= $where . " " . "ORDER BY id DESC";
     $res = mysql_query($sql);
     $row = mysql_fetch_row($res);
     $count = $row[0];
     $cPages = ceil($count / $this->getLimit());
     $sql = "SELECT id,giver,receiver,why,private,TIMESTAMPDIFF(SECOND,at,NOW()) as delta " . "FROM " . LOVE_LOVE . " " . "WHERE " . LOVE_LOVE . ".receiver = '" . $front->getUser()->getUsername() . "' " . "OR " . LOVE_LOVE . ".giver = '" . $front->getUser()->getUsername() . "' ";
     $sql .= $justUser ? '' : "OR " . LOVE_LOVE . ".company_id = '" . $front->getUser()->getCompany_id() . "' ";
     $sql .= $where . " " . "ORDER BY id DESC " . "LIMIT " . $l . "," . $this->getLimit();
     $res = mysql_query($sql);
     // Construct json for history
     $this->pages = array(array($page, $cPages, number_format($loves)));
     for ($i = 1; $row = mysql_fetch_assoc($res); $i++) {
         $givernickname = getNickName($row['giver']);
         $givernickname = !empty($givernickname) ? $givernickname : $row['giver'];
         $receivernickname = getNickName($row['receiver']);
         $receivernickname = !empty($receivernickname) ? $receivernickname : $row['receiver'];
         $why = $row['why'];
         if ($row['private']) {
             $why .= " (love sent quietly)";
         }
         $history[] = array("id" => $row['id'], "giver" => $row['giver'], "giverNickname" => $givernickname, "receiver" => $row['receiver'], "receiverNickname" => $receivernickname, "why" => $why, "delta" => Utils::relativeTime($row['delta']));
     }
     return $history;
 }
开发者ID:highfidelity,项目名称:love,代码行数:35,代码来源:Love.class.php

示例5: genSiteServiceMenu

 function genSiteServiceMenu()
 {
     $bLogged = isLogged();
     $aMenuItem = array();
     $sMenuPopupId = '';
     $sMenuPopupContent = '';
     $bShowVisitor = false;
     bx_import('BxTemplMenuService');
     $oMenu = new BxTemplMenuService();
     if ($bLogged) {
         $aProfile = getProfileInfo($oMenu->aMenuInfo['memberID']);
         $sThumbSetting = getParam('sys_member_info_thumb_icon');
         bx_import('BxDolMemberInfo');
         $o = BxDolMemberInfo::getObjectInstance($sThumbSetting);
         $sThumbUrl = $o ? $o->get($aProfile) : '';
         $bThumb = !empty($sThumbUrl);
         $o = BxDolMemberInfo::getObjectInstance($sThumbSetting . '_2x');
         $sThumbTwiceUrl = $o ? $o->get($aProfile) : '';
         if (!$sThumbTwiceUrl) {
             $sThumbTwiceUrl = $sThumbUrl;
         }
         $aMenuItem = array('bx_if:show_fu_thumb_image' => array('condition' => $bThumb, 'content' => array('image' => $sThumbUrl, 'image_2x' => $sThumbTwiceUrl)), 'bx_if:show_fu_thumb_icon' => array('condition' => !$bThumb, 'content' => array()), 'title' => getNickName($oMenu->aMenuInfo['memberID']));
         $sMenuPopupId = 'sys-service-menu-' . time();
         $sMenuPopupContent = $this->transBox($oMenu->getCode());
     } else {
         $aItems = $oMenu->getItemsArray();
         if (!empty($aItems)) {
             $bShowVisitor = true;
             $bLoginOnly = $aItems[0]['name'] == 'LoginOnly';
             $aMenuItem = array('caption' => $bLoginOnly ? $aItems[0]['caption'] : _t('_sys_sm_join_or_login'), 'icon' => $bLoginOnly ? $aItems[0]['icon'] : 'user', 'script' => $aItems[0]['script'], 'bx_if:show_fu_thumb_image' => array('condition' => false, 'content' => array()), 'bx_if:show_fu_thumb_icon' => array('condition' => false, 'content' => array()), 'title' => '');
         }
     }
     return $GLOBALS['oSysTemplate']->parseHtmlByName('extra_service_menu_wrapper.html', array('bx_if:show_for_visitor' => array('condition' => !$bLogged && $bShowVisitor, 'content' => $aMenuItem), 'bx_if:show_for_user' => array('condition' => $bLogged, 'content' => $aMenuItem), 'menu_popup_id' => $sMenuPopupId, 'menu_popup_content' => $sMenuPopupContent));
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:34,代码来源:BxTemplFunctions.php

示例6: addAlbum

 function addAlbum($aData = array(), $bCheck = true)
 {
     if ($bCheck) {
         $iCheck = $this->_checkAlbumExistence($aData);
         if ($iCheck != 0) {
             return $iCheck;
         }
     }
     $iOwner = (int) $aData['owner'];
     if (isset($aData['AllowAlbumView'])) {
         $iAllowAlbumView = (int) $aData['AllowAlbumView'];
     } elseif (strpos($aData['caption'], getNickName($iOwner)) !== false) {
         $iAllowAlbumView = BX_DOL_PG_ALL;
     } else {
         $iAllowAlbumView = BX_DOL_PG_NOBODY;
     }
     $aFields = array('Caption' => $aData['caption'], 'Uri' => $this->getCorrectUri($aData['caption'], $iOwner, $bCheck), 'Location' => $aData['location'], 'Description' => $aData['description'], 'AllowAlbumView' => $iAllowAlbumView, 'Type' => $this->sType, 'Owner' => $iOwner, 'Status' => getParam('sys_album_auto_app') == 'on' ? 'active' : 'passive', 'Date' => time(), 'LastObjId' => isset($aData['lastObjId']) ? (int) $aData['last_obj'] : 0);
     $sqlBegin = "";
     $sqlCond = "";
     $sqlBody = $this->_getSqlPart($aFields);
     $sqlBegin = "INSERT INTO ";
     $sqlQuery = "{$sqlBegin} `{$this->sAlbumTable}` SET {$sqlBody} {$sqlCond}";
     $GLOBALS['MySQL']->res($sqlQuery);
     return $GLOBALS['MySQL']->lastId();
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:25,代码来源:BxDolAlbums.php

示例7: genSiteServiceMenu

 function genSiteServiceMenu()
 {
     $bLogged = isLogged();
     $aMenuItem = array();
     $sMenuPopupId = '';
     $sMenuPopupContent = '';
     if ($bLogged) {
         bx_import('BxTemplMenuService');
         $oMenu = new BxTemplMenuService();
         if ($oMenu->aMenuInfo['memberID'] != 0) {
             $aProfile = getProfileInfo($oMenu->aMenuInfo['memberID']);
         }
         $sThumbSetting = getParam('sys_member_info_thumb_icon');
         bx_import('BxDolMemberInfo');
         $o = BxDolMemberInfo::getObjectInstance($sThumbSetting);
         $sThumbUrl = $o ? $o->get($aProfile) : '';
         $o = BxDolMemberInfo::getObjectInstance($sThumbSetting . '_2x');
         $sThumbTwiceUrl = $o ? $o->get($aProfile) : '';
         if (!$sThumbTwiceUrl) {
             $sThumbTwiceUrl = $sThumbUrl;
         }
         $bThumb = !empty($sThumbUrl);
         $aMenuItem = array('bx_if:show_fu_thumb_image' => array('condition' => $bThumb, 'content' => array('image' => $sThumbUrl, 'image_2x' => $sThumbTwiceUrl)), 'bx_if:show_fu_thumb_icon' => array('condition' => !$bThumb, 'content' => array()), 'thumbnail' => get_member_icon($oMenu->aMenuInfo['memberID']), 'title' => getNickName($oMenu->aMenuInfo['memberID']));
         $sMenuPopupId = 'sys-service-menu-' . time();
         $sMenuPopupContent = $this->transBox($oMenu->getCode());
     }
     return $GLOBALS['oSysTemplate']->parseHtmlByName('extra_service_menu_wrapper.html', array('bx_if:show_for_visitor' => array('condition' => !$bLogged, 'content' => array()), 'bx_if:show_for_user' => array('condition' => $bLogged, 'content' => $aMenuItem), 'menu_popup_id' => $sMenuPopupId, 'menu_popup_content' => $sMenuPopupContent));
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:28,代码来源:BxTemplFunctions.php

示例8: PrintSearhResult

 /**
  * @description : function will generate profile block (used the profile template );
  * @return : Html presentation data ;
  */
 function PrintSearhResult($aProfileInfo, $aCoupleInfo = '', $aExtendedKey = null, $sTemplateName = '', $oCustomTemplate = null)
 {
     global $site;
     global $aPreValues;
     $iVisitorID = getLoggedId();
     $bExtMode = !empty($_GET['mode']) && $_GET['mode'] == 'extended' || !empty($_GET['search_result_mode']) && $_GET['search_result_mode'] == 'ext';
     $isShowMatchPercent = $bExtMode && $iVisitorID && $iVisitorID != $aProfileInfo['ID'] && getParam('view_match_percent') && getParam('enable_match');
     $sProfileThumb = get_member_thumbnail($aProfileInfo['ID'], 'none', !$bExtMode, 'visitor');
     $sProfileMatch = $isShowMatchPercent ? $GLOBALS['oFunctions']->getProfileMatch($iVisitorID, $aProfileInfo['ID']) : '';
     $sProfileNickname = '<a href="' . getProfileLink($aProfileInfo['ID']) . '">' . getNickName($aProfileInfo['ID']) . '</a>';
     $sProfileInfo = $GLOBALS['oFunctions']->getUserInfo($aProfileInfo['ID']);
     $sProfileDesc = strmaxtextlen($aProfileInfo['DescriptionMe'], 130);
     $sProfileZodiac = $bExtMode && getParam('zodiac') ? $GLOBALS['oFunctions']->getProfileZodiac($aProfileInfo['DateOfBirth']) : '';
     $sProfile2ASc1 = $sProfile2ASc2 = $sProfile2Nick = $sProfile2Desc = $sProfile2Info = $sProfile2Zodiac = '';
     if ($aCoupleInfo) {
         $sProfile2Nick = '<a href="' . getProfileLink($aCoupleInfo['ID']) . '">' . getNickName($aCoupleInfo['ID']) . '</a>';
         $sProfile2Info = $GLOBALS['oFunctions']->getUserInfo($aCoupleInfo['ID']);
         $sProfile2Desc = strmaxtextlen($aCoupleInfo['DescriptionMe'], 130);
         $sProfile2Zodiac = $bExtMode && getParam('zodiac') ? $GLOBALS['oFunctions']->getProfileZodiac($aCoupleInfo['DateOfBirth']) : '';
         $sProfile2ASc1 = 'float:left;width:31%;margin-right:10px;';
         $sProfile2ASc2 = 'float:left;width:31%;display:block;';
     } else {
         $sProfile2ASc2 = 'display:none;';
     }
     $aKeys = array('thumbnail' => $sProfileThumb, 'match' => $sProfileMatch, 'nick' => $sProfileNickname, 'info' => $sProfileInfo, 'i_am_desc' => $sProfileDesc, 'zodiac_sign' => $sProfileZodiac, 'nick2' => $sProfile2Nick, 'info2' => $sProfile2Info, 'i_am_desc2' => $sProfile2Desc, 'zodiac_sign2' => $sProfile2Zodiac, 'add_style_c1' => $sProfile2ASc1, 'add_style_c2' => $sProfile2ASc2);
     if ($aExtendedKey and is_array($aExtendedKey) and !empty($aExtendedKey)) {
         foreach ($aExtendedKey as $sKey => $sValue) {
             $aKeys[$sKey] = $sValue;
         }
     } else {
         $aKeys['ext_css_class'] = '';
     }
     return $oCustomTemplate ? $oCustomTemplate->parseHtmlByName($sTemplateName, $aKeys) : $GLOBALS['oSysTemplate']->parseHtmlByName($sTemplateName, $aKeys);
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:38,代码来源:BxBaseSearchProfile.php

示例9: __construct

 function __construct($oMain, $sMsgNoUsers)
 {
     $aVisitorsPreapare = $oMain->_oDb->getPotentialVisitors($oMain->_iProfileId);
     $aVisitors = array();
     foreach ($aVisitorsPreapare as $k => $r) {
         $aVisitors[] = array('Icon' => $GLOBALS['oFunctions']->getMemberIcon($r['ID'], 'left'), 'Link' => getProfileLink($r['ID']), 'NickName' => getNickName($r['ID']), 'ID' => $r['ID']);
     }
     $aVars = array('bx_repeat:rows' => $aVisitors, 'msg_no_users' => $aVisitors ? '' : $sMsgNoUsers);
     $aCustomForm = array('form_attrs' => array('name' => 'form_inviter', 'action' => '', 'method' => 'post'), 'params' => array('db' => array('submit_name' => 'submit_form')), 'inputs' => array('inviter_users' => array('type' => 'custom', 'content' => $oMain->_oTemplate->parseHtmlByName('inviter', $aVars), 'name' => 'inviter_users', 'caption' => _t('_sys_invitation_step_select_users'), 'info' => _t('_sys_invitation_step_select_users_info'), 'required' => false, 'db' => array('pass' => 'Int')), 'inviter_emails' => array('type' => 'textarea', 'name' => 'inviter_emails', 'caption' => _t('_sys_invitation_step_additional_emails'), 'info' => _t('_sys_invitation_step_additional_emails_info'), 'db' => array('pass' => 'Xss')), 'inviter_text' => array('type' => 'textarea', 'name' => 'inviter_text', 'caption' => _t('_sys_invitation_step_invitation_text'), 'info' => _t('_sys_invitation_step_invitation_text_info'), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'))));
     parent::__construct($aCustomForm);
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:11,代码来源:BxDolTwigFormInviter.php

示例10: displayItem

 function displayItem($aParams, &$aEntry)
 {
     $sSampleType = $aParams['sample_type'];
     $iViewerType = $aParams['viewer_type'];
     $iViewerId = isset($aParams['viewer_id']) ? (int) $aParams['viewer_id'] : 0;
     $bAdminPanel = $iViewerType == BX_TD_VIEWER_TYPE_ADMIN && (isset($aParams['admin_panel']) && $aParams['admin_panel'] || $sSampleType == 'admin');
     $sModuleUri = $this->_oConfig->getUri();
     $sLKLinkEdit = _t('_' . $sModuleUri . '_lcaption_edit');
     $aTmplVars = array('id' => $this->_oConfig->getSystemPrefix() . $aEntry['id'], 'author_icon' => get_member_icon($aEntry['author_id'], 'left'), 'author_url' => getProfileLink($aEntry['author_id']), 'author_username' => getNickName($aEntry['author_id']), 'caption' => str_replace("\$", "&#36;", $aEntry['caption']), 'class' => !in_array($sSampleType, array('view')) ? ' ' . $this->sCssPrefix . '-text-snippet' : '', 'date' => _format_when($aEntry['ago']), 'content' => str_replace("\$", "&#36;", $aEntry['content']), 'link' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aEntry['uri'], 'bx_if:checkbox' => array('condition' => $bAdminPanel, 'content' => array('id' => $aEntry['id'])), 'bx_if:status' => array('condition' => $iViewerType == BX_TD_VIEWER_TYPE_MEMBER && $iViewerId == $aEntry['author_id'] || $iViewerType == BX_TD_VIEWER_TYPE_ADMIN, 'content' => array('status' => _t('_' . $sModuleUri . '_status_' . $aEntry['status']))), 'bx_if:edit_link' => array('condition' => $iViewerType == BX_TD_VIEWER_TYPE_MEMBER && $iViewerId == $aEntry['author_id'] || $iViewerType == BX_TD_VIEWER_TYPE_ADMIN, 'content' => array('edit_link_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'post/' . $aEntry['uri'], 'edit_link_caption' => $sLKLinkEdit)));
     return $this->parseHtmlByName('item.html', $aTmplVars);
 }
开发者ID:noormcs,项目名称:studoro,代码行数:11,代码来源:BxFdbTemplate.php

示例11: parseContent

 function parseContent($sContent, $aKeys, $iMemberId = 0)
 {
     $aResultKeys = $this->getDefaultKeys();
     if ($iMemberId != 0) {
         $aProfile = getProfileInfo($iMemberId);
         $aResultKeys = array_merge($aResultKeys, array('recipientID' => $aProfile['ID'], 'RealName' => getNickName($aProfile['ID']), 'NickName' => getNickName($aProfile['ID']), 'RecipientUrl' => getProfileLink($aProfile['ID']), 'Email' => $aProfile['Email'], 'Password' => $aProfile['Password'], 'SiteName' => getParam('site_title')));
     }
     if (is_array($aKeys)) {
         $aResultKeys = array_merge($aResultKeys, $aKeys);
     }
     return $GLOBALS['oSysTemplate']->parseHtmlByContent($sContent, $aResultKeys, array('<', '>'));
 }
开发者ID:noormcs,项目名称:studoro,代码行数:12,代码来源:BxDolEmailTemplates.php

示例12: getUnit

    /**
     * return html for data unit for some day, it is:
     * - icon 32x32 with link if data have associated image
     * - data title with link if data have no associated image
     */
    function getUnit(&$aData)
    {
        //global $oFunctions;
        $iProfileID = (int) $aData['ID'];
        $sName = getNickName($iProfileID);
        $sUrl = getProfileLink($iProfileID);
        return <<<EOF
<div style="width:95%;">
    <a title="{$sName}" href="{$sUrl}">{$sName}</a>
</div>
EOF;
    }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:17,代码来源:BxDolProfilesCalendar.php

示例13: getUnit

    /**
     * return html for data unit for some day, it is:
     * - icon 32x32 with link if data have associated image, use $GLOBALS['oFunctions']->sysIcon() to return small icon
     * - data title with link if data have no associated image
     */
    function getUnit(&$aData)
    {
        //global $oFunctions;
        $iProfileID = (int) $aData['ID'];
        $sName = getNickName($iProfileID);
        $sUrl = getProfileLink($iProfileID);
        //$sIcon = get_member_icon($iProfileID, 'none', true);
        //return $sIcon;
        //return $oFunctions->sysIcon($sIcon, $sName, $sUrl);
        return <<<EOF
<div style="width:95%;">
\t<a title="{$sName}" href="{$sUrl}">{$sName}</a>
</div>
EOF;
    }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:20,代码来源:BxDolProfilesCalendar.php

示例14: getBlockCode_UpcomingPhoto

 function getBlockCode_UpcomingPhoto()
 {
     $aEvent = $this->oDb->getUpcomingEvent(getParam('bx_events_main_upcoming_event_from_featured_only') ? true : false);
     if (!$aEvent) {
         return false;
     }
     $aAuthor = getProfileInfo($aEvent['ResponsibleID']);
     $a = array('ID' => $aEvent['ResponsibleID'], 'Avatar' => $aEvent['PrimPhoto']);
     $aImage = BxDolService::call('photos', 'get_image', array($a, 'file'), 'Search');
     bx_events_import('Voting');
     $oRating = new BxEventsVoting('bx_events', (int) $aEvent['ID']);
     $sEventUrl = BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aEvent['EntryUri'];
     $aVars = array('bx_if:image' => array('condition' => !$aImage['no_image'] && $aImage['file'], 'content' => array('image_url' => !$aImage['no_image'] && $aImage['file'] ? $aImage['file'] : '', 'image_title' => !$aImage['no_image'] && $aImage['title'] ? $aImage['title'] : '', 'event_url' => $sEventUrl)), 'event_url' => $sEventUrl, 'event_title' => $aEvent['Title'], 'event_start_in' => $this->oMain->_formatDateInBrowse($aEvent), 'author_title' => _t('_From'), 'author_username' => getNickName($aAuthor['ID']), 'author_url' => getProfileLink($aAuthor['ID']), 'rating' => $oRating->isEnabled() ? $oRating->getJustVotingElement(true, $aEvent['ID']) : '', 'participants' => $aEvent['FansCount'], 'country_city' => $this->oMain->_formatLocation($aEvent, true, true), 'place' => $aEvent['Place']);
     return $this->oTemplate->parseHtmlByName('main_event', $aVars);
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:15,代码来源:BxEventsPageMain.php

示例15: getBlockCode_LatestFeaturedGroup

 function getBlockCode_LatestFeaturedGroup()
 {
     $aDataEntry = $this->oDb->getLatestFeaturedItem();
     if (!$aDataEntry) {
         return false;
     }
     $aAuthor = getProfileInfo($aDataEntry['author_id']);
     $sImageUrl = '';
     $sImageTitle = '';
     $a = array('ID' => $aDataEntry['author_id'], 'Avatar' => $aDataEntry['thumb']);
     $aImage = BxDolService::call('photos', 'get_image', array($a, 'file'), 'Search');
     ml_clonetwo_import('Voting');
     $oRating = new MlClonetwoVoting('ml_clonetwo', $aDataEntry['id']);
     $aVars = array('bx_if:image' => array('condition' => !$aImage['no_image'] && $aImage['file'], 'content' => array('image_url' => !$aImage['no_image'] && $aImage['file'] ? $aImage['file'] : '', 'image_title' => !$aImage['no_image'] && $aImage['title'] ? $aImage['title'] : '', 'group_url' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aDataEntry['uri'])), 'group_url' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aDataEntry['uri'], 'group_title' => $aDataEntry['title'], 'author_title' => _t('_From'), 'author_username' => getNickName($aAuthor['ID']), 'author_url' => getProfileLink($aAuthor['ID']), 'rating' => $oRating->isEnabled() ? $oRating->getJustVotingElement(true, $aDataEntry['id']) : '', 'fans_count' => $aDataEntry['fans_count'], 'country_city' => $this->oMain->_formatLocation($aDataEntry, false, true));
     return $this->oTemplate->parseHtmlByName('latest_featured_group', $aVars);
 }
开发者ID:scriptologist,项目名称:Multi-Module-Creator-Plus,代码行数:16,代码来源:MlClonetwoPageMain.php


注:本文中的getNickName函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。