本文整理汇总了PHP中Phpfox::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::getId方法的具体用法?PHP Phpfox::getId怎么用?PHP Phpfox::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phpfox
的用法示例。
在下文中一共展示了Phpfox::getId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add
public function add($aVals)
{
$sVarName = strtolower(preg_replace('/ +/', '_', preg_replace('/[^0-9a-zA-Z ]+/', '', trim($aVals['var_name']))));
$iId = $this->database()->insert($this->_sTable, array('group_id' => $sVarName, 'module_id' => $aVals['module_id'], 'product_id' => $aVals['product_id'], 'version_id' => Phpfox::getId(), 'var_name' => 'setting_group_' . $sVarName));
$sPhrase = Phpfox::getService('language.phrase.process')->add(array('var_name' => 'setting_group_' . $sVarName, 'product_id' => $aVals['product_id'], 'module' => $aVals['module_id'] . '|' . $aVals['module_id'], 'text' => array('en' => '<title>' . $aVals['var_name'] . '</title><info>' . $aVals['info'] . '</info>')));
return $sVarName;
}
示例2: getHeader
/**
* Gets any data we plan to place within the HTML tags <head></head>.
* This method also groups the data to give the template a nice clean look.
*
* @return string|array $sData Returns the HTML data to be placed within <head></head>
*/
public function getHeader($bReturnArray = false)
{
if (Phpfox::isAdminPanel()) {
$this->setHeader(array('custom.css' => 'style_css'));
}
if ($this->delayedHeaders) {
foreach ($this->delayedHeaders as $header) {
$this->setHeader('cache', $header);
}
}
// $this->setHeader('<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">');
Core\Event::trigger('lib_phpfox_template_getheader', $this);
foreach ((new Core\App())->all() as $App) {
if ($App->head && is_array($App->head)) {
foreach ($App->head as $head) {
$this->setHeader($head);
}
}
if ($App->settings) {
$Setting = new Core\Setting();
foreach ($App->settings as $key => $setting) {
if (isset($setting->js_variable)) {
$this->setHeader('<script>var ' . $key . ' = "' . $Setting->get($key) . '";</script>');
}
}
}
}
$aArrayData = array();
$sData = '';
$sJs = '';
$iVersion = $this->getStaticVersion();
$oUrl = Phpfox_Url::instance();
$aUrl = $oUrl->getParams();
if (!defined('PHPFOX_DESIGN_DND')) {
define('PHPFOX_DESIGN_DND', false);
}
if (!PHPFOX_IS_AJAX_PAGE) {
($sPlugin = Phpfox_Plugin::get('template_getheader')) ? eval($sPlugin) : false;
$sJs .= "\t\t\tvar oCore = {'core.is_admincp': " . (Phpfox::isAdminPanel() ? 'true' : 'false') . ", 'core.section_module': '" . Phpfox_Module::instance()->getModuleName() . "', 'profile.is_user_profile': " . (defined('PHPFOX_IS_USER_PROFILE') && PHPFOX_IS_USER_PROFILE ? 'true' : 'false') . ", 'log.security_token': '" . Phpfox::getService('log.session')->getToken() . "', 'core.url_rewrite': '" . Phpfox::getParam('core.url_rewrite') . "', 'core.country_iso': '" . (Phpfox::isUser() ? Phpfox::getUserBy('country_iso') : '') . "', 'core.can_move_on_a_y_and_x_axis' : " . (!defined('PHPFOX_INSTALLER') && Phpfox::getParam('core.can_move_on_a_y_and_x_axis') ? 'true' : 'false') . ", 'core.default_currency': '" . (defined('PHPFOX_INSTALLER') ? 'USD' : Phpfox::getService('core.currency')->getDefault()) . "', 'core.enabled_edit_area': " . (Phpfox::getParam('core.enabled_edit_area') ? 'true' : 'false') . ", 'core.disable_hash_bang_support': " . (Phpfox::getParam('core.disable_hash_bang_support') ? 'true' : 'false') . ", 'core.site_wide_ajax_browsing': " . (!defined('PHPFOX_IN_DESIGN_MODE') && Phpfox::getParam('core.site_wide_ajax_browsing') && !Phpfox::isAdminPanel() && Phpfox::isUser() ? 'true' : 'false') . ", 'profile.user_id': " . (defined('PHPFOX_IS_USER_PROFILE') && PHPFOX_IS_USER_PROFILE ? Profile_Service_Profile::instance()->getProfileUserId() : 0) . "};\n";
// You are filtering out the controllers which should not load 'content' ajaxly, finding a way for pages.view/1/info and like that
$sProgressCssFile = $this->getStyle('css', 'progress.css');
$sStylePath = str_replace(Phpfox::getParam('core.path'), '', str_replace('progress.css', '', $sProgressCssFile));
$aJsVars = array('sJsHome' => Phpfox::getParam('core.path'), 'sJsHostname' => $_SERVER['HTTP_HOST'], 'sSiteName' => Phpfox::getParam('core.site_title'), 'sJsStatic' => $oUrl->getDomain() . PHPFOX_STATIC, 'sJsStaticImage' => Phpfox::getParam('core.url_static_image'), 'sImagePath' => $this->getStyle('image'), 'sStylePath' => $this->getStyle('css'), 'sVersion' => Phpfox::getId(), 'sJsAjax' => $oUrl->getDomain() . PHPFOX_STATIC . 'ajax.php', 'sStaticVersion' => $iVersion, 'sGetMethod' => PHPFOX_GET_METHOD, 'sDateFormat' => defined('PHPFOX_INSTALLER') ? '' : Phpfox::getParam('core.date_field_order'), 'sEgiftStyle' => $this->getStyle('css', 'display.css', 'egift'), 'sGlobalTokenName' => Phpfox::getTokenName(), 'sController' => Phpfox_Module::instance()->getFullControllerName(), 'bJsIsMobile' => Phpfox::isMobile() ? true : false, 'sProgressCssFile' => $sProgressCssFile, 'sHostedVersionId' => defined('PHPFOX_IS_HOSTED_VERSION') ? PHPFOX_IS_HOSTED_VERSION : '');
if (!defined('PHPFOX_INSTALLER')) {
$aJsVars['bWysiwyg'] = Phpfox::getParam('core.wysiwyg') != 'default' && Phpfox::getParam('core.allow_html') ? true : false;
$aJsVars['sEditor'] = Phpfox::getParam('core.wysiwyg');
$aJsVars['sJsCookiePath'] = Phpfox::getParam('core.cookie_path');
$aJsVars['sJsCookieDomain'] = Phpfox::getParam('core.cookie_domain');
$aJsVars['sJsCookiePrefix'] = Phpfox::getParam('core.session_prefix');
$aJsVars['bPhotoTheaterMode'] = Phpfox::isModule('photo') ? Phpfox::getParam('photo.view_photos_in_theater_mode') : false;
$aJsVars['bUseHTML5Video'] = false;
// ((Phpfox::isModule('video') && Phpfox::getParam('video.upload_for_html5')) ? true : false);
if (Phpfox::isAdmin()) {
$aJsVars['sAdminCPLocation'] = Phpfox::getParam('admincp.admin_cp');
} else {
$aJsVars['sAdminCPLocation'] = '';
}
if (Phpfox::isModule('notification')) {
$aJsVars['notification.notify_ajax_refresh'] = Phpfox::getParam('notification.notify_ajax_refresh');
}
$sLocalDatepicker = PHPFOX_STATIC . 'jscript/jquery/locale/jquery.ui.datepicker-' . strtolower(Phpfox_Locale::instance()->getLangId()) . '.js';
if (file_exists($sLocalDatepicker)) {
$sFile = str_replace(PHPFOX_STATIC . 'jscript/', '', $sLocalDatepicker);
$this->setHeader(array($sFile => 'static_script'));
}
/* Only in a few cases will we want to add the visitor's IP */
if (Phpfox::getParam('core.google_api_key') != '' && Phpfox::getParam('core.ip_infodb_api_key')) {
// $aJsVars['sIP'] = Phpfox_Request::instance()->getIp();
}
$aJsVars['bEnableMicroblogSite'] = Phpfox::isModule('microblog') ? Phpfox::getParam('microblog.enable_microblog_site') : false;
}
($sPlugin = Phpfox_Plugin::get('template_getheader_setting')) ? eval($sPlugin) : false;
if (Phpfox::isModule('input') && false) {
$this->setHeader('cache', array('browse.css' => 'style_css'));
}
$sJs .= "\t\t\tvar oParams = {";
$iCnt = 0;
foreach ($aJsVars as $sVar => $sValue) {
$iCnt++;
if ($iCnt != 1) {
$sJs .= ",";
}
if (is_bool($sValue)) {
$sJs .= "'{$sVar}': " . ($sValue ? 'true' : 'false');
} elseif (is_numeric($sValue)) {
$sJs .= "'{$sVar}': " . $sValue;
} else {
$sJs .= "'{$sVar}': '" . str_replace("'", "\\'", $sValue) . "'";
}
}
$sJs .= "};\n";
if (!defined('PHPFOX_INSTALLER')) {
$aLocaleVars = array('core.are_you_sure', 'core.yes', 'core.no', 'core.save', 'core.cancel', 'core.go_advanced', 'core.processing', 'emoticon.emoticons', 'attachment.attach_files', 'core.close', 'core.language_packages', 'core.move_this_block', 'core.uploading', 'language.loading', 'core.saving', 'core.loading_text_editor', 'core.quote', 'core.loading');
if (Phpfox::isModule('im') && Phpfox::getParam('im.enable_im_in_footer_bar')) {
//.........这里部分代码省略.........
示例3: foreach
$aRows = $this->_db()->select('p.*')->from($this->_getOldT('pages'), 'p')->execute('getRows');
foreach ($aRows as $aRow) {
$iPageId = $this->_db()->insert(Phpfox::getT('page'), array('user_id' => '0', 'module_id' => 'core', 'product_id' => 'phpfox', 'is_active' => '1', 'is_phrase' => '0', 'parse_php' => $aRow['allow_php'], 'has_bookmark' => '0', 'add_view' => '0', 'full_size' => '1', 'title' => Phpfox::getLib('parse.input')->clean($aRow['title_head']), 'title_url' => $aRow['title_url'], 'disallow_access' => null, 'added' => PHPFOX_TIME, 'total_view' => '0', 'total_attachment' => '0', 'total_tag' => '0'));
$this->_db()->insert(Phpfox::getT('page_text'), array('page_id' => $iPageId, 'text' => Phpfox::getLib('parse.input')->clean($aRow['content']), 'text_parsed' => Phpfox::getLib('parse.input')->prepare($aRow['content']), 'keyword' => $aRow['meta'], 'description' => null));
if (!empty($aRow['title_menu'])) {
$aMenu = $this->_db()->select('*')->from($this->_getOldT('menu'))->where('parent = ' . $aRow['page_id'])->execute('getRow');
if (isset($aMenu['menu_id'])) {
$sVarName = 'core_' . Phpfox::getService('language.phrase.process')->prepare($aMenu['title_menu']);
$sVarName = 'menu_' . $sVarName;
$sConnection = 'main';
if ($aMenu['location'] == '1') {
$sConnection = 'main_right';
} elseif ($aMenu['location'] == '2') {
$sConnection = 'footer';
}
$this->_db()->insert(Phpfox::getT('menu'), array('parent_id' => '0', 'page_id' => $iPageId, 'm_connection' => $sConnection, 'module_id' => 'core', 'product_id' => 'phpfox', 'var_name' => $sVarName, 'is_active' => '1', 'url_value' => str_replace('-', '.', $aMenu['url']), 'disallow_access' => null, 'version_id' => Phpfox::getId()));
Phpfox::getService('language.phrase.process')->add(array('var_name' => $sVarName, 'module' => 'core|core', 'product_id' => 'phpfox', 'text' => array('en' => $aMenu['title_menu'])));
}
}
}
$sMessage = 'importing of custom pages completed.';
$sAction = 'import-setting';
$iPage = 0;
break;
case 'import-user-background-photo':
// Limit how many items to import per round
$iLimit = 200;
$iCnt = $this->_db()->select('COUNT(*)')->from($this->_getOldT('template'))->execute('getField');
$aRows = $this->_db()->select('m.*, unew.user_id AS new_user_id')->from($this->_getOldT('template'), 'm')->join($this->_getOldT('user'), 'u', 'u.user = m.user')->join(Phpfox::getT('user'), 'unew', 'unew.upgrade_user_id = u.id')->where('m.bg_img = \'image\'')->limit($this->_sPage, $iLimit, $iCnt)->execute('getRows');
foreach ($aRows as $aRow) {
if (file_exists(PHPFOX_DIR_FILE . 'pic' . PHPFOX_DS . 'user_bg' . PHPFOX_DS . $aRow['user'] . '.jpg')) {
示例4: getHeader
/**
* Gets any data we plan to place within the HTML tags <head></head>.
* This method also groups the data to give the template a nice clean look.
*
* @return string $sData Returns the HTML data to be placed within <head></head>
*/
public function getHeader($bReturnArray = false)
{
if (Phpfox::isMobile()) {
$this->setHeader(array('mobile.css' => 'style_css'));
}
if (!defined('PHPFOX_INSTALLER')) {
$this->setHeader(array('custom.css' => 'style_css'));
$aLocale = Phpfox::getLib('locale')->getLang();
if ($aLocale['direction'] == 'rtl') {
$this->setHeader(array('rtl.css' => 'style_css'));
}
$sCustomCss = '';
$aThemeCache = $this->getThemeCache();
if (isset($aThemeCache['l_width']) && $aThemeCache['l_width'] > 0) {
$sCustomCss .= '#left { width:' . (int) $aThemeCache['l_width'] . 'px; }';
$sCustomCss .= '#main_content { margin-left:' . (int) $aThemeCache['l_width'] . 'px; }';
}
if (isset($aThemeCache['c_width']) && $aThemeCache['c_width'] > 0) {
$sCustomCss .= '.content3, .item_view .js_feed_comment_border, .item_view .item_tag_holder, .item_view .attachment_holder_view { width:' . (int) $aThemeCache['c_width'] . 'px; }';
}
if (isset($aThemeCache['r_width']) && $aThemeCache['r_width'] > 0) {
$sCustomCss .= '#right { width:' . (int) $aThemeCache['r_width'] . 'px; }';
$sCustomCss .= '.content4 { width:' . (960 - (int) $aThemeCache['r_width']) . 'px; }';
}
if (!empty($sCustomCss)) {
$this->setHeader('<style type="text/css">' . $sCustomCss . '</style>');
}
}
$aArrayData = array();
$sData = '';
$sCss = '';
$sJs = '';
$iVersion = $this->getStaticVersion();
$oUrl = Phpfox::getLib('url');
if (defined('PHPFOX_IS_HOSTED_SCRIPT')) {
$oCache = Phpfox::getLib('cache');
} else {
$oCache = Phpfox::getLib('cache', array('storage' => 'file', 'free' => true));
}
$aUrl = $oUrl->getParams();
if (Phpfox::getUserParam('core.can_design_dnd') && Phpfox::getService('theme')->isInDnDMode() && (!isset($aUrl['req2']) || $aUrl['req2'] != 'designer')) {
if (!defined('PHPFOX_DESIGN_DND')) {
define('PHPFOX_DESIGN_DND', true);
}
/* .
* Tells if the user is Design mode with Drag and Drop support.
* Its important to note the difference in the purpose of this
* constant as it does Not tell if the user CAN enter DesignDND
* mode but instead it tells if the user IS already in this
* mode
* .
*/
$this->_aHeaders[] = array('designdnd.js' => 'module_theme');
} else {
if (!defined('PHPFOX_DESIGN_DND')) {
define('PHPFOX_DESIGN_DND', false);
}
}
if (!PHPFOX_IS_AJAX_PAGE) {
if (!defined('PHPFOX_INSTALLER')) {
if (!Phpfox::isAdminPanel()) {
$oDb = Phpfox::getLib('database');
$oFileCache = Phpfox::getLib('cache');
$sFileThemeCssId = $oFileCache->set(array('theme', 'theme_css' . $iVersion));
$aCacheStyles = array();
if (!($aCacheStyles = $oFileCache->get($sFileThemeCssId))) {
$aSavedStyles = $oDb->select('tc.module_id, tc.file_name')->from(Phpfox::getT('theme_css'), 'tc')->where('style_id = ' . (int) $this->_aTheme['style_id'] . '')->execute('getRows');
foreach ($aSavedStyles as $aSavedStyle) {
$aCacheStyles[$aSavedStyle['module_id'] ? $aSavedStyle['module_id'] : null][$aSavedStyle['file_name']] = true;
}
$oFileCache->save($sFileThemeCssId, $aCacheStyles);
}
}
}
($sPlugin = Phpfox_Plugin::get('template_getheader')) ? eval($sPlugin) : false;
$sJs .= "\t\t\tvar oCore = {'core.is_admincp': " . (Phpfox::isAdminPanel() ? 'true' : 'false') . ", 'core.section_module': '" . Phpfox::getLib('module')->getModuleName() . "', 'profile.is_user_profile': " . (defined('PHPFOX_IS_USER_PROFILE') && PHPFOX_IS_USER_PROFILE ? 'true' : 'false') . ", 'log.security_token': '" . Phpfox::getService('log.session')->getToken() . "', 'core.url_rewrite': '" . Phpfox::getParam('core.url_rewrite') . "', 'core.country_iso': '" . (Phpfox::isUser() ? Phpfox::getUserBy('country_iso') : '') . "', 'core.can_move_on_a_y_and_x_axis' : " . (!defined('PHPFOX_INSTALLER') && Phpfox::getParam('core.can_move_on_a_y_and_x_axis') ? 'true' : 'false') . ", 'core.default_currency': '" . (defined('PHPFOX_INSTALLER') ? 'USD' : Phpfox::getService('core.currency')->getDefault()) . "', 'core.enabled_edit_area': " . (Phpfox::getParam('core.enabled_edit_area') ? 'true' : 'false') . ", 'core.disable_hash_bang_support': " . (Phpfox::getParam('core.disable_hash_bang_support') ? 'true' : 'false') . ", 'core.site_wide_ajax_browsing': " . (!defined('PHPFOX_IN_DESIGN_MODE') && Phpfox::getParam('core.site_wide_ajax_browsing') && !Phpfox::isAdminPanel() && Phpfox::isUser() ? 'true' : 'false') . ", 'profile.user_id': " . (defined('PHPFOX_IS_USER_PROFILE') && PHPFOX_IS_USER_PROFILE ? Phpfox::getService('profile')->getProfileUserId() : 0) . "};\n";
// You are filtering out the controllers which should not load 'content' ajaxly, finding a way for pages.view/1/info and like that
$sProgressCssFile = $this->getStyle('css', 'progress.css');
$sStylePath = str_replace(Phpfox::getParam('core.path'), '', str_replace('progress.css', '', $sProgressCssFile));
$aJsVars = array('sJsHome' => Phpfox::getParam('core.path'), 'sJsHostname' => $_SERVER['HTTP_HOST'], 'sSiteName' => Phpfox::getParam('core.site_title'), 'sJsStatic' => $oUrl->getDomain() . PHPFOX_STATIC, 'sJsStaticImage' => Phpfox::getParam('core.url_static_image'), 'sImagePath' => $this->getStyle('image'), 'sStylePath' => $this->getStyle('css'), 'sVersion' => Phpfox::getId(), 'sJsAjax' => $oUrl->getDomain() . PHPFOX_STATIC . 'ajax.php', 'sStaticVersion' => $iVersion, 'sGetMethod' => PHPFOX_GET_METHOD, 'sDateFormat' => defined('PHPFOX_INSTALLER') ? '' : Phpfox::getParam('core.date_field_order'), 'sJsAjax' => $oUrl->getDomain() . PHPFOX_STATIC . 'ajax.php', 'sEgiftStyle' => $this->getStyle('css', 'display.css', 'egift'), 'sGlobalTokenName' => Phpfox::getTokenName(), 'sController' => Phpfox::getLib('module')->getFullControllerName(), 'bJsIsMobile' => Phpfox::isMobile() ? true : false, 'sProgressCssFile' => $sProgressCssFile, 'sHostedVersionId' => defined('PHPFOX_IS_HOSTED_VERSION') ? PHPFOX_IS_HOSTED_VERSION : '');
if (!defined('PHPFOX_INSTALLER')) {
$aJsVars['bWysiwyg'] = Phpfox::getParam('core.wysiwyg') != 'default' && Phpfox::getParam('core.allow_html') ? true : false;
$aJsVars['sEditor'] = Phpfox::getParam('core.wysiwyg');
$aJsVars['sJsCookiePath'] = Phpfox::getParam('core.cookie_path');
$aJsVars['sJsCookieDomain'] = Phpfox::getParam('core.cookie_domain');
$aJsVars['sJsCookiePrefix'] = Phpfox::getParam('core.session_prefix');
$aJsVars['bPhotoTheaterMode'] = Phpfox::isModule('photo') ? Phpfox::getParam('photo.view_photos_in_theater_mode') : false;
$aJsVars['bUseHTML5Video'] = Phpfox::getParam('video.upload_for_html5') ? true : false;
if (Phpfox::isAdmin()) {
$aJsVars['sAdminCPLocation'] = Phpfox::getParam('admincp.admin_cp');
} else {
$aJsVars['sAdminCPLocation'] = '';
}
if (Phpfox::isModule('notification')) {
//.........这里部分代码省略.........
示例5: addHook
public function addHook($aVals)
{
if ($this->database()->select('COUNT(*)')->from(Phpfox::getT('plugin_hook'))->where('call_name = \'' . $this->database()->escape($aVals['call_name']) . '\'')->execute('getField')) {
return Phpfox_Error::set(Phpfox::getPhrase('admincp.hook_already_exists'));
}
$this->database()->insert(Phpfox::getT('plugin_hook'), array('hook_type' => $aVals['hook_type'], 'module_id' => empty($aVals['module_id']) ? null : $aVals['module_id'], 'product_id' => $aVals['product_id'], 'call_name' => $aVals['call_name'], 'added' => PHPFOX_TIME, 'version_id' => Phpfox::getId(), 'is_active' => (int) $aVals['is_active']));
$this->cache()->remove();
return true;
}
示例6: getHeader
//.........这里部分代码省略.........
$oFileCache = Phpfox::getLib('cache');
$sFileThemeCssId = $oFileCache->set(array('theme', 'theme_css' . $iVersion));
$aCacheStyles = array();
if (!($aCacheStyles = $oFileCache->get($sFileThemeCssId)))
{
$aSavedStyles = $oDb->select('tc.module_id, tc.file_name')
->from(Phpfox::getT('theme_css'), 'tc')
->where('style_id = ' . (int) $this->_aTheme['style_id'] . '')
->execute('getRows');
foreach ($aSavedStyles as $aSavedStyle)
{
$aCacheStyles[($aSavedStyle['module_id'] ? $aSavedStyle['module_id'] : null)][$aSavedStyle['file_name']] = true;
}
$oFileCache->save($sFileThemeCssId, $aCacheStyles);
}
}
}
(($sPlugin = Phpfox_Plugin::get('template_getheader')) ? eval($sPlugin) : false);
$sJs .= "\t\t\tvar oCore = {'core.is_admincp': " . (Phpfox::isAdminPanel() ? 'true' : 'false') . ", 'core.section_module': '" . Phpfox::getLib('module')->getModuleName() . "', 'profile.is_user_profile': " . (defined('PHPFOX_IS_USER_PROFILE') && PHPFOX_IS_USER_PROFILE ? 'true' : 'false') . ", 'log.security_token': '" . Phpfox::getService('log.session')->getToken() . "', 'core.url_rewrite': '" . Phpfox::getParam('core.url_rewrite') . "', 'core.country_iso': '" . (Phpfox::isUser() ? Phpfox::getUserBy('country_iso') : '') . "', 'core.can_move_on_a_y_and_x_axis' : " . ((!defined('PHPFOX_INSTALLER') && Phpfox::getParam('core.can_move_on_a_y_and_x_axis')) ? 'true' : 'false') . ", 'core.default_currency': '" . (defined('PHPFOX_INSTALLER') ? 'USD' : Phpfox::getService('core.currency')->getDefault()) . "', 'core.enabled_edit_area': " . (Phpfox::getParam('core.enabled_edit_area') ? 'true' : 'false') . ", 'core.disable_hash_bang_support': " . (Phpfox::getParam('core.disable_hash_bang_support') ? 'true' : 'false') . ", 'core.site_wide_ajax_browsing': " . ((!defined('PHPFOX_IN_DESIGN_MODE') && Phpfox::getParam('core.site_wide_ajax_browsing') && !Phpfox::isAdminPanel() && Phpfox::isUser()) ? 'true' : 'false') . ", 'profile.user_id': " . (defined('PHPFOX_IS_USER_PROFILE') && PHPFOX_IS_USER_PROFILE ? Phpfox::getService('profile')->getProfileUserId() : 0) . "};\n";
$sProgressCssFile = $this->getStyle('css', 'progress.css');
$sStylePath = str_replace(Phpfox::getParam('core.path'), '', str_replace('progress.css', '', $sProgressCssFile));
$aJsVars = array(
'sJsHome' => Phpfox::getParam('core.path'),
'sJsHostname' => $_SERVER['HTTP_HOST'],
'sJsStatic' => $oUrl->getDomain() . PHPFOX_STATIC,
'sJsStaticImage' => Phpfox::getParam('core.url_static_image'),
'sImagePath' => $this->getStyle('image'),
'sStylePath' => $this->getStyle('css'),
'sVersion' => Phpfox::getId(),
'sJsAjax' => $oUrl->getDomain() . PHPFOX_STATIC . 'ajax.php',
'sStaticVersion' => $iVersion,
'sGetMethod' => PHPFOX_GET_METHOD,
'sDateFormat' => (defined('PHPFOX_INSTALLER') ? '' : Phpfox::getParam('core.date_field_order')),
'sJsAjax' => $oUrl->getDomain() . PHPFOX_STATIC . 'ajax.php',
'sEgiftStyle' => $this->getStyle('css','display.css','egift'),
'sGlobalTokenName' => Phpfox::getTokenName(),
'sController' => Phpfox::getLib('module')->getFullControllerName(),
'bJsIsMobile' => (Phpfox::isMobile() ? true : false),
'sProgressCssFile' => $sProgressCssFile
);
if (!defined('PHPFOX_INSTALLER'))
{
$aJsVars['bWysiwyg'] = ((Phpfox::getParam('core.wysiwyg') != 'default' && Phpfox::getParam('core.allow_html')) ? true : false);
$aJsVars['sEditor'] = Phpfox::getParam('core.wysiwyg');
$aJsVars['sJsCookiePath'] = Phpfox::getParam('core.cookie_path');
$aJsVars['sJsCookieDomain'] = Phpfox::getParam('core.cookie_domain');
$aJsVars['sJsCookiePrefix'] = Phpfox::getParam('core.session_prefix');
$aJsVars['bPhotoTheaterMode'] = (Phpfox::isModule('photo') ? Phpfox::getParam('photo.view_photos_in_theater_mode') : false);
if (Phpfox::isAdmin())
{
$aJsVars['sAdminCPLocation'] = Phpfox::getParam('admincp.admin_cp');
}
else
{
$aJsVars['sAdminCPLocation'] = '';
}
if (Phpfox::isModule('notification'))
{
$aJsVars['notification.notify_ajax_refresh'] = Phpfox::getParam('notification.notify_ajax_refresh');
}