} else { $xtpl->assign("LBL_CHARSET", $default_charset); } //////SNIPPET ADDED FOR TEMPLATING $image_server = ''; if (defined('TEMPLATE_URL')) { $image_server = TEMPLATE_URL . '/'; } $xtpl->assign("IMAGE_SERVER", $image_server); ///////END SNIPPET FOR TEMPLATING $xtpl->assign("THEME", $theme); //////SNIPPET ADDED FOR TEMPLATING $xtpl->assign("IMAGE_PATH", $image_path); $company_logo = $image_path . 'company_logo.png'; if (defined('INSTANCE_PATH') && file_exists(INSTANCE_PATH . 'custom/' . $theme_path . 'images/company_logo.png')) { $company_logo = SugarTemplateUtilities::getWebPath('custom/' . $theme_path . 'images/company_logo.png'); } else { if (file_exists('custom/' . $theme_path . 'images/company_logo.png')) { $company_logo = 'custom/' . $theme_path . 'images/company_logo.png'; } } $xtpl->assign('COMPANY_LOGO', $company_logo); ///////END SNIPPET FOR TEMPLATING $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("MODULE_NAME", $currentModule); $xtpl->assign("DATE", date("Y-m-d")); if ($current_user->first_name != '') { $xtpl->assign("CURRENT_USER", $current_user->first_name); } else { $xtpl->assign("CURRENT_USER", $current_user->user_name); }
function getJSPath($relative_path, $additional_attrs = '') { if (defined('TEMPLATE_URL')) { $relative_path = SugarTemplateUtilities::getWebPath($relative_path); } if (empty($GLOBALS['sugar_config']['js_custom_version'])) { $GLOBALS['sugar_config']['js_custom_version'] = 1; } $js_version_key = isset($GLOBALS['js_version_key']) ? $GLOBALS['js_version_key'] : ''; $path = $relative_path . '?s=' . $js_version_key . '&c=' . $GLOBALS['sugar_config']['js_custom_version']; if (inDeveloperMode()) { $path .= '&developerMode=' . mt_rand(); } if (!empty($additonal_attrs)) { $path .= '&' . $additional_attrs; } return $path; }
function getJSPath($relative_path, $additional_attrs = '') { if (defined('TEMPLATE_URL')) { $relative_path = SugarTemplateUtilities::getWebPath($relative_path); } return getVersionedPath($relative_path) . (!empty($additional_attrs) ? "&{$additional_attrs}" : ""); }