Changeset 15334
- Timestamp:
- 07/12/11 01:20:32 (11 months ago)
- Location:
- trunk
- Files:
-
- 27 edited
-
categories.php (modified) (5 diffs)
-
change_status.php (modified) (1 diff)
-
inc/classes/BxDolFilesUploader.php (modified) (1 diff)
-
inc/classes/BxDolFriendsPageView.php (modified) (6 diffs)
-
inc/classes/BxDolMemberMenu.php (modified) (6 diffs)
-
inc/classes/BxDolPageViewCacher.php (modified) (1 diff)
-
inc/classes/BxDolPrivacySearch.php (modified) (2 diffs)
-
inc/classes/BxDolSubscription.php (modified) (3 diffs)
-
inc/classes/BxDolTextPageMain.php (modified) (1 diff)
-
inc/classes/BxDolUserStatusView.php (modified) (5 diffs)
-
inc/languages.inc.php (modified) (1 diff)
-
inc/params.inc.php (modified) (1 diff)
-
mail.php (modified) (1 diff)
-
member_privacy.php (modified) (1 diff)
-
search.php (modified) (1 diff)
-
tags.php (modified) (4 diffs)
-
templates/base/scripts/BxBaseBrowse.php (modified) (5 diffs)
-
templates/base/scripts/BxBaseCategories.php (modified) (4 diffs)
-
templates/base/scripts/BxBaseCommunicator.php (modified) (2 diffs)
-
templates/base/scripts/BxBaseFunctions.php (modified) (11 diffs)
-
templates/base/scripts/BxBaseIndexPageView.php (modified) (4 diffs)
-
templates/base/scripts/BxBaseMailBox.php (modified) (11 diffs)
-
templates/base/scripts/BxBaseMenu.php (modified) (2 diffs)
-
templates/base/scripts/BxBaseProfileView.php (modified) (2 diffs)
-
templates/base/scripts/BxBaseSearchResultSharedMedia.php (modified) (2 diffs)
-
templates/base/scripts/BxBaseTags.php (modified) (5 diffs)
-
templates/tmpl_uni/scripts/BxTemplConfig.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/categories.php
r15260 r15334 32 32 require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); 33 33 34 bx_import('BxDolTemplate'); 34 35 bx_import('BxTemplCategories'); 35 36 bx_import('BxDolPageView'); … … 92 93 'month_current' => $this->getTitle(), 93 94 ); 94 $sHtml = $GLOBALS['oSysTemplate']->parseHtmlByName('calendar.html', $aVars); 95 96 $oSysTemplate = BxDolTemplate::getInstance(); 97 98 $sHtml = $oSysTemplate->parseHtmlByName('calendar.html', $aVars); 95 99 $sHtml = preg_replace ('#<bx_repeat:events>.*?</bx_repeat:events>#s', '', $sHtml); 96 $ GLOBALS['oSysTemplate']->addCss('calendar.css');100 $oSysTemplate->addCss('calendar.css'); 97 101 return $sHtml; 98 102 } … … 273 277 } 274 278 275 function getBlockCode_Form() 276 { 277 return $GLOBALS['oSysTemplate']->parseHtmlByName('search_tags_box.html', array('form' => $this->oForm->getCode())); 279 function getBlockCode_Form() { 280 return BxDolTemplate::getInstance()->parseHtmlByName('search_tags_box.html', array('form' => $this->oForm->getCode())); 278 281 } 279 282 … … 363 366 364 367 if (!$bAjaxMode) { 365 bx_import('BxDolTemplate');366 368 $oTemplate = BxDolTemplate::getInstance(); 367 369 $oTemplate->setPageNameIndex(25); … … 379 381 else 380 382 echo $sContent; 381 382 ?> -
trunk/change_status.php
r15260 r15334 165 165 break; 166 166 } 167 return $GLOBALS['oSysTemplate']->parseHtmlByName('change_status.html', $aData); 167 bx_import('BxDolTemplate'); 168 return BxDolTemplate::getInstance()->parseHtmlByName('change_status.html', $aData); 168 169 } 169 170 -
trunk/inc/classes/BxDolFilesUploader.php
r15211 r15334 55 55 $this->sSendFileInfoFormCaption = ''; 56 56 57 $ GLOBALS['oSysTemplate']->addJsTranslation(array(57 $this->addJsTranslation(array( 58 58 '_bx_' . $this->sUploadTypeLC . 's_val_title_err', 59 59 '_bx_' . $this->sUploadTypeLC . 's_val_descr_err' -
trunk/inc/classes/BxDolFriendsPageView.php
r15287 r15334 23 23 ***************************************************************************/ 24 24 25 bx_import( 'BxDolPageView' ); 25 bx_import('BxDolTemplate'); 26 bx_import('BxDolPageView'); 26 27 27 28 class BxDolFriendsPageView extends BxDolPageView … … 247 248 248 249 // build template ; 249 $sOutputHtml = $GLOBALS['oSysTemplate'] ->parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys );250 $sOutputHtml = BxDolTemplate::getInstance()->parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys ); 250 251 251 252 // build the toggle block ; … … 288 289 [message] - (string) text message ( if will have a new messages ); 289 290 */ 290 function get_member_menu_bubble_online_friends($iMemberId, $iOldCount = 0) 291 { 292 global $oSysTemplate, $oFunctions, $site; 291 function get_member_menu_bubble_online_friends($iMemberId, $iOldCount = 0) { 292 global $oFunctions, $site; 293 294 $oSysTemplate = BxDolTemplate::getInstance(); 293 295 294 296 $iMemberId = (int) $iMemberId; … … 353 355 global $oFunctions; 354 356 357 $oSysTemplate = BxDolTemplate::getInstance(); 358 355 359 $iMemberId = (int) $iMemberId; 356 360 $iOnlineTime = getParam('member_online_time'); … … 378 382 $oModuleDb = BxDolModuleQuery::getInstance(); 379 383 380 $sVideoMessengerImgPath = $ GLOBALS['oSysTemplate']-> getIconUrl('video.png');384 $sVideoMessengerImgPath = $oSysTemplate -> getIconUrl('video.png'); 381 385 $sMessengerTitle = _t('_Chat'); 382 386 … … 434 438 ); 435 439 436 $sOutputCode = $GLOBALS['oSysTemplate'] -> parseHtmlByName( 'view_friends_member_menu_friends_list.html', $aTemplateKeys ); 437 return $sOutputCode; 440 return $oSysTemplate -> parseHtmlByName( 'view_friends_member_menu_friends_list.html', $aTemplateKeys ); 438 441 } 439 442 } -
trunk/inc/classes/BxDolMemberMenu.php
r15287 r15334 106 106 * no alerts 107 107 */ 108 109 bx_import('BxDolTemplate'); 110 108 111 class BxDolMemberMenu 109 112 { … … 152 155 ['item_img_height'] - (integer) module's icon's height; 153 156 */ 154 function getGetExtraMenuLink(&$aLinkInfo) 155 { 156 global $oSysTemplate; 157 function getGetExtraMenuLink(&$aLinkInfo) { 158 $oSysTemplate = BxDolTemplate::getInstance(); 157 159 158 160 $aTemplateKeys = array( … … 184 186 * @return : Html presentation data; 185 187 */ 186 function getDescriptionWindow($sDescription) 187 { 188 global $oSysTemplate; 188 function getDescriptionWindow($sDescription) { 189 $oSysTemplate = BxDolTemplate::getInstance(); 189 190 190 191 $aTemplateKeys = array( … … 221 222 * @return text 222 223 */ 223 function _parseStructure($aMemberInfo, $aMenuStructure) 224 { 225 global $oSysTemplate, $oFunctions; 224 function _parseStructure($aMemberInfo, $aMenuStructure) { 225 global $oFunctions; 226 226 227 227 if(!$aMenuStructure) { … … 229 229 } 230 230 231 $oCache = $this -> getCacheObject(); 231 $oSysTemplate = BxDolTemplate::getInstance(); 232 233 $oCache = $this -> getCacheObject(); 232 234 233 235 $oPermalinks = new BxDolPermalinks(); … … 530 532 * @return string 531 533 */ 532 function getCacheKey($iProfileId) 533 { 534 function getCacheKey($iProfileId) { 534 535 global $site; 535 536 537 $oSysTemplate = BxDolTemplate::getInstance(); 536 538 return $this -> sMenuMemberKeysCache . $iProfileId . '_' . md5($site['ver'] 537 539 . $site['build'] . $site['url'] . getCurrentLangName(false) 538 . $ GLOBALS['oSysTemplate']->getCode()) . '.php';540 . $oSysTemplate->getCode()) . '.php'; 539 541 } 540 542 -
trunk/inc/classes/BxDolPageViewCacher.php
r15211 r15334 137 137 function genBlocksCacheKey ($sId) { 138 138 global $site; 139 return 'pb_' . $sId . '_' . md5($site['ver'] . $site['build'] . $site['url'] . getCurrentLangName(false) . $GLOBALS['oSysTemplate']->getCode()) . '.php'; 139 140 bx_import('BxDolTemplate'); 141 return 'pb_' . $sId . '_' . md5($site['ver'] . $site['build'] . $site['url'] . getCurrentLangName(false) . BxDolTemplate::getInstance()->getCode()) . '.php'; 140 142 } 141 143 } -
trunk/inc/classes/BxDolPrivacySearch.php
r15211 r15334 23 23 ***************************************************************************/ 24 24 25 bx_import('BxDolTemplate'); 25 26 bx_import('BxTemplSearchResultText'); 26 27 … … 48 49 parent::BxTemplSearchResultText(); 49 50 50 global $oSysTemplate;51 52 51 $this->aCurrent['restriction']['owner']['value'] = $iOwnerId; 53 52 $this->aCurrent['restriction']['keyword']['value'] = process_db_input($sValue, BX_TAGS_STRIP); 54 53 55 $this->_sSearchUnitTmpl = $oSysTemplate->getHtml('ps_search_unit.html');54 $this->_sSearchUnitTmpl = BxDolTemplate::getInstance()->getHtml('ps_search_unit.html'); 56 55 } 57 56 58 57 function displaySearchUnit($aData) { 59 global $oSysTemplate; 60 61 return $oSysTemplate->parseHtmlByContent($this->_sSearchUnitTmpl, array( 58 return BxDolTemplate::getInstance()->parseHtmlByContent($this->_sSearchUnitTmpl, array( 62 59 'action' => 'add', 63 60 'member_id' => $aData['id'], -
trunk/inc/classes/BxDolSubscription.php
r15211 r15334 9 9 // TODO: now subscriptions are too complicated, try to simplify it 10 10 11 bx_import('BxDolTemplate'); 11 12 bx_import('BxDolSubscriptionQuery'); 12 13 … … 125 126 $sContent = $oForm->getCode(); 126 127 127 $GLOBALS['oSysTemplate']->addJsTranslation('_sbs_wrn_unsubscribe'); 128 BxDolTemplate::getInstance()->addJsTranslation('_sbs_wrn_unsubscribe'); 129 128 130 ob_start(); 129 131 ?> … … 245 247 $sContent .= PopupBox($this->_sVisitorPopup, _t('_sys_bcpt_subscribe'), $oForm->getCode(), array(), true); 246 248 247 $GLOBALS['oSysTemplate']->addCss('subscription.css'); 248 $GLOBALS['oSysTemplate']->addJs('BxDolSubscription.js'); 249 $oSysTemplate = BxDolTemplate::getInstance(); 250 $oSysTemplate->addCss('subscription.css'); 251 $oSysTemplate->addJs('BxDolSubscription.js'); 249 252 return $sContent; 250 253 } -
trunk/inc/classes/BxDolTextPageMain.php
r15211 r15334 37 37 } 38 38 function getBlockCode_Latest() { 39 bx_import('BxDolTemplate'); 40 39 41 $sUri = $this->_oObject->_oConfig->getUri(); 40 42 $sBaseUri = $this->_oObject->_oConfig->getBaseUri(); 41 43 $aTopMenu = array( 42 'get-rss' => array('href' => BX_DOL_URL_ROOT . $sBaseUri . 'act_rss/', 'target' => '_blank', 'title' => _t('_' . $sUri . '_get_rss'), 'icon' => $GLOBALS['oSysTemplate']->getIconUrl('rss.png')),44 'get-rss' => array('href' => BX_DOL_URL_ROOT . $sBaseUri . 'act_rss/', 'target' => '_blank', 'title' => _t('_' . $sUri . '_get_rss'), 'icon' => BxDolTemplate::getInstance()->getIconUrl('rss.png')), 43 45 ); 44 46 -
trunk/inc/classes/BxDolUserStatusView.php
r15211 r15334 1 1 <?php 2 2 // TODO: reconsider this functionality 3 4 bx_import('BxDolTemplate'); 3 5 4 6 class BxDolUserStatusView … … 106 108 * @return : Html presentation data; 107 109 */ 108 function getStatusField($iMemberId) 109 { 110 global $oSysTemplate; 111 110 function getStatusField($iMemberId) { 112 111 $aMemberInfo = getProfileInfo($iMemberId); 113 112 $sStatusMessage = process_line_output($aMemberInfo['UserStatusMessage']); … … 117 116 ); 118 117 119 return $oSysTemplate-> parseHtmlByName('member_menu_status_text_field.html', $aTemplateKeys);120 }118 return BxDolTemplate::getInstance() -> parseHtmlByName('member_menu_status_text_field.html', $aTemplateKeys); 119 } 121 120 122 121 /** … … 126 125 * @return : Html presentation data; 127 126 */ 128 function getStatusPageLight($iMemberId) 129 { 130 global $oSysTemplate; 131 127 function getStatusPageLight($iMemberId) { 132 128 $aProfileInfo = getProfileInfo($iMemberId); 133 129 $aTemplateKeys = array ( … … 135 131 ); 136 132 137 return $oSysTemplate-> parseHtmlByName( 'user_status_light.html', $aTemplateKeys );133 return BxDolTemplate::getInstance() -> parseHtmlByName( 'user_status_light.html', $aTemplateKeys ); 138 134 } 139 135 } -
trunk/inc/languages.inc.php
r15286 r15334 155 155 ); 156 156 157 $sOutputCode .= $GLOBALS['oSysTemplate']->parseHtmlByName( 'member_menu_sub_item.html', $aTemplateKeys ); 157 bx_import('BxDolTemplate'); 158 $sOutputCode .= BxDolTemplate::getInstance()->parseHtmlByName( 'member_menu_sub_item.html', $aTemplateKeys ); 158 159 } 159 160 -
trunk/inc/params.inc.php
r15332 r15334 13 13 } 14 14 15 bx_import('BxDolTemplate');16 $oSysTemplate = BxDolTemplate::getInstance();17 18 15 if (defined('BX_PROFILER') && BX_PROFILER) require_once(BX_DIRECTORY_PATH_MODULES . 'boonex/profiler/classes/BxProfiler.php'); 19 16 -
trunk/mail.php
r15329 r15334 169 169 170 170 //add some translation 171 $GLOBALS['oSysTemplate']->addJsTranslation('_Mailbox title empty'); 172 $GLOBALS['oSysTemplate']->addJsTranslation('_Mailbox recipient empty'); 173 $GLOBALS['oSysTemplate']->addJsTranslation('_Mailbox description empty'); 171 bx_import('BxDolTemplate'); 172 $oSysTemplate = BxDolTemplate::getInstance(); 173 $oSysTemplate->addJsTranslation('_Mailbox title empty'); 174 $oSysTemplate->addJsTranslation('_Mailbox recipient empty'); 175 $oSysTemplate->addJsTranslation('_Mailbox description empty'); 174 176 break; 175 177 -
trunk/member_privacy.php
r15260 r15334 65 65 } 66 66 67 $sCode = $GLOBALS['oSysTemplate']->parseHtmlByName('ps_page_menu.html', array('bx_repeat:items' => $aItems)); 67 bx_import('BxDolTemplate'); 68 $sCode = BxDolTemplate::getInstance()->parseHtmlByName('ps_page_menu.html', array('bx_repeat:items' => $aItems)); 68 69 $sCode = PopupBox('dbPrivacyMenu' . $iBlockId, _t('_ps_bcpt_block_privacy'), $sCode); 69 70 } -
trunk/search.php
r15260 r15334 186 186 187 187 $sOutputHtml .= '<div class="clear_both"></div>'; 188 $sContent = $sSortElement . $GLOBALS['oSysTemplate']->parseHtmlByName('view_profiles.html', array('content' => $sOutputHtml)) . $oPaginate->getPaginate(); 188 189 bx_import('BxDolTemplate'); 190 $sContent = $sSortElement . BxDolTemplate::getInstance()->parseHtmlByName('view_profiles.html', array('content' => $sOutputHtml)) . $oPaginate->getPaginate(); 189 191 $aItems = array( 190 192 _t('_Simple') => array( -
trunk/tags.php
r15260 r15334 35 35 require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); 36 36 37 bx_import('BxDolTemplate'); 37 38 bx_import('BxTemplTags'); 38 39 bx_import('BxDolPageView'); … … 86 87 87 88 function display() { 89 $oSysTemplate = BxDolTemplate::getInstance(); 90 88 91 $aVars = array ( 89 92 'bx_repeat:week_names' => $this->_getWeekNames (), … … 97 100 'month_current' => $this->getTitle(), 98 101 ); 99 $sHtml = $ GLOBALS['oSysTemplate']->parseHtmlByName('calendar.html', $aVars);102 $sHtml = $oSysTemplate->parseHtmlByName('calendar.html', $aVars); 100 103 $sHtml = preg_replace ('#<bx_repeat:events>.*?</bx_repeat:events>#s', '', $sHtml); 101 $ GLOBALS['oSysTemplate']->addCss('calendar.css');104 $oSysTemplate->addCss('calendar.css'); 102 105 return $sHtml; 103 106 } … … 309 312 function getBlockCode_Form() 310 313 { 311 return $GLOBALS['oSysTemplate']->parseHtmlByName('search_tags_box.html', array('form' => $this->oForm->getCode()));314 return BxDolTemplate::getInstance()->parseHtmlByName('search_tags_box.html', array('form' => $this->oForm->getCode())); 312 315 } 313 316 -
trunk/templates/base/scripts/BxBaseBrowse.php
r15211 r15334 21 21 ***************************************************************************/ 22 22 23 bx_import('BxDolTemplate'); 23 24 bx_import('BxDolBrowse'); 24 25 bx_import('BxDolPaginate'); … … 263 264 ); 264 265 265 $sSexSection = $GLOBALS['oSysTemplate']-> parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys );266 $sSexSection = BxDolTemplate::getInstance() -> parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys ); 266 267 267 268 // return builded template ; … … 355 356 ); 356 357 357 $sAgeSection = $GLOBALS['oSysTemplate']-> parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys );358 $sAgeSection = BxDolTemplate::getInstance() -> parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys ); 358 359 359 360 // return builded template ; … … 450 451 ); 451 452 452 $sCountrySection = $GLOBALS['oSysTemplate']-> parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys );453 $sCountrySection = BxDolTemplate::getInstance() -> parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys ); 453 454 454 455 // return builded template ; … … 869 870 870 871 // build template ; 871 $sOutputHtml = $GLOBALS['oSysTemplate']-> parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys );872 $sOutputHtml = BxDolTemplate::getInstance() -> parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys ); 872 873 873 874 // generate toggle ellements ; -
trunk/templates/base/scripts/BxBaseCategories.php
r15211 r15334 7 7 defined('BX_DOL') or die('hack attempt'); 8 8 9 bx_import('BxDolTemplate'); 9 10 bx_import('BxDolCategories'); 10 11 … … 22 23 } 23 24 24 function getCategoriesView ($aTotalCategories, $sHrefTempl, $iColumns) 25 { 26 global $oSysTemplate; 25 function getCategoriesView ($aTotalCategories, $sHrefTempl, $iColumns) { 26 $oSysTemplate = BxDolTemplate::getInstance(); 27 27 28 28 if (empty($aTotalCategories)) … … 181 181 } 182 182 183 function _getTopBox($aParam, $iBoxId, $sPageUrl) 184 { 185 global $oSysTemplate; 183 function _getTopBox($aParam, $iBoxId, $sPageUrl) { 186 184 $sCode = ''; 187 185 … … 196 194 $sTopCode .= '<option value="' . $sKey . '" ' . ($sKey == $aParam['orderby'] ? 'selected' : '') . '>' . $sVal . '</option>'; 197 195 $sTopCode .= '</select>'; 198 $sCode = $oSysTemplate->parseHtmlByName('top_block.html', array('code' => $sTopCode));196 $sCode = BxDolTemplate::getInstance()->parseHtmlByName('top_block.html', array('code' => $sTopCode)); 199 197 200 198 return $sCode; -
trunk/templates/base/scripts/BxBaseCommunicator.php
r15211 r15334 63 63 * 64 64 */ 65 function getBlockCode_CommunicatorPage() 66 { 67 global $oSysTemplate; 68 65 function getBlockCode_CommunicatorPage() { 69 66 // set default mode ; 70 67 if ( !$this -> aCommunicatorSettings['communicator_mode'] ) … … 104 101 * @return : Html presentation data ; 105 102 */ 106 function getProcessingRows() 107 { 108 global $oSysTemplate, $site, $oFunctions ; 103 function getProcessingRows() { 104 global $site, $oFunctions ; 105 106 $oSysTemplate = BxDolTemplate::getInstance(); 109 107 110 108 // ** init some needed variables ; -
trunk/templates/base/scripts/BxBaseFunctions.php
r15332 r15334 108 108 ); 109 109 110 $sOutputHtml .= $GLOBALS['oSysTemplate'] -> parseHtmlByName( $aUsedTemplate['action'], $aTemplateKeys ); 110 bx_import('BxDolTemplate'); 111 $sOutputHtml .= BxDolTemplate::getInstance() -> parseHtmlByName( $aUsedTemplate['action'], $aTemplateKeys ); 111 112 } 112 113 } … … 160 161 $iId = mktime() . mt_rand(1, 1000); 161 162 162 return $GLOBALS['oSysTemplate']->parseHtmlByName('messageBox.html', array( 163 bx_import('BxDolTemplate'); 164 return BxDolTemplate::getInstance()->parseHtmlByName('messageBox.html', array( 163 165 'id' => $iId, 164 166 'msgText' => $sText, … … 175 177 176 178 function loadingBox($sName) { 177 return $GLOBALS['oSysTemplate']->parseHtmlByName('loading.html', array( 179 bx_import('BxDolTemplate'); 180 return BxDolTemplate::getInstance()->parseHtmlByName('loading.html', array( 178 181 'name' => $sName, 179 182 )); … … 218 221 ); 219 222 220 return $GLOBALS['oSysTemplate']->parseHtmlByName('popup_box.html', array( 223 bx_import('BxDolTemplate'); 224 return BxDolTemplate::getInstance()->parseHtmlByName('popup_box.html', array( 221 225 'id' => $iId, 222 226 'wrapper_style' => $isHiddenByDefault ? 'display:none;' : '', … … 228 232 229 233 function transBox($content, $isPlaceInCenter = false) { 234 bx_import('BxDolTemplate'); 230 235 return 231 236 ($isPlaceInCenter ? '<div class="login_ajax_wrap">' : '') . 232 $GLOBALS['oSysTemplate']->parseHtmlByName('transBox.html', array('content' => $content)) .237 BxDolTemplate::getInstance()->parseHtmlByName('transBox.html', array('content' => $content)) . 233 238 ($isPlaceInCenter ? '</div>' : ''); 234 239 } … … 346 351 } 347 352 348 return $GLOBALS['oSysTemplate']->parseHtmlByName($bCouple ? "thumbnail_couple.html" : "thumbnail_single.html", $aVariables); 353 bx_import('BxDolTemplate'); 354 return BxDolTemplate::getInstance()->parseHtmlByName($bCouple ? "thumbnail_couple.html" : "thumbnail_single.html", $aVariables); 349 355 } 350 356 … … 364 370 365 371 function getTemplateIcon($sName) { 366 $sUrl = $GLOBALS['oSysTemplate']->getIconUrl($sName); 367 return !empty($sUrl) ? $sUrl : $GLOBALS['oSysTemplate']->getIconUrl('spacer.gif'); 372 bx_import('BxDolTemplate'); 373 $oSysTemplate = BxDolTemplate::getInstance(); 374 375 $sUrl = $oSysTemplate->getIconUrl($sName); 376 return !empty($sUrl) ? $sUrl : $oSysTemplate->getIconUrl('spacer.gif'); 368 377 } 369 378 370 379 function getTemplateImage($sName) { 371 $sUrl = $GLOBALS['oSysTemplate']->getImageUrl($sName); 372 return !empty($sUrl) ? $sUrl : $GLOBALS['oSysTemplate']->getImageUrl('spacer.gif'); 380 bx_import('BxDolTemplate'); 381 $oSysTemplate = BxDolTemplate::getInstance(); 382 383 $sUrl = $oSysTemplate->getImageUrl($sName); 384 return !empty($sUrl) ? $sUrl : $oSysTemplate->getImageUrl('spacer.gif'); 373 385 } 374 386 … … 381 393 */ 382 394 function genObjectsActions( &$aKeys, $sActionsType, $bSubMenuMode = false ) { 383 395 bx_import('BxDolTemplate'); 396 $oSysTemplate = BxDolTemplate::getInstance(); 397 384 398 // ** init some needed variables ; 385 399 $sActionsList = null; … … 481 495 // is there any value to having this template even if the ID is empty? 482 496 if ( !$this -> iDhtmlPopupMenu && !empty($aKeys['ID'])) { 483 $sResponceBlock = $ GLOBALS['oSysTemplate']-> parseHtmlByName( $aUsedTemplate['ajaxy_popup'], array('object_id' => $aKeys['ID']) );497 $sResponceBlock = $oSysTemplate -> parseHtmlByName( $aUsedTemplate['ajaxy_popup'], array('object_id' => $aKeys['ID']) ); 484 498 } 485 499 … … 489 503 ); 490 504 491 $sActionsList = $ GLOBALS['oSysTemplate']-> parseHtmlByName( $aUsedTemplate['actions'], $aTemplateKeys );505 $sActionsList = $oSysTemplate -> parseHtmlByName( $aUsedTemplate['actions'], $aTemplateKeys ); 492 506 } 493 507 … … 567 581 ); 568 582 569 $sOutputHtml = $GLOBALS['oSysTemplate'] -> parseHtmlByName( 'menu_bottom.html', $aTemplateKeys ); 583 bx_import('BxDolTemplate'); 584 $sOutputHtml = BxDolTemplate::getInstance() -> parseHtmlByName( 'menu_bottom.html', $aTemplateKeys ); 570 585 571 586 if (isset($GLOBALS['bx_profiler'])) $GLOBALS['bx_profiler']->endMenu('Bottom Menu'); -
trunk/templates/base/scripts/BxBaseIndexPageView.php
r15211 r15334 7 7 defined('BX_DOL') or die('hack attempt'); 8 8 9 bx_import ('BxDolPageView'); 9 bx_import('BxDolTemplate'); 10 bx_import('BxDolPageView'); 10 11 11 12 class BxBaseIndexPageView extends BxDolPageView { … … 25 26 $aButton = $oSubscription->getButton(0, 'system', 'mass_mailer'); 26 27 27 return $oSubscription->getData() . $GLOBALS['oSysTemplate']->parseHtmlByName('home_page_subscribe.html', array(28 return $oSubscription->getData() . BxDolTemplate::getInstance()->parseHtmlByName('home_page_subscribe.html', array( 28 29 'message' => _t('_SUBSCRIBE_TEXT', $site['title']), 29 30 'button_title' => $aButton['title'], … … 226 227 227 228 function getBlockCode_Download() { 229 $oSysTemplate = BxDolTemplate::getInstance(); 230 228 231 $a = BxDolDb::getInstance()->fromCache('sys_box_download', 'getAll', 'SELECT * FROM `sys_box_download` WHERE `disabled` = 0 ORDER BY `order`'); 229 232 $s = ''; … … 240 243 continue; 241 244 242 $r['icon'] = $ GLOBALS['oSysTemplate']->getIconUrl($r['icon']);243 $s .= $ GLOBALS['oSysTemplate']->parseHtmlByName('download_box_unit.html', $r);245 $r['icon'] = $oSysTemplate->getIconUrl($r['icon']); 246 $s .= $oSysTemplate->parseHtmlByName('download_box_unit.html', $r); 244 247 } 245 248 -
trunk/templates/base/scripts/BxBaseMailBox.php
r15332 r15334 21 21 ***************************************************************************/ 22 22 23 bx_import('BxDolTemplate'); 23 24 bx_import('BxDolMailBox'); 24 25 bx_import('BxDolSubscription'); … … 211 212 * @return : Html presentation data ; 212 213 */ 213 function getBlockCode_Archives() 214 { 215 global $oSysTemplate; 214 function getBlockCode_Archives() { 215 $oSysTemplate = BxDolTemplate::getInstance(); 216 216 217 217 // init some needed variables; … … 309 309 * @return : Html presentation data ; 310 310 */ 311 function getBlockCode_ViewMessage() 312 { 313 global $oSysTemplate; 311 function getBlockCode_ViewMessage() { 314 312 global $oFunctions; 315 313 global $site; 314 315 $oSysTemplate = BxDolTemplate::getInstance(); 316 316 317 317 bx_import('BxTemplConfig'); … … 671 671 * @return : Html presentation data ; 672 672 */ 673 function getBlockCode_MailBox() 674 { 675 global $oSysTemplate; 673 function getBlockCode_MailBox() { 674 $oSysTemplate = BxDolTemplate::getInstance(); 676 675 677 676 // init some nedded variables ; … … 722 721 * @return : html presentation data ; 723 722 */ 724 function getBlockCode_Contacts() 725 { 726 global $oSysTemplate, 727 $oFunctions, 728 $site; 723 function getBlockCode_Contacts() { 724 global $oFunctions, $site; 725 726 $oSysTemplate = BxDolTemplate::getInstance(); 729 727 730 728 // init some needed variables; … … 899 897 * @return : Html presentation data; 900 898 */ 901 function genArchiveMessages() 902 { 903 global $oSysTemplate, 904 $oFunctions, 905 $site; 899 function genArchiveMessages() { 900 global $oFunctions, $site; 901 902 $oSysTemplate = BxDolTemplate::getInstance(); 906 903 907 904 // ** INTERNAL FUNCTIONS ; … … 914 911 * @return : Html presentation data; 915 912 */ 916 function _genPaginationItem( $sItemType, $oObject ) 917 { 918 global $oSysTemplate; 913 function _genPaginationItem( $sItemType, $oObject ) { 914 $oSysTemplate = BxDolTemplate::getInstance(); 919 915 920 916 // init some needed variables ; … … 1080 1076 * @return : Html presentation data ; 1081 1077 */ 1082 function genMessagesRows() 1083 { 1084 global $oSysTemplate; 1078 function genMessagesRows() { 1085 1079 global $oFunctions; 1086 1080 global $site; 1081 1082 $oSysTemplate = BxDolTemplate::getInstance(); 1087 1083 1088 1084 // init some needed variables ; … … 1493 1489 * @return : Html presentation data; 1494 1490 */ 1495 function genReplayMessage($iRecipientID, $iMessageID = 0) 1496 { 1497 global $oSysTemplate; 1491 function genReplayMessage($iRecipientID, $iMessageID = 0) { 1492 $oSysTemplate = BxDolTemplate::getInstance(); 1498 1493 1499 1494 $iMessageID = (int) $iMessageID; … … 1664 1659 [message] - (string) text message ( if will have a new messages ); 1665 1660 */ 1666 function get_member_menu_bubble_new_messages($iMemberId, $iOldCount = 0) 1667 { 1668 global $oSysTemplate, $oFunctions, $site; 1661 function get_member_menu_bubble_new_messages($iMemberId, $iOldCount = 0) { 1662 global $oFunctions, $site; 1663 1664 $oSysTemplate = BxDolTemplate::getInstance(); 1669 1665 1670 1666 $iMemberId = (int) $iMemberId; … … 1741 1737 * @return : Html presentation data ; 1742 1738 */ 1743 function get_member_menu_messages_list( $iMemberId = 0 ) 1744 { 1745 global $oSysTemplate, $oFunctions; 1739 function get_member_menu_messages_list( $iMemberId = 0 ) { 1740 global $oFunctions; 1741 1742 $oSysTemplate = BxDolTemplate::getInstance(); 1746 1743 1747 1744 $iMemberId = (int) $iMemberId; -
trunk/templates/base/scripts/BxBaseMenu.php
r15211 r15334 150 150 ); 151 151 152 $sRet = $GLOBALS['oSysTemplate']->parseHtmlByName ('breadcrumbs.html', $aVars); 152 bx_import('BxDolTemplate'); 153 $sRet = BxDolTemplate::getInstance()->parseHtmlByName ('breadcrumbs.html', $aVars); 153 154 154 155 if (isset($GLOBALS['bx_profiler'])) $GLOBALS['bx_profiler']->endMenu('Breadcrumbs'); … … 189 190 $aVars['bx_repeat:menu'] = $aMenuReady; 190 191 191 return $GLOBALS['oSysTemplate']->parseHtmlByName ($sTemplateName, $aVars); 192 bx_import('BxDolTemplate'); 193 return BxDolTemplate::getInstance()->parseHtmlByName ($sTemplateName, $aVars); 192 194 } 193 195 -
trunk/templates/base/scripts/BxBaseProfileView.php
r15332 r15334 85 85 86 86 function getBlockCode_Description() { 87 global $oSysTemplate;88 89 87 $aProfileInfo = getProfileInfo($this -> oProfileGen -> _iProfileID); 90 88 if(!$aProfileInfo['DescriptionMe']) { … … 96 94 ); 97 95 98 return $oSysTemplate -> parseHtmlByName('default_padding.html', $aTemplateKeys); 96 bx_import('BxDolTemplate'); 97 return BxDolTemplate::getInstance() -> parseHtmlByName('default_padding.html', $aTemplateKeys); 99 98 } 100 99 101 100 function _getBlockCaptionCode($iBlockID, $aBlock, $aBlockCode, $bStatic = true, $sDynamicType = 'tab') { 101 bx_import('BxDolTemplate'); 102 102 103 //--- Privacy for Profile page ---// 103 104 $sCode = ""; 104 105 if($this->iMemberID == $this->oProfileGen->_iProfileID) { 105 106 $sAlt = ""; 106 $sCode = $GLOBALS['oSysTemplate']->parseHtmlByName('ps_page_chooser.html', array(107 $sCode = BxDolTemplate::getInstance()->parseHtmlByName('ps_page_chooser.html', array( 107 108 'alt' => $sAlt, 108 109 'page_name' => $this->sPageName, -
trunk/templates/base/scripts/BxBaseSearchResultSharedMedia.php
r15211 r15334 23 23 ***************************************************************************/ 24 24 25 bx_import('BxDolTemplate'); 25 26 bx_import('BxBaseSearchResult'); 26 27 bx_import('BxDolAlbums'); … … 132 133 $this->sModuleClass = $sModuleClass; 133 134 $this->oModule = BxDolModule::getInstance($this->sModuleClass); 134 $this->oTemplate = $GLOBALS['oSysTemplate'];135 $this->oTemplate = BxDolTemplate::getInstance(); 135 136 136 137 $sClassName = $this->oModule->_oConfig->getClassPrefix() . 'Privacy'; -
trunk/templates/base/scripts/BxBaseTags.php
r15332 r15334 7 7 defined('BX_DOL') or die('hack attempt'); 8 8 9 bx_import('BxDolTemplate'); 9 10 bx_import('BxDolTags'); 10 11 … … 22 23 23 24 function getTagsView ($aTotalTags, $sHrefTempl) { 24 global $oSysTemplate;25 $oSysTemplate = BxDolTemplate::getInstance(); 25 26 26 27 if (empty($aTotalTags)) … … 103 104 } 104 105 105 function getTagsInternalMenuHtml ($aParam, $iBoxId, $sAction = '') 106 { 107 global $oSysTemplate; 108 $sCode = ''; 106 function getTagsInternalMenuHtml ($aParam, $iBoxId, $sAction = '') { 109 107 $sMenu = ''; 110 108 … … 112 110 $aMenu = $this->getTagsTopMenu($aParam, $sAction); 113 111 114 foreach ($aMenu as $sName => $aItem) 115 { 112 foreach ($aMenu as $sName => $aItem) { 116 113 $sMenu .= '<option value="' . $aItem['href'] . '" '. 117 114 ($aItem['key'] == $aParam['type'] ? 'selected' : '') .'>' . … … 121 118 $sMenu .= '</select>'; 122 119 123 $sCode = $oSysTemplate->parseHtmlByName('top_block.html', array('code' => $sMenu)); 124 125 return $sCode; 120 return BxDolTemplate::getInstance()->parseHtmlByName('top_block.html', array('code' => $sMenu)); 126 121 } 127 122 -
trunk/templates/tmpl_uni/scripts/BxTemplConfig.php
r15211 r15334 9 9 bx_import('BxBaseConfig'); 10 10 11 bx_import('BxDolTemplate'); 12 $oSysTemplate = BxDolTemplate::getInstance(); 13 11 14 // path to the images used in the template 12 $site['images'] = $site['url'] . "templates/tmpl_{$GLOBALS['tmpl']}/images/"; 15 global $site; 16 $site['images'] = $site['url'] . "templates/tmpl_" . $oSysTemplate->getCode() . "/images/"; 13 17 $site['zodiac'] = $site['images'] . "zodiac/"; 14 18 $site['icons'] = $site['images'] . "icons/"; 15 $site['css_dir']= "templates/tmpl_ {$GLOBALS['tmpl']}/css/";19 $site['css_dir']= "templates/tmpl_" . $oSysTemplate->getCode() . "/css/"; 16 20 17 21 class BxTemplConfig extends BxBaseConfig { … … 20 24 } 21 25 } 22
Note: See TracChangeset
for help on using the changeset viewer.