• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fn_get_theme_path函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中fn_get_theme_path函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_get_theme_path函数的具体用法?PHP fn_get_theme_path怎么用?PHP fn_get_theme_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了fn_get_theme_path函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($theme_name)
 {
     $this->theme_name = $theme_name;
     $this->theme_path = fn_get_theme_path('[themes]/' . $theme_name, 'C');
     $this->relative_path = fn_get_theme_path('[relative]/' . $theme_name, 'C');
     $this->repo_path = fn_get_theme_path('[repo]/' . $theme_name, 'C');
 }
开发者ID:askzap,项目名称:ultimate,代码行数:7,代码来源:Themes.php


示例2: fn_settings_variants_addons_hybrid_auth_icons_pack

function fn_settings_variants_addons_hybrid_auth_icons_pack()
{
    $available_icons_packs = array();
    $theme_name = Settings::instance()->getValue('theme_name', '');
    $icons_dir = fn_get_theme_path('[themes]/', 'C') . $theme_name . '/media/images/addons/hybrid_auth/icons/';
    $icons_packs = fn_get_dir_contents($icons_dir);
    foreach ($icons_packs as $id => $icons_packs_name) {
        $available_icons_packs[$icons_packs_name] = $icons_packs_name;
    }
    return $available_icons_packs;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:11,代码来源:func.php


示例3: smarty_function_style

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_function_style($params, &$smarty)
{
    list($_area) = Tygh::$app['view']->getArea();
    $params['src'] = !empty($params['src']) ? $params['src'] : '';
    $location = Registry::get('config.current_location') . (strpos($params['src'], '/') === 0 ? '' : '/' . fn_get_theme_path('[relative]/[theme]', $_area) . '/css');
    $url = $location . '/' . $params['src'];
    if (!empty($params['content'])) {
        return '<style type="text/css"' . (!empty($params['media']) ? ' media="' . $params['media'] . '"' : '') . '>' . $params['content'] . '</style>';
    }
    return '<link type="text/css" rel="stylesheet"' . (!empty($params['media']) ? ' media="' . $params['media'] . '"' : '') . ' href="' . $url . '" />';
}
开发者ID:askzap,项目名称:ultimate,代码行数:16,代码来源:function.style.php


示例4: getPath

 /**
  * Gets patterns absolute path
  * @param  string $style_id style ID
  * @return string patterns absolute path
  */
 public function getPath($style_id)
 {
     $path = fn_get_theme_path('[themes]/[theme]/media/images/patterns/', 'C');
     /**
      * Modifies path to patterns
      *
      * @param object  $this Patterns object
      * @param string  $path current path
      * @param string  $style_id style to get path for
      */
     fn_set_hook('patterns_get_path', $this, $path, $style_id);
     return $path . fn_basename($style_id);
 }
开发者ID:askzap,项目名称:ultimate,代码行数:18,代码来源:Patterns.php


示例5: customCompile

 /**
  * Compile LESS to CSS, appending data from styles and parsing urls
  * @param  string $less_output    LESS code
  * @param  string $dirname        absolute path where compiled file will be saved (to parse URLs correctly)
  * @param  array  $data           style data
  * @param  string $prepend_prefix prefix to prepend all selectors (for widget mode)
  * @param  string $area Area (C/A) to get setting for
  * @return string CSS code
  */
 public function customCompile($less_output, $dirname, $data = array(), $prepend_prefix = '', $area = AREA)
 {
     // Apply all Custom styles styles
     $less_output .= Styles::factory(fn_get_theme_path('[theme]', $area))->getLess($data);
     // Inject Bootstrap fluid variables
     $less_output .= self::getLayoutStyleVariables();
     if (!empty($prepend_prefix)) {
         $less_output = $prepend_prefix . " {\n" . $less_output . "\n}";
     }
     $output = $this->parse($less_output);
     // Remove "body" definition
     if (!empty($prepend_prefix)) {
         $output = str_replace($prepend_prefix . ' body', $prepend_prefix, $output);
     }
     return Less::parseUrls($output, $dirname, fn_get_theme_path('[themes]/[theme]/media'));
 }
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:25,代码来源:Less.php


示例6: fn_mp_get_setting_templates

function fn_mp_get_setting_templates()
{
    $templates = array();
    $skin_path = fn_get_theme_path('[themes]/[theme]', 'A');
    $relative_directory_path = 'addons/maps_provider/settings/';
    $template_path = $skin_path . '/templates/' . $relative_directory_path;
    $_templates = fn_get_dir_contents($template_path, false, true, '.tpl');
    if (!empty($_templates)) {
        $needles = array('settings_', '.tpl');
        $replacements = array('', '');
        foreach ($_templates as $template) {
            if (preg_match('/^settings_/', $template, $m)) {
                $_template = str_replace($needles, $replacements, $template);
                // Get the provider name
                $templates[$_template] = $relative_directory_path . $template;
            }
        }
    }
    return $templates;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:20,代码来源:addons.pre.php


示例7: setBackupFrontend

 private static function setBackupFrontend($company_id)
 {
     foreach (self::$file_areas as $key => $file_area) {
         foreach (self::$installed_themes as $theme) {
             self::$dirs['backup_files'][$key . '_frontend'][$company_id][$theme] = self::$dirs['backup_root'] . self::$backup_files_path . fn_get_theme_path('[relative]/' . $theme . '/', 'C', $company_id) . $file_area . '/' . self::$full_addon_path;
         }
     }
 }
开发者ID:askzap,项目名称:ultimate,代码行数:8,代码来源:TwigmoUpgrade.php


示例8: fn_get_theme_path

        $full_path = fn_get_theme_path('[themes]/[theme]', 'C') . '/templates/' . $_REQUEST['file'];
        if (fn_check_path($full_path)) {
            $c_name = fn_normalize_path($full_path);
            $r_name = fn_normalize_path(Registry::get('config.dir.themes_repository') . Registry::get('config.base_theme') . '/templates/' . $_REQUEST['file']);
            if (is_file($r_name)) {
                $copied = fn_copy($r_name, $c_name);
            }
            if ($copied) {
                fn_set_notification('N', __('notice'), __('text_file_restored', array('[file]' => fn_basename($_REQUEST['file']))));
            } else {
                fn_set_notification('E', __('error'), __('text_cannot_restore_file', array('[file]' => fn_basename($_REQUEST['file']))));
            }
            if ($copied) {
                if (defined('AJAX_REQUEST')) {
                    Registry::get('ajax')->assign('force_redirection', fn_url($_REQUEST['current_url']));
                    Registry::get('ajax')->assign('non_ajax_notifications', true);
                }
                return array(CONTROLLER_STATUS_OK, $_REQUEST['current_url']);
            }
        }
        exit;
    }
}
if ($mode == 'get_content') {
    $ext = fn_strtolower(fn_get_file_ext($_REQUEST['file']));
    if ($ext == 'tpl') {
        $theme_path = fn_get_theme_path('[themes]/[theme]/templates/', 'C');
        Registry::get('ajax')->assign('content', fn_get_contents($_REQUEST['file'], $theme_path));
    }
    exit;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:31,代码来源:design_mode.php


示例9: fn_get_default_layouts_sources

function fn_get_default_layouts_sources($theme_name = '', $themes_path = '')
{
    $layouts_sources = array();
    if (empty($themes_path)) {
        $themes_path = fn_get_theme_path('[themes]', 'C');
    }
    if (empty($theme_name)) {
        $installed_themes = fn_get_dir_contents($themes_path, true);
        foreach ($installed_themes as $theme_name) {
            $layouts_sources = array_merge($layouts_sources, fn_get_default_layouts_sources($theme_name, $themes_path));
        }
    } else {
        $layouts_path = $themes_path . '/' . $theme_name . '/layouts/';
        $layouts = fn_get_dir_contents($layouts_path, false, true, '.xml');
        foreach ($layouts as $layout_name) {
            $layout_path = fn_normalize_path($layouts_path . $layout_name);
            if (file_exists($layout_path)) {
                $layout_data = Exim::instance(Registry::get('runtime.company_id'), 0, $theme_name)->getLayoutData($layout_path, false);
                if (!empty($layout_data)) {
                    $layout_data['theme_name'] = $theme_name;
                    $layout_data['filename'] = $layout_name;
                    $layouts_sources[] = $layout_data;
                }
            }
        }
    }
    return $layouts_sources;
}
开发者ID:askzap,项目名称:ultimate,代码行数:28,代码来源:block_manager.php


示例10: fn_gift_certificates_logo_types

function fn_gift_certificates_logo_types(&$types, $for_company)
{
    if ($for_company == true && fn_allowed_for('MULTIVENDOR')) {
        return false;
    }
    $types['gift_cert'] = array('text' => 'text_gift_certificate_logo', 'image' => fn_get_theme_path('[themes]/[theme]/mail/media/', 'C') . 'images/gift_cert_logo.png', 'single_logo' => true);
    return true;
}
开发者ID:arpad9,项目名称:bygmarket,代码行数:8,代码来源:func.php


示例11: getPath

 /**
  * Gets patterns absolute path
  * @param  string $style_id style ID
  * @return string patterns absolute path
  */
 public static function getPath($style_id)
 {
     $path = fn_get_theme_path('[themes]/[theme]/media/images/patterns/', 'C');
     fn_set_hook('patterns_get_path', $path, $style_id);
     return $path . fn_basename($style_id);
 }
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:11,代码来源:Patterns.php


示例12: fn_theme_editor_save_style

function fn_theme_editor_save_style($style_id, $style)
{
    $theme_name = fn_get_theme_path('[theme]', 'C');
    if (empty($style_id) && !empty($style['name'])) {
        $style_id = $style['name'];
        Styles::factory($theme_name)->copy(Registry::get('runtime.layout.style_id'), $style_id);
    }
    if (empty($style) || empty($style['data']) || empty($style_id)) {
        return false;
    }
    // Attach patterns
    $uploaded_data = fn_filter_uploaded_data('backgrounds');
    if (!empty($uploaded_data)) {
        $style = Patterns::instance()->save($style_id, $style, $uploaded_data);
    }
    // Save style data
    if (!Styles::factory($theme_name)->update($style_id, $style)) {
        //FIXME: Presets backward compability
        $path = fn_get_theme_path('[relative]/[theme]/styles');
        if (!is_dir($path)) {
            $path = fn_get_theme_path('[relative]/[theme]/presets');
        }
        fn_set_notification('E', __('error'), __('theme_editor.style_data_cannot_be_saved', array('[theme_dir]' => $path)));
        return false;
    }
    fn_theme_editor_set_style($style_id);
    return $style_id;
}
开发者ID:askzap,项目名称:ultimate,代码行数:28,代码来源:theme_editor.php


示例13: getCustomerThemePath

 /**
  * Returns customer theme path
  * @static
  * @return string Path to customer theme folder
  */
 public static function getCustomerThemePath()
 {
     return fn_get_theme_path('[themes]/[theme]/templates/', 'C');
 }
开发者ID:arpad9,项目名称:bygmarket,代码行数:9,代码来源:RenderManager.php


示例14: fn_uninstall_addon_templates

/**
 * Removes addon's templates from theme folder
 *
 * @param string $addon Addon name to remove templates for
 * @return bool Always true
 */
function fn_uninstall_addon_templates($addon)
{
    if (defined('DEVELOPMENT')) {
        return false;
    }
    $installed_themes = fn_get_installed_themes();
    $design_dir = fn_get_theme_path('[themes]/', 'C');
    foreach ($installed_themes as $theme_name) {
        $paths = array($design_dir . $theme_name . '/templates/addons/' . $addon, $design_dir . $theme_name . '/css/addons/' . $addon, $design_dir . $theme_name . '/media/images/addons/' . $addon, $design_dir . $theme_name . '/mail/templates/addons/' . $addon, $design_dir . $theme_name . '/mail/media/images/addons/' . $addon, $design_dir . $theme_name . '/mail/css/addons/' . $addon);
        foreach ($paths as $path) {
            if (is_dir($path)) {
                fn_rm($path);
            }
        }
    }
    return true;
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:23,代码来源:fn.addons.php


示例15: array

}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if ($mode == 'update_storage') {
        if (!empty($_REQUEST['storage_data'])) {
            if (Registry::get('runtime.storage.storage') != $_REQUEST['storage_data']['storage']) {
                $test = Storage::instance('statics', $_REQUEST['storage_data'])->testSettings($_REQUEST['storage_data']);
                $themes = array();
                if ($test === true) {
                    $total = 0;
                    if (fn_allowed_for('ULTIMATE')) {
                        foreach (fn_get_all_companies_ids() as $company_id) {
                            $themes[$company_id] = fn_get_dir_contents(fn_get_theme_path('[themes]', 'C', $company_id));
                            $total += sizeof($themes[$company_id]);
                        }
                    } else {
                        $themes[0] = fn_get_dir_contents(fn_get_theme_path('[themes]', 'C'));
                        $total += sizeof($themes[0]);
                    }
                    $storage = Registry::get('config.storage');
                    unset($storage['statics']);
                    // Do not transfer auto-generated data
                    $total += sizeof($storage);
                    fn_set_progress('parts', $total);
                    // transfer storages
                    foreach ($storage as $type => $options) {
                        $from = Storage::instance($type, Registry::get('runtime.storage'));
                        $to = Storage::instance($type, $_REQUEST['storage_data']);
                        $to->putList($from->getList(''), $from->getAbsolutePath(''), array('overwrite' => true));
                    }
                    Settings::instance()->updateValue('storage', serialize($_REQUEST['storage_data']));
                    fn_clear_cache();
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:31,代码来源:storage.php


示例16: update

 /**
  * Updates or creates layout
  * @param  array $layout_data layout data
  * @param  int   $layout_id   layout ID to update, zero to create
  * @return int   ID of updated/created layout
  */
 public function update($layout_data, $layout_id = 0)
 {
     $create = empty($layout_id);
     if (fn_allowed_for('ULTIMATE')) {
         if (empty($layout_data['company_id'])) {
             $layout_data['company_id'] = $this->_company_id;
         }
     }
     $theme_name = empty($layout_data['theme_name']) ? fn_get_theme_path('[theme]', 'C', $this->_company_id, false) : $layout_data['theme_name'];
     $available_styles = Styles::factory($theme_name)->getList(array('short_info' => true));
     /**
      * Performs actions before updating layout
      *
      * @param object  $this Layout object
      * @param integer $layout_id layout ID
      * @param array   $layout_data layout data
      * @param boolean $create create/update flag
      */
     fn_set_hook('layout_update_pre', $this, $layout_id, $layout_data, $create);
     // Create layout
     if (empty($layout_id)) {
         $company_id = !empty($layout_data['company_id']) ? $layout_data['company_id'] : 0;
         if (!empty($layout_data['from_layout_id'])) {
             $layout_data['style_id'] = Styles::factory($theme_name)->getStyle($layout_data['from_layout_id']);
         }
         if (!empty($layout_data['style_id']) && !isset($available_styles[$layout_data['style_id']])) {
             unset($layout_data['style_id']);
         }
         if (empty($layout_data['style_id'])) {
             $layout_data['style_id'] = Styles::factory($theme_name)->getDefault();
         }
         $layout_id = db_query("INSERT INTO ?:bm_layouts ?e", $layout_data);
     } else {
         if (isset($layout_data['style_id']) && !isset($available_styles[$layout_data['style_id']])) {
             $layout_data['style_id'] = Styles::factory($theme_name)->getDefault();
         }
         $old_layout_data = $this->get($layout_id);
         if ($old_layout_data['is_default'] == 1 && empty($layout_data['is_default'])) {
             $layout_data['is_default'] = 1;
         }
         db_query('UPDATE ?:bm_layouts SET ?u WHERE layout_id = ?i', $layout_data, $layout_id);
     }
     if (!empty($layout_data['is_default'])) {
         $this->setDefault($layout_id);
     }
     if (!empty($layout_data['from_layout_id'])) {
         $this->copyById($layout_data['from_layout_id'], $layout_id);
     }
     return $layout_id;
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:56,代码来源:Layout.php


示例17: setArea

 /**
  * Sets area to display templates from
  * @param string  $area       area name (C,A)
  * @param string  $area_type  area type (can be mail of empty)
  * @param integer $company_id company ID
  */
 public function setArea($area, $area_type = '', $company_id = null)
 {
     if (fn_allowed_for('MULTIVENDOR') && is_null($company_id) && !Registry::get('runtime.company_id')) {
         $company_id = 0;
     }
     if ($area_type == 'mail') {
         $path = fn_get_theme_path('[themes]/[theme]/mail', $area, $company_id);
         $path_rel = fn_get_theme_path('[relative]/[theme]/mail', $area, $company_id);
         if ($area == 'A') {
             $c_prefix = 'backend/mail';
         } else {
             $c_prefix = fn_get_theme_path('[theme]/mail', $area, $company_id);
         }
     } else {
         $path = fn_get_theme_path('[themes]/[theme]', $area, $company_id);
         $path_rel = fn_get_theme_path('[relative]/[theme]', $area, $company_id);
         if ($area == 'A') {
             $c_prefix = 'backend';
         } else {
             $c_prefix = fn_get_theme_path('[theme]', $area, $company_id);
         }
     }
     $suffix = '/templates';
     $this->template_area = $area . (!empty($area_type) ? '_' . $area_type : '');
     $this->setTemplateDir($path . $suffix);
     $this->setConfigDir($path . $suffix);
     $this->_area = $area;
     $this->_area_type = $area_type;
     $compile_dir = Registry::get('config.dir.cache_templates') . $c_prefix;
     if (!is_dir($compile_dir)) {
         if (fn_mkdir($compile_dir) == false) {
             throw new PermissionsException("Can't create templates cache directory: <b>" . $compile_dir . '</b>.<br>Please check if it exists, and has writable permissions.');
         }
     }
     $this->setCompileDir($compile_dir);
     $this->setCacheDir($compile_dir);
     $this->assign('images_dir', Registry::get('config.current_location') . '/' . $path_rel . '/media/images');
     $this->assign('logos', fn_get_logos($company_id));
 }
开发者ID:askzap,项目名称:ultimate,代码行数:45,代码来源:Core.php


示例18: fn_get_customer_layout_theme_path

function fn_get_customer_layout_theme_path()
{
    $company_id = null;
    if (fn_allowed_for('ULTIMATE') && !Registry::get('runtime.company_id')) {
        $company_id = db_get_field("SELECT MIN(company_id) FROM ?:companies");
    }
    $theme_name = fn_get_theme_path('[theme]', 'C', $company_id);
    $theme_path = fn_get_theme_path('[themes]/[theme]', 'C', $company_id);
    return array($theme_path, $theme_name);
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:10,代码来源:fn.catalog.php


示例19: fn_get_logos

     if (!empty($company_id)) {
         $company_data['logos'] = fn_get_logos($company_id);
     }
     Tygh::$app['view']->assign('logo_types', fn_get_logo_types(true));
 }
 $restored_company_data = fn_restore_post_data('company_data');
 if (!empty($restored_company_data) && $mode == 'add') {
     if (!empty($restored_company_data['shippings'])) {
         $restored_company_data['shippings'] = implode(',', $restored_company_data['shippings']);
     }
     $company_data = fn_array_merge($company_data, $restored_company_data);
 }
 if (fn_allowed_for('ULTIMATE')) {
     if ($mode == 'update') {
         $available_themes = fn_get_available_themes(fn_get_theme_path('[theme]', 'C', $company_id));
         $theme_name = fn_get_theme_path('[theme]', 'C', $company_id);
         $layout = Layout::instance($company_id)->getDefault($theme_name);
         $style = Styles::factory($theme_name)->get($layout['style_id']);
         Tygh::$app['view']->assign('current_style', $style);
         Tygh::$app['view']->assign('theme_info', $available_themes['current']);
     }
     $countries_list = fn_get_simple_countries();
     if (!empty($company_data['countries_list'])) {
         if (!is_array($company_data['countries_list'])) {
             $company_countries = explode(',', $company_data['countries_list']);
         } else {
             $company_countries = $company_data['countries_list'];
         }
         $_countries = array();
         foreach ($company_countries as $code) {
             if (isset($countries_list[$code])) {
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:companies.php


示例20: array

        }
        exit;
    }
    return array(CONTROLLER_STATUS_OK, 'themes.manage');
}
if ($mode == 'manage') {
    if (fn_allowed_for('ULTIMATE') && !Registry::get('runtime.company_id')) {
        return array(CONTROLLER_STATUS_OK);
    }
    $available_themes = fn_get_available_themes(Registry::get('settings.theme_name'));
    if (!empty($available_themes['repo']) && !empty($available_themes['installed'])) {
        $available_themes['repo'] = array_diff_key($available_themes['repo'], $available_themes['installed']);
    }
    Tygh::$app['view']->assign('themes_prefix', fn_get_theme_path('[relative]', 'C'));
    Tygh::$app['view']->assign('repo_prefix', fn_get_theme_path('[repo]', 'C'));
    Registry::set('navigation.tabs', array('installed_themes' => array('title' => __('installed_themes'), 'js' => true), 'browse_all_available_themes' => array('title' => __('browse_all_available_themes'), 'js' => true)));
    $theme_name = fn_get_theme_path('[theme]', 'C');
    $layout = Layout::instance()->getDefault($theme_name);
    $style = Styles::factory($theme_name)->get($layout['style_id']);
    $layout['style_name'] = empty($style['name']) ? '' : $style['name'];
    Tygh::$app['view']->assign('layout', $layout);
    foreach ($available_themes['installed'] as $theme_id => $theme) {
        $layouts_params = array('theme_name' => $theme_id);
        $available_themes['installed'][$theme_id]['layouts'] = Layout::instance()->getList($layouts_params);
        if ($theme_id == $theme_name) {
            $available_themes['current']['layouts'] = $available_themes['installed'][$theme_id]['layouts'];
        }
    }
    Tygh::$app['view']->assign('available_themes', $available_themes);
    Tygh::$app['view']->assign('dev_modes', Development::get());
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:themes.php



注:本文中的fn_get_theme_path函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fn_get_translation_languages函数代码示例发布时间:2022-05-15
下一篇:
PHP fn_get_storage_data函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap