Changeset 15525 for trunk/templates
- Timestamp:
- 09/25/11 22:53:43 (8 months ago)
- Location:
- trunk/templates/base/scripts
- Files:
-
- 2 edited
-
BxBaseFunctions.php (modified) (1 diff)
-
BxBaseMenu.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/templates/base/scripts/BxBaseFunctions.php
r15335 r15525 647 647 )); 648 648 } 649 650 /** 651 * Function will generate list of installed languages list; 652 * 653 * @return : Html presentation data; 654 */ 655 function getLangSwitcher() { 656 bx_import('BxDolLanguagesQuery'); 657 $aLangs = BxDolLanguagesQuery::getInstance()->getLanguages(); 658 if(count($aLangs) < 2) 659 return ''; 660 661 bx_import('BxDolTemplate'); 662 $oTemplate = BxDolTemplate::getInstance(); 663 664 $sOutputCode = ''; 665 foreach( $aLangs as $sName => $sLang ) { 666 $sFlag = $oTemplate->getIconUrl('sys_fl_' . $sName . '.gif'); 667 $aTemplateKeys = array ( 668 'bx_if:item_img' => array ( 669 'condition' => ( $sFlag ), 670 'content' => array ( 671 'item_img_src' => $sFlag, 672 'item_img_alt' => $sName, 673 'item_img_width' => 18, 674 'item_img_height' => 12, 675 ), 676 ), 677 'item_link' => BX_DOL_URL_ROOT . 'index.php?lang=' . $sName, 678 'item_onclick' => null, 679 'item_title' => $sLang, 680 'extra_info' => null, 681 ); 682 683 $sOutputCode .= $oTemplate->parseHtmlByName( 'member_menu_sub_item.html', $aTemplateKeys ); 684 } 685 686 return $sOutputCode; 687 } 649 688 } 650 -
trunk/templates/base/scripts/BxBaseMenu.php
r15334 r15525 306 306 */ 307 307 function genMoreLanguagesElement(){ 308 $aExistedLanguages = getLangsArr(); 309 if(count($aExistedLanguages) <= 1) return; 308 bx_import('BxDolLanguagesQuery'); 309 $aExistedLanguages = BxDolLanguagesQuery::getInstance()->getLanguages(); 310 if(count($aExistedLanguages) <= 1) 311 return; 310 312 311 313 $sCurLanguage = strlen($_GET['lang']) ? $_GET['lang'] : $_COOKIE['lang'];
Note: See TracChangeset
for help on using the changeset viewer.