当前位置: 首页>>代码示例>>PHP>>正文


PHP fn_get_theme_path函数代码示例

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


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


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