本文整理汇总了PHP中BxDolProfile类的典型用法代码示例。如果您正苦于以下问题:PHP BxDolProfile类的具体用法?PHP BxDolProfile怎么用?PHP BxDolProfile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BxDolProfile类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
* @param string $sType - system type
* @param string $sAction - system action
* @param int $iObjectId - object id
* @param int $iSenderId - sender (action's author) profile id, if it is false - then currectly logged in profile id is used
*/
public function __construct($sUnit, $sAction, $iObjectId, $iSender = false, $aExtras = array())
{
parent::__construct();
if (getParam('sys_db_cache_enable')) {
$oDb = BxDolDb::getInstance();
$oCache = $oDb->getDbCacheObject();
$sCacheKey = $oDb->genDbCacheKey('sys_alerts');
$aData = $oCache->getData($sCacheKey);
if (null === $aData) {
$aData = $this->getAlertsData();
$oCache->setData($sCacheKey, $aData);
}
} else {
$aData = $this->getAlertsData();
}
$this->_aAlerts = $aData['alerts'];
$this->_aHandlers = $aData['handlers'];
$this->sUnit = $sUnit;
$this->sAction = $sAction;
$this->iObject = (int) $iObjectId;
$this->aExtras = $aExtras;
if (false === $iSender) {
$oProfile = BxDolProfile::getInstance();
$this->iSender = $oProfile ? $oProfile->id() : 0;
} else {
$this->iSender = (int) $iSender;
}
}
开发者ID:blas-dmx,项目名称:trident,代码行数:35,代码来源:BxDolAlerts.php
示例2: __construct
public function __construct($aObject, $oTemplate = false)
{
parent::__construct($aObject, $oTemplate);
$CNF = $this->_oModule->_oConfig->CNF;
$iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
$iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
if ($iProfileId) {
$this->_oProfile = BxDolProfile::getInstance($iProfileId);
}
if (!$this->_oProfile && $iContentId) {
$this->_oProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $this->MODULE);
}
if ($this->_oProfile) {
$this->_aProfileInfo = $this->_oProfile->getInfo();
$this->_aContentInfo = $this->_oModule->_oDb->getContentInfoById($this->_aProfileInfo['content_id']);
$this->addMarkers($this->_aProfileInfo);
$this->addMarkers(array('profile_id' => $this->_oProfile->id()));
if (isLogged()) {
$oConn = BxDolConnection::getObjectInstance('sys_profiles_friends');
if ($oConn->isConnectedNotMutual(bx_get_logged_profile_id(), $this->_oProfile->id())) {
$this->addMarkers(array('title_add_friend' => _t($CNF['T']['menu_item_title_befriend_sent']), 'title_remove_friend' => _t($CNF['T']['menu_item_title_unfriend_cancel_request'])));
} elseif ($oConn->isConnectedNotMutual($this->_oProfile->id(), bx_get_logged_profile_id())) {
$this->addMarkers(array('title_add_friend' => _t($CNF['T']['menu_item_title_befriend_confirm']), 'title_remove_friend' => _t($CNF['T']['menu_item_title_unfriend_reject_request'])));
} else {
$this->addMarkers(array('title_add_friend' => _t($CNF['T']['menu_item_title_befriend']), 'title_remove_friend' => _t($CNF['T']['menu_item_title_unfriend'])));
}
}
}
}
开发者ID:blas-dmx,项目名称:trident,代码行数:29,代码来源:BxBaseModProfileMenuView.php
示例3: entryMediaView
function entryMediaView($iMediaId, $mixedContext = false)
{
$oModule = BxDolModule::getInstance($this->MODULE);
$CNF =& $oModule->_oConfig->CNF;
if (!($aMediaInfo = $oModule->_oDb->getMediaInfoById($iMediaId))) {
return '';
}
if (!($aAlbumInfo = $oModule->_oDb->getContentInfoById($aMediaInfo['content_id']))) {
return '';
}
$sUrlAlbum = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aAlbumInfo[$CNF['FIELD_ID']]);
$sText = $this->getMediaTitle($aMediaInfo);
$iProfileId = $aAlbumInfo[$CNF['FIELD_AUTHOR']];
$oProfile = BxDolProfile::getInstance($iProfileId);
if (!$oProfile) {
$oProfile = BxDolProfileUndefined::getInstance();
}
$aVars = array('title' => $sText, 'album' => _t('_bx_albums_txt_media_album_link', $sUrlAlbum, bx_process_output($aAlbumInfo[$CNF['FIELD_TITLE']]), $oProfile->getUrl(), $oProfile->getDisplayName()));
$aNextPrev = array('next' => $this->getNextPrevMedia($aMediaInfo, true, $mixedContext), 'prev' => $this->getNextPrevMedia($aMediaInfo, false, $mixedContext));
foreach ($aNextPrev as $k => $a) {
$aVars['bx_if:' . $k] = array('condition' => $a, 'content' => $a);
$aVars['bx_if:' . $k . '-na'] = array('condition' => !$a, 'content' => array());
}
$aVars = array_merge($aVars, $this->mediaVars($aMediaInfo, $CNF['OBJECT_IMAGES_TRANSCODER_BIG'], $CNF['OBJECT_VIDEOS_TRANSCODERS']['poster'], array('context' => $mixedContext)));
return $this->parseHtmlByName('media-view.html', $aVars);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:26,代码来源:BxAlbumsTemplate.php
示例4: __construct
public function __construct($aObject, $oTemplate = false)
{
parent::__construct($aObject, $oTemplate);
// get profile info
$iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
if ($iProfileId) {
$this->_oProfile = BxDolProfile::getInstance($iProfileId);
$this->_aProfileInfo = $this->_oProfile ? $this->_oProfile->getInfo() : false;
}
if (!$this->_aProfileInfo || !$this->_oProfile) {
return;
}
// select view profile submenu
$oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
if ($oMenuSubmenu) {
$oMenuSubmenu->setObjectSubmenu('bx_persons_view_submenu', array('title' => $this->_oProfile->getDisplayName(), 'link' => $this->_oProfile->getUrl(), 'icon' => $this->_oProfile->getIcon()));
}
// add replaceable markers
$this->addMarkers($this->_aProfileInfo);
// every profile field can be used as marker
$this->addMarkers(array('profile_id' => $this->_oProfile->id()));
// profile id field is also suported
$this->addMarkers(array('display_name' => $this->_oProfile->getDisplayName()));
// profile display name is also suported
}
开发者ID:blas-dmx,项目名称:trident,代码行数:25,代码来源:BxBaseModTextPageAuthor.php
示例5: getProfilesByAccount
public function getProfilesByAccount($aContentInfo, $iMaxVisible = 2)
{
$oProfilesQuery = BxDolProfileQuery::getInstance();
$aProfiles = $oProfilesQuery->getProfilesByAccount($aContentInfo['id']);
$iProfiles = count($aProfiles);
$aTmplVars = array('class_cnt' => '', 'bx_repeat:profiles' => array(), 'bx_if:profiles_more' => array('condition' => $iProfiles > $iMaxVisible, 'content' => array('html_id' => $this->_oConfig->getHtmlIds('profile_more_popup') . $aContentInfo['id'], 'more' => _t('_bx_accnt_txt_more', $iProfiles - $iMaxVisible), 'more_attr' => bx_html_attribute(_t('_bx_accnt_txt_see_more')), 'popup' => '')));
$aTmplVarsPopup = array('class_cnt' => ' bx-def-padding', 'bx_repeat:profiles' => array(), 'bx_if:profiles_more' => array('condition' => false, 'content' => array()));
$i = 0;
foreach ($aProfiles as $iProfileId => $aProfile) {
$oProfile = BxDolProfile::getInstance($iProfileId);
if (!$oProfile) {
continue;
}
$sName = $oProfile->getDisplayName();
$aTmplVarsProfile = array('html_id' => $this->_oConfig->getHtmlIds('profile') . $aProfile['id'], 'id' => $oProfile->id(), 'url' => $oProfile->getUrl(), 'name' => $sName, 'name_attr' => bx_html_attribute($sName));
if ($i < $iMaxVisible) {
$aTmplVars['bx_repeat:profiles'][] = $aTmplVarsProfile;
}
if ($i >= $iMaxVisible) {
$aTmplVarsPopup['bx_repeat:profiles'][] = $aTmplVarsProfile;
}
++$i;
}
if ($aTmplVarsPopup['bx_repeat:profiles']) {
$aTmplVars['bx_if:profiles_more']['content']['popup'] = BxTemplFunctions::getInstance()->transBox('', $this->parseHtmlByName('profiles.html', $aTmplVarsPopup));
}
return $this->parseHtmlByName('profiles.html', $aTmplVars);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:28,代码来源:BxAccntTemplate.php
示例6: getUserInfo
public function getUserInfo($iUserId = 0)
{
$oProfile = BxDolProfile::getInstance($iUserId);
if (!$oProfile) {
$oProfile = BxDolProfileUndefined::getInstance();
}
return array($oProfile->getDisplayName(), $oProfile->getUrl(), $oProfile->getThumb(), $oProfile->getUnit());
}
开发者ID:blas-dmx,项目名称:trident,代码行数:8,代码来源:BxBaseModNotificationsModule.php
示例7: _getCellProfileId
protected function _getCellProfileId($mixedValue, $sKey, $aField, $aRow)
{
$s = '<span class="bx-def-font-grayed">' . _t('_undefined') . '</span>';
if ($mixedValue && ($oProfile = BxDolProfile::getInstance((int) $mixedValue))) {
$s = '<a href="' . $oProfile->getUrl() . '">' . $oProfile->getDisplayName() . '</span>';
}
return parent::_getCellDefault($s, $sKey, $aField, $aRow);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:8,代码来源:BxAntispamGridBlockLog.php
示例8: serviceGetNotificationsPost
public function serviceGetNotificationsPost($aEvent)
{
$iProfile = (int) $aEvent['object_id'];
$oProfile = BxDolProfile::getInstance($iProfile);
if (!$oProfile) {
return array();
}
return array('entry_sample' => _t('_sys_profile_sample_single'), 'entry_url' => $oProfile->getUrl(), 'entry_caption' => $oProfile->getDisplayName(), 'entry_author' => $oProfile->id(), 'lang_key' => '_sys_profile_subscription_added');
}
开发者ID:blas-dmx,项目名称:trident,代码行数:9,代码来源:BxBaseServiceConnections.php
示例9: _getProfileObject
protected function _getProfileObject($iId)
{
bx_import('BxDolProfile');
$oProfile = BxDolProfile::getInstance($iId);
if (!$oProfile) {
bx_import('BxDolProfileUndefined');
$oProfile = BxDolProfileUndefined::getInstance();
}
return $oProfile;
}
开发者ID:blas-dmx,项目名称:trident,代码行数:10,代码来源:BxBaseModTextGridAdministration.php
示例10: _getTemplateVars
protected function _getTemplateVars()
{
$aVars = parent::_getTemplateVars();
$aVars['bx_repeat:menu_items'] = array(true);
$aVars['profile_display_name'] = BxDolProfile::getInstance()->getDisplayName();
$aVars['url_switch_profile'] = BxDolPermalinks::getInstance()->permalink('page.php?i=account-profile-switcher');
$aVars['menu_account'] = BxDolMenu::getObjectInstance('sys_account')->getCode();
$aVars['menu_notifications'] = BxDolMenu::getObjectInstance('sys_account_notifications')->getCode();
return $aVars;
}
开发者ID:Baloo7super,项目名称:dolphin,代码行数:10,代码来源:BxBaseMenuAccountPopup.php
示例11: __construct
public function __construct($aObject, $oTemplate = false)
{
parent::__construct($aObject, $oTemplate);
$CNF =& $this->_oModule->_oConfig->CNF;
$aInformers = array();
// get profile info
$iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
$iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
if ($iProfileId) {
$this->_oProfile = BxDolProfile::getInstance($iProfileId);
}
if (!$this->_oProfile && $iContentId) {
$this->_oProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $this->MODULE);
}
if ($this->_oProfile) {
$this->_aProfileInfo = $this->_oProfile->getInfo();
$this->_aContentInfo = $this->_oModule->_oDb->getContentInfoById($this->_aProfileInfo['content_id']);
}
if (!$this->_aContentInfo || !$this->_oProfile) {
return;
}
// select view profile submenu
$oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
$oMenuSubmenu->setObjectSubmenu($CNF['OBJECT_MENU_SUBMENU_VIEW_ENTRY'], array('title' => $this->_oProfile->getDisplayName(), 'link' => $this->_oProfile->getUrl(), 'icon' => $CNF['ICON']));
// add replaceable markers
$this->addMarkers($this->_aProfileInfo);
// every content field can be used as marker
$this->addMarkers(array('profile_id' => $this->_oProfile->id()));
// profile id field
$this->addMarkers(array('display_name' => $this->_oProfile->getDisplayName()));
// profile display name
$this->addMarkers(array('profile_link' => $this->_oProfile->getUrl()));
// profile link
// display message if profile isn't active
if (bx_get_logged_profile_id() == $this->_oProfile->id() && !empty($CNF['INFORMERS']['status'])) {
$sStatus = $this->_aContentInfo['profile_status'];
if (isset($CNF['INFORMERS']['status']['map'][$sStatus])) {
$aInformers[] = array('name' => $CNF['INFORMERS']['status']['name'], 'msg' => _t($CNF['INFORMERS']['status']['map'][$sStatus]), 'type' => BX_INFORMER_ALERT);
}
}
// display message if it is possible to switch to this profile
$oProfile = $this->_aContentInfo ? BxDolProfile::getInstanceByContentTypeAccount($this->_aContentInfo['id'], $this->MODULE) : false;
if ($oProfile) {
$oProfile->checkSwitchToProfile($this->_oTemplate);
}
// add informers
if ($aInformers) {
$oInformer = BxDolInformer::getInstance($this->_oTemplate);
if ($oInformer) {
foreach ($aInformers as $a) {
$oInformer->add($a['name'], $this->_replaceMarkers($a['msg']), $a['type']);
}
}
}
}
开发者ID:blas-dmx,项目名称:trident,代码行数:55,代码来源:BxBaseModProfilePageEntry.php
示例12: __construct
function __construct($sMode = '', $aParams = array())
{
$this->aUnitViews = array('extended' => 'unit.html');
if (empty($aParams['unit_view'])) {
$aParams['unit_view'] = 'extended';
}
parent::__construct($sMode, $aParams);
$this->aCurrent = array('name' => 'bx_albums', 'module_name' => 'bx_albums', 'object_metatags' => 'bx_albums', 'title' => _t('_bx_albums_page_title_browse'), 'table' => 'bx_albums_albums', 'ownFields' => array('id', 'title', 'text', 'thumb', 'author', 'added'), 'searchFields' => array('title', 'text'), 'restriction' => array('author' => array('value' => '', 'field' => 'author', 'operator' => '='), 'status' => array('value' => 'active', 'field' => 'status', 'operator' => '=')), 'paginate' => array('perPage' => getParam('bx_albums_per_page_browse'), 'start' => 0), 'sorting' => 'last', 'rss' => array('title' => '', 'link' => '', 'image' => '', 'profile' => 0, 'fields' => array('Guid' => 'link', 'Link' => 'link', 'Title' => 'title', 'DateTimeUTS' => 'added', 'Desc' => 'text')), 'ident' => 'id');
$this->sFilterName = 'bx_albums_filter';
$this->oModule = $this->getMain();
$oProfileAuthor = null;
$CNF =& $this->oModule->_oConfig->CNF;
switch ($sMode) {
case 'author':
$oProfileAuthor = BxDolProfile::getInstance((int) $aParams['author']);
if (!$oProfileAuthor) {
$this->isError = true;
break;
}
$this->aCurrent['restriction']['author']['value'] = $oProfileAuthor->id();
$this->sBrowseUrl = 'page.php?i=' . $CNF['URI_AUTHOR_ENTRIES'] . '&profile_id={profile_id}';
$this->aCurrent['title'] = _t('_bx_albums_page_title_browse_by_author');
$this->aCurrent['rss']['link'] = 'modules/?r=albums/rss/' . $sMode . '/' . $oProfileAuthor->id();
break;
case 'public':
$this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
$this->aCurrent['title'] = _t('_bx_albums_page_title_browse_recent');
$this->aCurrent['rss']['link'] = 'modules/?r=albums/rss/' . $sMode;
break;
case 'popular':
$this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_POPULAR']);
$this->aCurrent['title'] = _t('_bx_albums_page_title_browse_popular');
$this->aCurrent['rss']['link'] = 'modules/?r=albums/rss/' . $sMode;
$this->aCurrent['sorting'] = 'popular';
break;
case 'updated':
$this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_UPDATED']);
$this->aCurrent['title'] = _t('_bx_albums_page_title_browse_updated');
$this->aCurrent['rss']['link'] = 'modules/?r=albums/rss/' . $sMode;
$this->aCurrent['sorting'] = 'updated';
break;
case '':
// search results
$this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
$this->aCurrent['title'] = _t('_bx_albums');
$this->aCurrent['paginate']['perPage'] = 3;
unset($this->aCurrent['rss']);
break;
default:
$sMode = '';
$this->isError = true;
}
$this->processReplaceableMarkers($oProfileAuthor);
$this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:55,代码来源:BxAlbumsSearchResult.php
示例13: serviceProfileStats
public function serviceProfileStats($iProfileId = 0)
{
if (!$iProfileId) {
$iProfileId = bx_get_logged_profile_id();
}
$oMenu = BxDolMenu::getObjectInstance('sys_profile_stats');
$oProfile = BxDolProfile::getInstance($iProfileId);
$aVars = array('profile_id' => $oProfile->id(), 'profile_url' => $oProfile->getUrl(), 'profile_edit_url' => $oProfile->getEditUrl(), 'profile_title' => $oProfile->getDisplayName(), 'profile_title_attr' => bx_html_attribute($oProfile->getDisplayName()), 'profile_ava_url' => $oProfile->getAvatar(), 'menu' => $oMenu->getCode());
$oTemplate = BxDolTemplate::getInstance();
return $oTemplate->parseHtmlByName('profile_stats.html', $aVars);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:11,代码来源:BxBaseServiceProfiles.php
示例14: __construct
public function __construct($iAccoutId = 0)
{
parent::__construct();
$sKey = getParam('bx_antispam_akismet_api_key');
if ($sKey && ($oAccount = BxDolAccount::getInstance((int) $iAccoutId))) {
require_once BX_DIRECTORY_PATH_PLUGINS . 'akismet/Akismet.class.php';
$this->oAkismet = new Akismet(BX_DOL_URL_ROOT, $sKey);
$oProfile = BxDolProfile::getInstanceByAccount((int) $iAccoutId);
$this->oAkismet->setCommentAuthorEmail($oAccount->getEmail());
$this->oAkismet->setCommentAuthor($oProfile->getDisplayName());
$this->oAkismet->setCommentAuthorURL($oProfile->getUrl());
}
}
开发者ID:blas-dmx,项目名称:trident,代码行数:13,代码来源:BxAntispamAkismet.php
示例15: __construct
function __construct($sMode = '', $aParams = array())
{
$this->sCenterContentUnitSelector = '.bx-albums-unit-size';
$this->aUnitViews = array('gallery' => 'unit_media.html');
$this->sUnitTemplateLiveSearch = 'unit_media_live_search.html';
if (empty($aParams['unit_view'])) {
$aParams['unit_view'] = 'gallery';
}
parent::__construct($sMode, $aParams);
$this->aCurrent = array('name' => 'bx_albums_media', 'module_name' => 'bx_albums', 'object_metatags' => 'bx_albums_media', 'title' => _t('_bx_albums_media'), 'table' => 'bx_albums_files2albums', 'ownFields' => array('id', 'title', 'data', 'content_id', 'file_id', 'order', 'views'), 'searchFields' => array('title'), 'restriction_sql' => '', 'restriction' => array('author' => array('value' => '', 'field' => 'author', 'operator' => '='), 'album' => array('value' => '', 'field' => 'content_id', 'operator' => '=')), 'join' => array('albums' => array('type' => 'INNER', 'table' => 'bx_albums_albums', 'mainField' => 'content_id', 'onField' => 'id', 'joinFields' => array()), 'files' => array('type' => 'INNER', 'table' => 'bx_albums_files', 'table_alias' => 'f', 'mainField' => 'file_id', 'onField' => 'id', 'joinFields' => array('added'))), 'paginate' => array('perPage' => getParam('bx_albums_per_page_browse'), 'start' => 0), 'sorting' => 'last', 'rss' => array('title' => '', 'link' => '', 'image' => '', 'profile' => 0, 'fields' => array('Guid' => 'link', 'Link' => 'link', 'Title' => 'title', 'DateTimeUTS' => 'added', 'Desc' => 'title')), 'ident' => 'id');
$this->sFilterName = 'bx_albums_filter';
$this->oModule = $this->getMain();
$oProfileAuthor = isset($aParams['author']) ? BxDolProfile::getInstance((int) $aParams['author']) : null;
$CNF =& $this->oModule->_oConfig->CNF;
switch ($sMode) {
case 'album':
$this->aCurrent['restriction']['album']['value'] = (int) $aParams['album_id'];
$this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . (int) $aParams['album_id']);
$this->aCurrent['title'] = _t('_bx_albums_page_title_browse_media_in_album');
$this->aCurrent['rss']['link'] = 'modules/?r=albums/rss_media/' . $sMode . '/' . (int) $aParams['album_id'];
$this->aCurrent['sorting'] = 'order';
$this->sOrderDirection = 'ASC';
break;
case 'recent':
$this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_RECENT_MEDIA']);
$this->aCurrent['title'] = _t('_bx_albums_page_title_browse_recent_media');
$this->aCurrent['rss']['link'] = 'modules/?r=albums/rss_media/' . $sMode;
$this->aCurrent['sorting'] = 'last';
break;
case 'popular':
$this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_POPULAR_MEDIA']);
$this->aCurrent['title'] = _t('_bx_albums_page_title_browse_popular_media');
$this->aCurrent['rss']['link'] = BxDolPermalinks::getInstance()->permalink('modules/?r=albums/rss_media/' . $sMode);
$this->aCurrent['sorting'] = 'popular';
break;
case '':
// search results
$this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
$this->aCurrent['paginate']['perPage'] = 3;
unset($this->aCurrent['rss']);
break;
default:
$sMode = '';
$this->isError = true;
}
$this->sBrowseUrl = $this->_replaceMarkers($this->sBrowseUrl);
$this->aCurrent['title'] = $this->_replaceMarkers($this->aCurrent['title']);
$this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:49,代码来源:BxAlbumsSearchResultMedia.php
示例16: getFeed
public function getFeed($mixedId, $iUserId = 0)
{
$sUrl = $this->getUrl($mixedId);
$aMarkers = array('SiteUrl' => BX_DOL_URL_ROOT);
if ($iUserId) {
$oProfile = BxDolProfile::getInstance($iUserId);
if (!$oProfile) {
$oProfile = BxDolProfileUndefined::getInstance();
}
$aMarkers['NickName'] = $oProfile->getDisplayName();
}
$sUrl = bx_replace_markers($sUrl, $aMarkers);
header('Content-Type: text/xml; charset=utf-8');
return bx_file_get_contents($sUrl . (defined('BX_PROFILER') && BX_PROFILER && 0 == strncmp(BX_DOL_URL_ROOT, $sUrl, strlen(BX_DOL_URL_ROOT)) ? '&bx_profiler_disable=1' : ''));
}
开发者ID:blas-dmx,项目名称:trident,代码行数:15,代码来源:BxBaseRss.php
示例17: entryAuthor
function entryAuthor($aData, $sTemplateName = 'author.html')
{
$oModule = BxDolModule::getInstance($this->MODULE);
$CNF =& $oModule->_oConfig->CNF;
$oProfile = BxDolProfile::getInstance($aData[$CNF['FIELD_AUTHOR']]);
if (!$oProfile) {
bx_import('BxDolProfileUndefined');
$oProfile = BxDolProfileUndefined::getInstance();
}
if (!$oProfile) {
return '';
}
$aVars = array('author_url' => $oProfile->getUrl(), 'author_thumb_url' => $oProfile->getThumb(), 'author_title' => $oProfile->getDisplayName(), 'author_desc' => $this->getAuthorDesc($aData));
return $this->parseHtmlByName($sTemplateName, $aVars);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:15,代码来源:BxBaseModTextTemplate.php
示例18: _getProfileAndContentData
/**
* @return array of profile object and content info
*/
protected function _getProfileAndContentData($iContentId)
{
$CNF =& $this->_oModule->_oConfig->CNF;
$aContentInfo = array();
$oProfile = false;
$aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);
if (!$aContentInfo) {
return array(false, false);
}
$oProfile = BxDolProfile::getInstance($aContentInfo[$CNF['FIELD_AUTHOR']]);
if (!$oProfile) {
$oProfile = BxDolProfileUndefined::getInstance();
}
return array($oProfile, $aContentInfo);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:18,代码来源:BxBaseModTextFormsEntryHelper.php
示例19: _isVisible
/**
* Check if menu items is visible with extended checking for friends notifications
* @param $a menu item array
* @return boolean
*/
protected function _isVisible($a)
{
// default visible settings
if (!BxDolAcl::getInstance()->isMemberLevelInSet($a['visible_for_levels'])) {
return false;
}
// show only friends for currently active profile for friend request notification
if ('notifications-friend-requests' == $a['name'] || 'profile-stats-friend-requests' == $a['name']) {
$oProfile = BxDolProfile::getInstance();
$aInfo = $oProfile->getInfo();
if ($a['module'] != $aInfo['type']) {
return false;
}
}
return true;
}
开发者ID:blas-dmx,项目名称:trident,代码行数:21,代码来源:BxBaseMenuAccountNotifications.php
示例20: __construct
function __construct($sMode = '', $aParams = false)
{
parent::__construct($sMode, $aParams);
$this->aCurrent = array('name' => 'bx_persons', 'module_name' => 'bx_persons', 'object_metatags' => 'bx_persons', 'title' => _t('_bx_persons_page_title_browse'), 'table' => 'sys_profiles', 'tableSearch' => 'bx_persons_data', 'ownFields' => array(), 'searchFields' => array('fullname', 'description'), 'restriction' => array('account_id' => array('value' => '', 'field' => 'account_id', 'operator' => '='), 'perofileStatus' => array('value' => 'active', 'field' => 'status', 'operator' => '='), 'perofileType' => array('value' => 'bx_persons', 'field' => 'type', 'operator' => '='), 'owner' => array('value' => '', 'field' => 'author', 'operator' => '=', 'table' => 'bx_persons_data')), 'join' => array('profile' => array('type' => 'INNER', 'table' => 'bx_persons_data', 'mainField' => 'content_id', 'onField' => 'id', 'joinFields' => array('id', 'fullname', 'picture', 'added')), 'account' => array('type' => 'INNER', 'table' => 'sys_accounts', 'mainField' => 'account_id', 'onField' => 'id', 'joinFields' => array())), 'paginate' => array('perPage' => 20, 'start' => 0), 'sorting' => 'none', 'rss' => array('title' => '', 'link' => '', 'image' => '', 'profile' => 0, 'fields' => array('Guid' => 'link', 'Link' => 'link', 'Title' => 'fullname', 'DateTimeUTS' => 'added', 'Desc' => 'fullname', 'Picture' => 'picture')), 'ident' => 'id');
$this->sFilterName = 'bx_persons_filter';
$this->oModule = $this->getMain();
switch ($sMode) {
case 'connections':
if ($this->_setConnectionsConditions($aParams)) {
$oProfile = BxDolProfile::getInstance($aParams['profile']);
$oProfile2 = isset($aParams['profile2']) ? BxDolProfile::getInstance($aParams['profile2']) : null;
if (isset($aParams['type']) && $aParams['type'] == 'common' && $oProfile && $oProfile2) {
$this->aCurrent['title'] = _t('_bx_persons_page_title_browse_connections_mutual', $oProfile->getDisplayName(), $oProfile2->getDisplayName());
} elseif ((!isset($aParams['type']) || $aParams['type'] != 'common') && $oProfile) {
$this->aCurrent['title'] = _t('_bx_persons_page_title_browse_connections', $oProfile->getDisplayName());
}
$this->aCurrent['rss']['link'] = 'modules/?r=persons/rss/' . $sMode . '/' . $aParams['object'] . '/' . $aParams['type'] . '/' . (int) $aParams['profile'] . '/' . (int) $aParams['profile2'] . '/' . (int) $aParams['mutual'];
}
break;
case 'recent':
$this->aCurrent['rss']['link'] = 'modules/?r=persons/rss/' . $sMode;
$this->aCurrent['title'] = _t('_bx_persons_page_title_browse_recent');
$this->aCurrent['sorting'] = 'last';
$this->sBrowseUrl = 'page.php?i=persons-home';
break;
case 'active':
$this->aCurrent['rss']['link'] = 'modules/?r=persons/rss/' . $sMode;
$this->aCurrent['title'] = _t('_bx_persons_page_title_browse_active');
$this->aCurrent['sorting'] = 'active';
$this->sBrowseUrl = 'page.php?i=persons-active';
break;
case '':
// search results
$this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
$this->aCurrent['title'] = _t('_bx_persons');
$this->aCurrent['paginate']['perPage'] = 5;
unset($this->aCurrent['rss']);
break;
default:
$this->isError = true;
}
parent::__construct();
}
开发者ID:blas-dmx,项目名称:trident,代码行数:43,代码来源:BxPersonsSearchResult.php
注:本文中的BxDolProfile类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论