19 $this -> aSpecialKeys = array(
'rate' =>
'',
'rate_cnt' =>
'');
48 'url' => CH_WSB_URL_ROOT,
50 'member_id' => $iViewerId,
54 'cpt_edit',
'cpt_send_letter',
'cpt_fave',
'cpt_befriend',
'cpt_remove_friend',
'cpt_get_mail',
'cpt_share',
55 'cpt_report',
'cpt_block',
'cpt_unblock',
57 'cpt_activate',
'cpt_ban',
'cpt_delete',
'cpt_delete_spam',
'cpt_feature',
'act_activate',
'act_ban',
'act_feature'
60 $aMain = array_fill_keys($aMainKeys,
'');
64 $aMain[
'cpt_edit'] =
_t(
'_EditProfile');
65 $aMain[
'cpt_send_letter'] =
_t(
'_SendLetter');
66 $aMain[
'cpt_fave'] =
_t(
'_Fave');
67 $aMain[
'cpt_remove_fave'] =
_t(
'_Remove Fave');
68 $aMain[
'cpt_befriend'] =
_t(
'_Befriend');
69 $aMain[
'cpt_remove_friend'] =
_t(
'_Remove friend');
70 $aMain[
'cpt_get_mail'] =
_t(
'_Get E-mail');
71 $aMain[
'cpt_share'] = $this->
isAllowedShare($this->_aProfile) ?
_t(
'_Share') :
'';
72 $aMain[
'cpt_report'] =
_t(
'_Report Spam');
73 $aMain[
'cpt_block'] =
_t(
'_Block');
74 $aMain[
'cpt_unblock'] =
_t(
'_Unblock');
79 $sMsgKeyStart =
'_adm_btn_mp_';
82 $aMain[
'cpt_delete'] =
_t($sMsgKeyStart .
'delete');
85 $aMain[
'cpt_delete_spam'] =
_t($sMsgKeyStart .
'delete_spammer');
88 $sTypeActiv =
'activate';
91 $sTypeActiv =
'de' . $sTypeActiv;
93 $aMain[
'cpt_activate'] =
_t($sMsgKeyStart . $sTypeActiv);
94 $aMain[
'act_activate'] = $sTypeActiv;
100 $sTypeBan =
'un' . $sTypeBan;
102 $aMain[
'cpt_ban'] =
_t($sMsgKeyStart . $sTypeBan);
103 $aMain[
'act_ban'] = $sTypeBan;
106 $sTypeFeat =
'featured';
107 $aMain[
'cpt_feature'] =
_t(
'_Feature it');
110 $sTypeFeat =
'un' . $sTypeFeat;
111 $aMain[
'cpt_feature'] =
_t(
'_De-Feature it');
113 $aMain[
'act_feature'] = $sTypeFeat;
121 $aMain[
'sbs_profile_title'] = $aButton[
'title'];
122 $aMain[
'sbs_profile_script'] = $aButton[
'script'];
151 function genActionLink( &$aObjectParamaters, $aRow, $sCssClass =
null, $sTemplateIndexActionLink =
'action')
156 $aUsedTemplate = array (
157 'action' =>
'action_link.html',
158 'action_symbol' =>
'action_link_symbol.html',
159 'action_submenu' =>
'action_link_submenu.html',
160 'action_submenu_symbol' =>
'action_link_submenu_symbol.html',
164 foreach( $aRow AS $sKeyName => $sKeyValue ) {
165 if ( $sKeyName ==
'Caption' ) {
166 $aRow[$sKeyName] = $this ->
markerReplace($aObjectParamaters, $sKeyValue, $aRow[
'Eval'],
true);
168 $aRow[$sKeyName] = $this ->
markerReplace($aObjectParamaters, $sKeyValue, $aRow[
'Eval']);
172 $sKeyValue = trim($sKeyValue,
'{}');
174 if ( array_key_exists($sKeyValue, $this -> aSpecialKeys) ) {
175 return $aRow[
'Eval'];
177 $sSiteUrl = (preg_match(
"/^(http|https|ftp|mailto)/", $aRow[
'Url'])) ?
'' : CH_WSB_URL_ROOT;
181 $sScriptAction = ( $aRow[
'Script'] ) ?
' onclick="' . $aRow[
'Script'] .
'"' :
'';
182 $sScriptAction = ($sScriptAction==
'' && $aRow[
'Url']!=
'') ?
" onclick=\"window.open ('{$sSiteUrl}{$aRow['Url']}','_self');\" " : $sScriptAction;
184 if (
false === strpos($aRow[
'Icon'],
'.')) {
185 $sIcon = $aRow[
'Icon'];
186 $sTmpl = $sTemplateIndexActionLink .
'_symbol';
189 $sTmpl = $sTemplateIndexActionLink;
192 if ( $aRow[
'Caption']
and ($aRow[
'Url']
or $aRow[
'Script'] ) ) {
194 $sCssClass = ( $sCssClass ) ?
'class="' . $sCssClass .
'"' :
null;
196 $aTemplateKeys = array (
197 'action_img_alt' => $aRow[
'Caption'],
198 'action_img_src' => $sIcon,
199 'action_caption' => $aRow[
'Caption'],
201 'extended_css' => $sCssClass,
202 'extended_action' => $sScriptAction,
205 $sOutputHtml .=
$GLOBALS[
'oSysTemplate'] -> parseHtmlByName( $aUsedTemplate[$sTmpl], $aTemplateKeys );
220 function markerReplace( &$aMemberSettings, $sTransformText, $sExecuteCode =
null, $bTranslate =
false )
223 preg_match_all(
"/([a-z0-9\-\_ ]{1,})|({([^\}]+)\})/i", $sTransformText, $aMatches );
224 if ( is_array($aMatches)
and !
empty($aMatches) ) {
226 foreach( $aMatches[3]
as $iMarker => $sMarkerValue ) {
227 if( is_array($aMemberSettings)
and array_key_exists($sMarkerValue, $aMemberSettings)
and !array_key_exists($sMarkerValue, $this -> aSpecialKeys) ){
228 $sTransformText = str_replace(
'{' . $sMarkerValue .
'}', $aMemberSettings[$sMarkerValue], $sTransformText);
230 else if(($sMarkerValue ==
'evalResult' || substr($sMarkerValue, 0, 10) ==
'evalResult')) {
231 $sExecuteResult =
'';
232 if(!
empty($sExecuteCode)) {
233 $sExecuteCode = $this ->
markerReplace($aMemberSettings, $sExecuteCode);
234 $sExecuteResult = eval($sExecuteCode);
240 if(is_array($sExecuteResult))
241 $sExecuteResult = isset($sExecuteResult[$sMarkerValue]) ? $sExecuteResult[$sMarkerValue] :
'';
242 else if($sMarkerValue !=
'evalResult')
243 $sExecuteResult =
'';
246 $sTransformText = str_replace(
'{' . $sMarkerValue .
'}', $sExecuteResult, $sTransformText);
249 if ( array_key_exists($sMarkerValue, $this -> aSpecialKeys) ) {
250 return $aMemberSettings[$sMarkerValue];
253 switch ($sMarkerValue) {
261 foreach( $aMatches[1]
as $iMarker => $sMarkerValue )
263 $sTransformText = str_replace( $sMarkerValue ,
_t( trim($sMarkerValue) ), $sTransformText);
267 return $sTransformText;
270 function msgBox($sText, $iTimer = 0, $sOnTimer =
"")
274 return $GLOBALS[
'oSysTemplate']->parseHtmlByName(
'messageBox.html', array(
277 'ch_if:timer' => array(
278 'condition' => $iTimer > 0,
281 'time' => 1000 * $iTimer,
314 $iId = str_replace(
'.',
'',
'AMB-' . microtime(
true));
316 $iTimer = (int)$aOptions[
'timer'];
317 $sOnTimer = $aOptions[
'onTimer'];
318 $bShowCloseBtn = ($aOptions[
'showclosebtn'] ==
'' ?
false : $aOptions[
'showclosebtn']);
319 $bShowTitle = ($aOptions[
'showtitle'] ==
'' ?
false : $aOptions[
'showtitle']);
320 $bShowTitleClose = ($aOptions[
'showtitleclose'] ==
'' ?
false : $aOptions[
'showtitleclose']);
321 $bShowIcon = ($aOptions[
'showicon'] ==
'' ?
false : $aOptions[
'showicon']);
322 $sIcon = ($aOptions[
'icon'] ==
'' ?
'info-circle' : $aOptions[
'icon']);
323 $sIconClass = ($aOptions[
'iconclass'] ==
'' ?
'sys-icon icon-large' : $aOptions[
'iconclass']);
324 $sTitleText = $aOptions[
'titletext'];
325 $sTitleClass = ($aOptions[
'titleclass'] ==
'' ?
'MsgBoxTitle' : $aOptions[
'titleclass']);
326 $bRemoveFog = ($aOptions[
'removefog'] ==
'' ?
false : $aOptions[
'removefog']);
327 $sClass = ($aOptions[
'class'] ==
'' ?
'msgbox_content ch-def-font-large' : $aOptions[
'class']);
328 $sButtonClass = ($aOptions[
'buttonclass'] ==
'' ?
'ch-btn' : $aOptions[
'buttonclass']);
330 $sRemoveFog = ($bRemoveFog ?
"$('#ch-popup-fog').remove(); " :
'');
332 return $GLOBALS[
'oSysTemplate']->parseHtmlByName(
'advMessageBox.html', array(
335 'extracss' => $sExtraCss,
338 'ch_if:timer' => array(
339 'condition' => $iTimer > 0,
342 'remove_fog' => $sRemoveFog,
343 'time' => 1000 * $iTimer,
347 'ch_if:closebtn' => array(
348 'condition' => $bShowCloseBtn,
351 'button_class' => $sButtonClass,
352 'btn_text' =>
_t(
'_Close'),
353 'remove_fog' => $sRemoveFog,
356 'ch_if:showtitle' => array(
357 'condition' => $bShowTitle,
359 'title' => $sTitleText,
360 'titleclass' => $sTitleClass,
363 'ch_if:showtitleclose' => array(
364 'condition' => $bShowTitleClose,
367 'remove_fog' => $sRemoveFog,
370 'ch_if:showicon' => array(
371 'condition' => $bShowIcon,
374 'iconclass' => $sIconClass,
394 return $GLOBALS[
'oSysTemplate']->parseHtmlByName(
'loading.html', array(
395 'class' => !
empty($sClass) ?
' ' . $sClass :
'',
396 'ch_if:show_name' => array(
425 foreach($aActions
as $sId => $aAction)
429 'class' => isset($aAction[
'class']) ?
' class="' . $aAction[
'class'] .
'"' :
'',
430 'icon' => isset($aAction[
'icon']) ?
'<img src="' . $aAction[
'icon'] .
'" />' :
'',
431 'href' => isset($aAction[
'href']) ?
' href="' .
htmlspecialchars_adv($aAction[
'href']) .
'"' :
'',
432 'target' => isset($aAction[
'target']) ?
' target="' . $aAction[
'target'] .
'"' :
'',
433 'on_click' => isset($aAction[
'onclick']) ?
' onclick="' . $aAction[
'onclick'] .
'"' :
'',
434 'ch_if:hide_active' => array(
435 'condition' => !isset($aAction[
'active']) || $aAction[
'active'] != 1,
438 'ch_if:hide_inactive' => array(
439 'condition' => isset($aAction[
'active']) && $aAction[
'active'] == 1,
444 return $GLOBALS[
'oSysTemplate']->parseHtmlByName(
'popup_box.html', array(
447 'ch_repeat:actions' => $aButtons,
452 function transBox($content, $isPlaceInCenter =
false)
455 ($isPlaceInCenter ?
'<div class="login_ajax_wrap">' :
'') .
456 $GLOBALS[
'oSysTemplate']->parseHtmlByName(
'transBox.html', array(
'content' => $content)) .
457 ($isPlaceInCenter ?
'</div>' :
'');
482 'female' =>
'woman_',
483 'Female' =>
'woman_',
492 $sThumbSetting =
getParam(
$sType ==
'small' ?
'sys_member_info_thumb_icon' :
'sys_member_info_thumb');
501 function getMemberThumbnail(
$iId, $sFloat =
'none', $bGenProfLink =
false, $sForceSex =
'visitor', $isAutoCouple =
true,
$sType =
'medium', $aOnline = array(), $sTmplSfx =
'')
503 $bForceSexSite = $bForceSexVacant =
false;
505 if($sForceSex ==
'site')
506 $bForceSexSite =
true;
507 else if($sForceSex !=
'visitor')
508 $bForceSexVacant =
true;
513 if(!$bForceSexSite) {
521 $bCouple = $bThumb = $bThumbCouple =
false;
522 $sThumbUrl = $sThumbUrlTwice =
'';
523 $sThumbUrlCouple = $sThumbUrlCoupleTwice =
'';
524 $sUserTitle = $sUserTitleCouple = $sUserLink =
$sUserInfo = $sUserStatusIcon = $sUserStatusTitle =
'';
527 $oUserStatusView =
ch_instance(
'ChWsbUserStatusView');
528 $sUserStatusIcon = $oUserStatusView->getStatusIcon(
$iId,
'icon8');
529 $sUserStatusTitle = $oUserStatusView->getStatus(
$iId);
535 $sThumbSetting =
getParam(
$sType ==
'small' ?
'sys_member_info_thumb_icon' :
'sys_member_info_thumb');
542 if(!
empty($sThumbUrl)) {
546 $sThumbUrlTwice = $sThumbUrl;
549 $bThumb = !
empty($sThumbUrl) && !
empty($sThumbUrlTwice);
551 if((
int)
$aProfile[
'Couple'] > 0 && $isAutoCouple) {
559 $sThumbUrlCouple =
$o ?
$o->get($aProfileCouple) :
'';
561 if(!
empty($sThumbUrlCouple)) {
563 $sThumbUrlCoupleTwice =
$o ?
$o->get($aProfileCouple) :
'';
564 if(!$sThumbUrlCoupleTwice)
565 $sThumbUrlCoupleTwice = $sThumbUrlCouple;
568 $bThumbCouple = !
empty($sThumbUrlCouple) && !
empty($sThumbUrlCoupleTwice);
573 $sUserTitle =
getParam(
'site_title');
574 $sUserLink = CH_WSB_URL_ROOT;
576 else if($bForceSexVacant) {
577 $sUserTitle =
_t(
'_Vacant');
578 $sUserLink =
'javascript:void(0)';
581 return $GLOBALS[
'oSysTemplate']->parseHtmlByName($bCouple ?
'thumbnail_couple' . $sTmplSfx .
'.html' :
'thumbnail_single' . $sTmplSfx .
'.html', array(
582 'iProfId' => $bProfile ?
$iId : 0,
583 'sys_thb_float' =>
'tbf_' . $sFloat,
584 'classes_add' => ($bGenProfLink ?
' thumbnail_block_with_info' :
'') . (
$sType !=
'medium' ?
' thumbnail_block_icon' :
''),
585 'sys_status_icon' => $sUserStatusIcon,
586 'sys_status_title' => $sUserStatusTitle,
587 'usr_profile_url' => $sUserLink,
588 'ch_if:show_thumbnail_image1' => array(
589 'condition' => $bThumb,
591 'usr_thumb_url0' => $sThumbUrl,
592 'usr_thumb_url0_2x' => $sThumbUrlTwice,
596 'ch_if:show_thumbnail_image2' => array(
597 'condition' => $bThumbCouple,
599 'usr_thumb_url1' => $sThumbUrlCouple,
600 'usr_thumb_url1_2x' => $sThumbUrlCoupleTwice,
604 'ch_if:show_thumbnail_letter1' => array(
605 'condition' => !$bThumb,
607 'letter' => mb_substr($sUserTitle, 0, 1)
610 'ch_if:show_thumbnail_letter2' => array(
611 'condition' => !$bThumbCouple,
613 'letter' => mb_substr($sUserTitleCouple, 0, 1)
616 'usr_thumb_title0' => $sUserTitle,
617 'ch_if:profileLink' => array(
618 'condition' => $bGenProfLink,
620 'user_title' => $sUserTitle,
622 'usr_profile_url' => $sUserLink,
630 return $this->
getMemberThumbnail(
$iId, $sFloat, $bGenProfLink,
'visitor',
false,
'small', array(), $sTmplSfx);
663 function genObjectsActions( &$aKeys, $sActionsType, $bSubMenuMode =
false, $sTemplateIndex =
'actions', $sTemplateIndexActionLink =
'action' )
666 $sActionsList =
null;
667 $sResponceBlock =
null;
669 $aUsedTemplate = array (
670 'actions_submenu' =>
'member_actions_list_submenu.html',
671 'actions' =>
'member_actions_list.html',
672 'ajaxy_popup' =>
'ajaxy_popup_result.html',
677 $aActions =
$oCache->getData(
$GLOBALS[
'MySQL']->genDbCacheKey(
'sys_objects_actions'));
680 if (
null === $aActions ||
empty($aActions[$sActionsType]) ) {
684 `Caption`, `Icon`, `Url`, `Script`, `Eval`, `bDisplayInSubMenuHeader`
686 `sys_objects_actions`
688 `Type` = '{$sActionsType}'
693 $rResult =
db_res($sQuery);
694 while ( $aRow = $rResult->fetch() ) {
695 $aActions[$sActionsType][] = $aRow;
699 if ( is_array($aActions[$sActionsType])
and !
empty($aActions[$sActionsType]) ) {
700 $oCache->setData (
$GLOBALS[
'MySQL']->genDbCacheKey(
'sys_objects_actions'), $aActions);
706 $aCustomActions = array();
707 if ( is_array($aActions[$sActionsType])
and !
empty($aActions[$sActionsType]) ) {
711 foreach( $aActions[$sActionsType]
as $aRow ) {
712 if ($bSubMenuMode && $aRow[
'bDisplayInSubMenuHeader']==0)
716 $sActionLink = $this ->
genActionLink( $aKeys, $aRow,
'menuLink', $sTemplateIndexActionLink );
718 if ( $sActionLink ) {
719 $sActionLinkClass =
'actionItem' . (
$iIndex % 2 == 0 ?
'Even' :
'Odd') .
' {evalResultCssClassWrapper}';
720 $sActionLinkClass = $this ->
markerReplace($aKeys, $sActionLinkClass, $aRow[
'Eval']);
722 $aActionsItem[] = array (
723 'action_link_class' => $sActionLinkClass,
724 'action_link' => $sActionLink,
731 if ( !$aRow[
'Url'] && !$aRow[
'Script'] ) {
732 $aCustomActions[] = array (
733 'caption' => $aRow[
'Caption'],
734 'code' => $aRow[
'Eval'],
740 if ( !
empty($aActionsItem) ) {
744 if (!
empty($aKeys[
'ID'])) {
745 $sResponceBlock =
$GLOBALS[
'oSysTemplate'] -> parseHtmlByName( $aUsedTemplate[
'ajaxy_popup'], array(
'object_id' => $aKeys[
'ID']) );
748 $aTemplateKeys = array (
749 'ch_repeat:actions' => $aActionsItem,
750 'responce_block' => $sResponceBlock,
753 $sActionsList =
$GLOBALS[
'oSysTemplate'] -> parseHtmlByName( $aUsedTemplate[$sTemplateIndex], $aTemplateKeys );
757 if ($aCustomActions) {
758 foreach($aCustomActions
as $iIndex => $sValue ) {
763 return $sActionsList;
777 return '<div id="'.$sId.
'">' .
$s . ($isClearBoth ?
'<div class="clear_both"></div>' :
'') .
'</div><script>
778 function center_' .
$sId .
'(sParent) {
779 var oParent = $(sParent);
780 var iAll = $(sParent + " ' . $sBlockStyle .
'").size();
781 var iWidthUnit = $(sParent + " ' . $sBlockStyle .
':first").outerWidth(true);
782 var iWidthContainer = oParent.width();
783 var iPerRow = parseInt(iWidthContainer/iWidthUnit);
784 var iLeft = (iWidthContainer - (iAll > iPerRow ? iPerRow * iWidthUnit : iAll * iWidthUnit)) / 2;
785 oParent.css("padding-left", iLeft);
788 $(document).ready(function() {
789 var sParent = "#' .
$sId .
'";
790 var oParent = $(sParent);
791 var eImgFirst = oParent.find("img").filter(":not([src*=spacer])").first();
792 if(eImgFirst.length > 0 && !eImgFirst.prop("complete"))
793 eImgFirst.load(function() {
794 center_' .
$sId .
'(sParent);
797 center_' .
$sId .
'(sParent);
812 return '<a class="mainLogoText" href="' . CH_WSB_URL_ROOT .
'index.php' .
'">' .
getParam(
'site_title') .
'</a>';
815 $sLogoW =
getParam(
'sys_main_logo_w');
816 $sLogoH =
getParam(
'sys_main_logo_h');
818 $sStyle = $sLogoW ?
" style=\"width:{$sLogoW}px; height:auto;\" " :
'';
819 $sLogoAttr2x = $sLogoUrl2x ?
" src-2x=\"$sLogoUrl2x\" " :
'';
820 $sClass =
'mainLogo' . ($sLogoAttr2x ?
' ch-img-retina' :
'');
822 return '<a href="' . CH_WSB_URL_ROOT .
'"><img ' . $sStyle .
' src="' . $sLogoUrl .
'" ' . $sLogoAttr2x .
' class="' . $sClass .
'" alt="' .
ch_html_attribute(
getParam(
'site_title')) .
'" /></a>';
829 $sFileName = ($bRetina ?
'retina_' :
'') .
getParam(
'sys_main_logo');
830 if (!$sFileName || !file_exists(
$dir[
'mediaImages'] . $sFileName))
833 return $site[
'mediaImages'] . $sFileName;
843 $sVisibility =
getParam(
'splash_visibility');
846 if($sVisibility == CH_WSB_SPLASH_VIS_DISABLE || ($sVisibility == CH_WSB_SPLASH_VIS_INDEX && !defined(
'CH_INDEX_PAGE')) || (
$bLogged &&
isLogged()))
854 $GLOBALS[
'oSysTemplate']->addJs(array(
'splash.js'));
855 $GLOBALS[
'oSysTemplate']->addCss(array(
'splash.css'));
869 return $GLOBALS[
'oSysTemplate']->parseHtmlByName(
'search_header.html', array(
883 return '<div class="sys-service-menu-wrp ch-def-margin-sec-right ch-def-padding-right">' .
$oMenu->getCode() .
'</div>';
900 $sDirStyle = ($sDirection ==
'left') ?
'' :
'notify_message_none';
901 switch ($sDirection) {
906 $sPossibleID = ($isButton) ?
' id="isButton" ' :
'';
907 $sOnClick = $sScript ?
' onclick="' . $sScript .
'"' :
'';
910 <div
class=
"notify_message {$sDirStyle}" {$sPossibleID} {$sOnClick}>
912 <div
class=
"notify_wrapper_close"> </div>
919 $sLink = strlen($aVal[
'link']) > 0 ?
'<a href="'.CH_WSB_URL_ROOT.$aVal[
'link'].
'">{iNum} '.
_t(
'_'.$aVal[
'capt']).
'</a>' :
'{iNum} '._t(
'_'.$aVal[
'capt']) ;
920 if (
$sMode !=
'admin' ) {
922 $iNum = strlen($aVal[
'query']) > 0 ?
db_value($aVal[
'query']) : 0;
924 $sBlockId =
"id='{$aVal['name']}'";
925 $iNum = strlen($aVal[
'adm_query']) > 0 ?
db_value($aVal[
'adm_query']) : 0;
926 if ( strlen($aVal[
'adm_link']) > 0 ) {
927 if( substr( $aVal[
'adm_link'], 0, strlen(
'javascript:' ) ) ==
'javascript:' ) {
928 $sHref =
'javascript:void(0);';
929 $sOnclick =
'onclick="' . $aVal[
'adm_link'] .
'"';
931 $sHref = $aVal[
'adm_link'];
934 $sLink =
'<a href="'.$sHref.
'" '.$sOnclick.
'>{iNum} '.
_t(
'_'.$aVal[
'capt']).
'</a>';
936 $sLink =
'{iNum} '._t(
'_'.$aVal[
'capt']);
940 $sLink = str_replace(
'{iNum}', $iNum, $sLink);
941 $sImg = (
false === strpos($aVal[
'icon'],
'.') ?
'<i class="sys-icon ' . $aVal[
'icon'] .
'"></i>' :
'<img src="' .
getTemplateIcon($aVal[
'icon']) .
'" alt="" />');
944 <div class="siteStatUnit" '. $sBlockId .
'>
945 ' . $sImg . $sLink .
'
958 'prefix' => $sPrefix ? $sPrefix :
'id'.
time().
'_'.rand(1, 999999),
959 'ch_repeat:images_icons' => array (),
960 'ch_repeat:icons' => array (),
964 foreach ($aImages
as $aImage) {
967 'icon_url' => $aImage[
'icon_url'],
968 'image_url' => $aImage[
'image_url'],
969 'title' => $aImage[
'title'],
971 $aVars[
'ch_repeat:images'][] = $a;
972 $aVars[
'ch_repeat:icons'][] = $a;
976 $oTemplate =
$GLOBALS[
'oSysTemplate'];
978 $oTemplate->addJs(
'jquery.dolGalleryImages.js');
979 $oTemplate->addCss(
'gallery_images.css');
980 return $oTemplate->parseHtmlByName(
'gallery_images.html',
$aVars);
995 function sysImage($sImg, $sClassAdd =
'', $sAlt =
'', $sAttr =
'', $sImageType =
false, $iSize = 16)
1000 $sClassAdd =
' ' . $sClassAdd;
1002 if (
false === strpos($sImg,
'.'))
1003 return '<i class="sys-icon ' . $sImg . $sClassAdd .
'" alt="' .
ch_html_attribute($sAlt) .
'" ' . $sAttr .
'></i>';
1006 switch ($sImageType) {
1015 return '<img src="' . $sImg .
'" class="' . $sClassAdd .
'" alt="' .
ch_html_attribute($sAlt) .
'" ' . $sAttr .
' border="0" width="' . $iSize .
'" height="' . $iSize .
'" />';
1047 if(count( $aLangs ) < 2)
1048 return $sOutputCode;
1052 $aTmplVars = array();
1053 foreach( $aLangs
as $sName => $aLang ) {
1054 $sFlag =
$GLOBALS[
'site'][
'flags'] . $aLang[
'Flag'] .
'.gif';
1055 $aTmplVars[] = array (
1056 'ch_if:show_icon' => array (
1057 'condition' => $sFlag,
1058 'content' => array (
1059 'icon_src' => $sFlag,
1062 'icon_height' => 12,
1065 'class' =>
$sName == $sCurrent ?
'sys-bm-sub-item-selected' :
'',
1068 'title' => $aLang[
'Title'],
1072 $sOutputCode .=
$GLOBALS[
'oSysTemplate']->parseHtmlByName(
'popup_switcher.html', array(
1073 'name_method' =>
'Language',
1074 'name_block' =>
'language',
1075 'ch_repeat:items' => $aTmplVars
1078 return PopupBox(
'sys-bm-switcher-language',
_t(
'_sys_bm_popup_cpt_language'), $sOutputCode);
1086 if(count($aTemplates) < 2)
1087 return $sOutputCode;
1091 $aTmplVars = array();
1093 $aTmplVars[] = array (
1094 'ch_if:show_icon' => array (
1095 'condition' =>
false,
1096 'content' => array(),
1098 'class' =>
$sName == $sCurrent ?
'sys-bm-sub-item-selected' :
'',
1104 $sOutputCode .=
$GLOBALS[
'oSysTemplate']->parseHtmlByName(
'popup_switcher.html', array(
1105 'name_method' =>
'Template',
1106 'name_block' =>
'template',
1107 'ch_repeat:items' => $aTmplVars
1110 return PopupBox(
'sys-bm-switcher-template',
_t(
'_sys_bm_popup_cpt_design'), $sOutputCode);