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


PHP BxTemplSearchResult::__construct方法代码示例

本文整理汇总了PHP中BxTemplSearchResult::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP BxTemplSearchResult::__construct方法的具体用法?PHP BxTemplSearchResult::__construct怎么用?PHP BxTemplSearchResult::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BxTemplSearchResult的用法示例。


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

示例1:

 function __construct($sType, $oModule = null)
 {
     parent::__construct();
     if (!empty($oModule)) {
         $this->_oModule = $oModule;
     } else {
         $this->_oModule =& BxDolModule::getInstance('BxProfileCustomizeModule');
     }
     $this->aCurrent['restriction']['type']['value'] = $sType;
     $this->_sType = $sType;
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:11,代码来源:BxProfileCustomizeSearchResult.php

示例2: array

 function __construct($sParamName = '', $sParamValue = '', $sParamValue1 = '', $sParamValue2 = '')
 {
     parent::__construct();
     // main settings
     $this->aCurrent = array('name' => 'bx_files', 'title' => '_bx_files', 'table' => 'bx_files_main', 'ownFields' => array('ID', 'Title', 'Uri', 'Desc', 'Date', 'Size', 'Ext', 'Views', 'Rate', 'RateCount', 'Type'), 'searchFields' => array('Title', 'Tags', 'Desc', 'Categories'), 'join' => array('profile' => array('type' => 'left', 'table' => 'Profiles', 'mainField' => 'Owner', 'onField' => 'ID', 'joinFields' => array('NickName')), 'icon' => array('type' => 'left', 'table' => 'bx_files_types', 'mainField' => 'Type', 'onField' => 'Type', 'joinFields' => array('Icon')), 'albumsObjects' => array('type' => 'left', 'table' => 'sys_albums_objects', 'mainField' => 'ID', 'onField' => 'id_object', 'joinFields' => ''), 'albums' => array('type' => 'left', 'table' => 'sys_albums', 'mainField' => 'id_album', 'onField' => 'ID', 'joinFields' => array('AllowAlbumView'), 'mainTable' => 'sys_albums_objects')), 'restriction' => array('activeStatus' => array('value' => 'approved', 'field' => 'Status', 'operator' => '=', 'paramName' => 'status'), 'owner' => array('value' => '', 'field' => 'NickName', 'operator' => '=', 'paramName' => 'ownerName', 'table' => 'Profiles'), 'ownerStatus' => array('value' => array('Rejected', 'Suspended'), 'operator' => 'not in', 'paramName' => 'ownerStatus', 'table' => 'Profiles', 'field' => 'Status'), 'tag' => array('value' => '', 'field' => 'Tags', 'operator' => 'against', 'paramName' => 'tag'), 'category' => array('value' => '', 'field' => 'Categories', 'operator' => 'against', 'paramName' => 'categoryUri'), 'id' => array('value' => '', 'field' => 'ID', 'operator' => 'in'), 'allow_view' => array('value' => '', 'field' => 'AllowAlbumView', 'operator' => 'in', 'table' => 'sys_albums'), 'not_allow_view' => array('value' => '', 'field' => 'AllowAlbumView', 'operator' => 'not in', 'table' => 'sys_albums'), 'album_status' => array('value' => 'active', 'field' => 'Status', 'operator' => '=', 'table' => 'sys_albums'), 'albumType' => array('value' => '', 'field' => 'Type', 'operator' => '=', 'paramName' => 'albumType', 'table' => 'sys_albums')), 'paginate' => array('perPage' => 10, 'page' => 1, 'totalNum' => 10, 'totalPages' => 1), 'sorting' => 'last', 'view' => 'full', 'ident' => 'ID', 'rss' => array('title' => _t('_bx_files'), 'link' => '', 'image' => '', 'profile' => 0, 'fields' => array('Link' => '', 'Title' => 'title', 'DateTimeUTS' => 'date', 'Desc' => 'desc', 'Photo' => '')));
     // redeclaration some unique fav fields
     $this->aAddPartsConfig['favorite'] = array('type' => 'inner', 'table' => 'bx_files_favorites', 'mainField' => 'ID', 'onField' => 'ID', 'userField' => 'Profile', 'joinFields' => '');
     $this->oModule = BxDolModule::getInstance('BxFilesModule');
     $this->oTemplate = $this->oModule->_oTemplate;
     $this->oModule->_oTemplate->addCss('search.css');
     $this->aConstants['filesUrl'] = $this->oModule->_oConfig->getFilesUrl();
     $this->aConstants['filesDir'] = $this->oModule->_oConfig->getFilesPath();
     $this->aConstants['filesInAlbumCover'] = 32;
     $this->aConstants['picPostfix'] = $this->oModule->_oConfig->aFilePostfix;
     //permalinks generation
     $this->aConstants['linksTempl'] = array('home' => 'home', 'file' => 'view/{uri}', 'category' => 'browse/category/{uri}', 'browseAll' => 'browse/', 'browseUserAll' => 'albums/browse/owner/{uri}', 'browseAllTop' => 'browse/top', 'tag' => 'browse/tag/{uri}', 'album' => 'browse/album/{uri}', 'add' => 'browse/my/add');
     $this->aCurrent['restriction']['albumType']['value'] = $this->aCurrent['name'];
     //additional modes for browse
     switch ($sParamName) {
         case 'calendar':
             $this->aCurrent['restriction']['calendar-min'] = array('value' => "UNIX_TIMESTAMP('{$sParamValue}-{$sParamValue1}-{$sParamValue2} 00:00:00')", 'field' => 'Date', 'operator' => '>=', 'no_quote_value' => true);
             $this->aCurrent['restriction']['calendar-max'] = array('value' => "UNIX_TIMESTAMP('{$sParamValue}-{$sParamValue1}-{$sParamValue2} 23:59:59')", 'field' => 'Date', 'operator' => '<=', 'no_quote_value' => true);
             break;
         case 'top':
             $this->aCurrent['sorting'] = 'top';
             break;
         case 'popular':
             $this->aCurrent['sorting'] = 'popular';
             break;
         case 'featured':
             $this->aCurrent['restriction']['featured'] = array('value' => '1', 'field' => 'Featured', 'operator' => '=', 'paramName' => 'bx_files_mode');
             break;
         case 'favorited':
             if (isset($this->aAddPartsConfig['favorite']) && !empty($this->aAddPartsConfig['favorite']) && getLoggedId() != 0) {
                 $this->aCurrent['join']['favorite'] = $this->aAddPartsConfig['favorite'];
                 $this->aCurrent['restriction']['fav'] = array('value' => getLoggedId(), 'field' => $this->aAddPartsConfig['favorite']['userField'], 'operator' => '=', 'table' => $this->aAddPartsConfig['favorite']['table']);
             }
             break;
         case 'album':
             $this->aCurrent['sorting'] = 'album_order';
             $this->aCurrent['restriction']['album'] = array('value' => '', 'field' => 'Uri', 'operator' => '=', 'paramName' => 'albumUri', 'table' => 'sys_albums');
             if ($sParamValue1 == 'owner' && strlen($sParamValue2) > 0) {
                 $this->aCurrent['restriction']['owner']['value'] = $sParamValue2;
             }
             break;
     }
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:47,代码来源:BxFilesSearch.php

示例3:

 function __construct()
 {
     parent::__construct();
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:4,代码来源:BxDolTwigSearchResult.php

示例4: BxTemplVotingView

 function __construct($sMode = '', $sValue = '', $sValue2 = '', $sValue3 = '')
 {
     $this->_oMain = $this->getSitesMain();
     $this->isError = false;
     $this->sUnitTemplate = 'unit';
     $this->sUnitName = 'unit';
     $this->sThumbSize = 'browse';
     $this->sMode = $sMode;
     bx_import("BxTemplVotingView");
     $oVotingView = new BxTemplVotingView('bx_sites', 0);
     $this->oVotingView = $oVotingView->isEnabled() ? $oVotingView : null;
     $this->aCurrent['title'] = _t('_bx_sites');
     $this->aCurrent['paginate']['perPage'] = getParam('bx_sites_per_page');
     switch ($sMode) {
         case 'pending':
             unset($this->aCurrent['rss']);
             break;
         case 'adminpending':
             unset($this->aCurrent['rss']);
             $this->aCurrent['restriction']['activeStatus']['value'] = 'pending';
             $this->sSitesBrowseUrl = 'administration';
             break;
         case 'my_pending':
             $this->aCurrent['restriction']['owner'] = array('value' => $this->_oMain->iOwnerId, 'field' => 'ownerid', 'operator' => '=');
             $this->aCurrent['restriction']['activeStatus']['value'] = 'pending';
             $this->sSitesBrowseUrl = 'browse/my';
             unset($this->aCurrent['rss']);
             break;
         case 'user':
             if ($sValue) {
                 $iProfileId = $this->_oMain->_oDb->getProfileIdByNickName($sValue);
                 if ($iProfileId) {
                     $this->aCurrent['title'] = _t('_bx_sites_caption_browse_by_user') . $sValue;
                     $GLOBALS['oTopMenu']->setCurrentProfileID($iProfileId);
                     $this->aCurrent['restriction']['owner'] = array('value' => $iProfileId, 'field' => 'ownerid', 'operator' => '=');
                     $this->sSitesBrowseUrl = 'browse/user/' . $sValue;
                 } else {
                     $this->isError = true;
                 }
             } else {
                 $this->isError = true;
             }
             break;
         case 'category':
             $sCategory = uri2title($sValue);
             $this->aCurrent['restriction']['category']['value'] = $sCategory;
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_by_category') . ' ' . $sCategory;
             $GLOBALS['oTopMenu']->setCustomSubHeader(_t('_bx_sites_caption_browse_by_category') . ' ' . $sCategory);
             $this->sSitesBrowseUrl = 'browse/category/' . $sValue . '/';
             break;
         case 'tag':
             $sTag = uri2title($sValue);
             $this->aCurrent['restriction']['tag']['value'] = $sTag;
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_by_tag') . ' ' . $sTag;
             $GLOBALS['oTopMenu']->setCustomSubHeader(_t('_bx_sites_caption_browse_by_tag') . ' ' . $sTag);
             $this->sSitesBrowseUrl = 'browse/all';
             break;
         case 'all':
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_all');
             $this->sSitesBrowseUrl = 'browse/all';
             break;
         case 'recent':
             $this->aCurrent['paginate']['perPage'] = 1;
             $this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
             $this->sUnitTemplate = 'block_percent';
             $this->sThumbSize = 'file';
             break;
         case 'featured':
             $this->aCurrent['restriction']['featured']['value'] = 1;
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_featured');
             $this->sSitesBrowseUrl = 'browse/featured';
             $this->sSitesBrowseAll = 'browse/featured';
             break;
         case 'featuredlast':
             $this->aCurrent['paginate']['perPage'] = 1;
             $this->aCurrent['restriction']['featured']['value'] = 1;
             $this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
             $this->sUnitTemplate = 'block_percent';
             $this->sThumbSize = 'file';
             break;
         case 'featuredshort':
             $this->aCurrent['restriction']['featured']['value'] = 1;
             $this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
             $this->sUnitTemplate = 'unit_short';
             $this->sSitesBrowseUrl = 'browse/featuredshort';
             $this->sSitesBrowseAll = 'browse/featured';
             $this->aCurrent['paginate']['perPage'] = 5;
             break;
         case 'top':
             $this->aCurrent['sorting'] = 'top';
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_top_rated');
             $this->sSitesBrowseUrl = 'browse/top';
             break;
         case 'popular':
             $this->aCurrent['sorting'] = 'popular';
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_popular');
             $this->sSitesBrowseUrl = 'browse/popular';
             break;
         case 'search':
             if ($sValue) {
//.........这里部分代码省略.........
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:101,代码来源:BxSitesSearchResult.php

示例5: array

 function __construct($sMode = '', $aParams = array())
 {
     parent::__construct();
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:4,代码来源:BxBaseModGeneralSearchResult.php


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