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


PHP Skin::disp_skinshot方法代码示例

本文整理汇总了PHP中Skin::disp_skinshot方法的典型用法代码示例。如果您正苦于以下问题:PHP Skin::disp_skinshot方法的具体用法?PHP Skin::disp_skinshot怎么用?PHP Skin::disp_skinshot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Skin的用法示例。


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

示例1: display_skin_fieldset

/**
 * Display a blog skin setting fieldset which can be normal, mobile or tablet ( used on _coll_skin_settings.form.php )
 *
 * @param object Form
 * @param integer skin ID
 * @param array display params
 */
function display_skin_fieldset(&$Form, $skin_ID, $display_params)
{
    $Form->begin_fieldset($display_params['fieldset_title'] . get_manual_link('blog_skin_settings') . ' ' . $display_params['fieldset_links']);
    if (!$skin_ID) {
        // The skin ID is empty use the same as normal skin ID
        echo '<div style="font-weight:bold;padding:0.5ex;">' . T_('Same as normal skin.') . '</div>';
    } else {
        $SkinCache =& get_SkinCache();
        $edited_Skin = $SkinCache->get_by_ID($skin_ID);
        echo '<div class="skin_settings well">';
        $disp_params = array('skinshot_class' => 'coll_settings_skinshot');
        Skin::disp_skinshot($edited_Skin->folder, $edited_Skin->name, $disp_params);
        // Skin name
        echo '<div class="skin_setting_row">';
        echo '<label>' . T_('Skin name') . ':</label>';
        echo '<span>' . $edited_Skin->name . '</span>';
        echo '</div>';
        if (isset($edited_Skin->version)) {
            // Skin version
            echo '<div class="skin_setting_row">';
            echo '<label>' . T_('Skin version') . ':</label>';
            echo '<span>' . $edited_Skin->version . '</span>';
            echo '</div>';
        }
        // Skin type
        echo '<div class="skin_setting_row">';
        echo '<label>' . T_('Skin type') . ':</label>';
        echo '<span>' . $edited_Skin->type . '</span>';
        echo '</div>';
        // Containers
        if ($skin_containers = $edited_Skin->get_containers()) {
            $container_ul = '<ul><li>' . implode('</li><li>', $skin_containers) . '</li></ul>';
        } else {
            $container_ul = '-';
        }
        echo '<div class="skin_setting_row">';
        echo '<label>' . T_('Containers') . ':</label>';
        echo '<span>' . $container_ul . '</span>';
        echo '</div>';
        echo '</div>';
        echo '<div class="skin_settings_form">';
        $skin_params = $edited_Skin->get_param_definitions($tmp_params = array('for_editing' => true));
        if (empty($skin_params)) {
            // Advertise this feature!!
            echo '<p>' . T_('This skin does not provide any configurable settings.') . '</p>';
        } else {
            load_funcs('plugins/_plugin.funcs.php');
            // Check if skin settings contain at least one fieldset
            $skin_fieldsets_exist = false;
            foreach ($skin_params as $l_name => $l_meta) {
                if (isset($l_meta['layout']) && $l_meta['layout'] == 'begin_fieldset') {
                    $skin_fieldsets_exist = true;
                    break;
                }
            }
            if (!$skin_fieldsets_exist) {
                // Enclose all skin settings in single group if no group on the skin
                array_unshift($skin_params, array('layout' => 'begin_fieldset', 'label' => T_('Skin settings')));
                array_push($skin_params, array('layout' => 'end_fieldset'));
            }
            // Loop through all widget params:
            foreach ($skin_params as $l_name => $l_meta) {
                // Display field:
                autoform_display_field($l_name, $l_meta, $Form, 'Skin', $edited_Skin);
            }
        }
        echo '</div>';
    }
    $Form->end_fieldset();
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:77,代码来源:_skin.funcs.php

示例2: rawurlencode

$current_skin_ID = $edited_Blog->get_setting($skin_type . '_skin_ID', true);
if ($current_User->check_perm('options', 'edit', false)) {
    // We have permission to modify:
    $block_item_Widget->global_icon(T_('Install new skin...'), 'new', $dispatcher . '?ctrl=skins&amp;action=new&amp;redirect_to=' . rawurlencode(url_rel_to_same_host(regenerate_url('', 'skinpage=selection', '', '&'), $admin_url)), T_('Install new'), 3, 4);
    $block_item_Widget->global_icon(T_('Keep current skin!'), 'close', regenerate_url('skinpage'), ' ' . T_('Don\'t change'), 3, 4);
}
$block_item_Widget->disp_template_replaced('block_start');
$SkinCache =& get_SkinCache();
$SkinCache->load_all();
if ($display_same_as_normal) {
    $skinshot_title = T_('Same as normal skin');
    $select_url = '?ctrl=coll_settings&tab=skin&blog=' . $edited_Blog->ID . '&amp;action=update&amp;skinpage=selection&amp;' . $skin_type . '_skin_ID=0&amp;' . url_crumb('collection');
    $disp_params = array('function' => 'select', 'selected' => $current_skin_ID == '0', 'select_url' => $select_url);
    Skin::disp_skinshot($skinshot_title, $skinshot_title, $disp_params);
}
$SkinCache->rewind();
while (($iterator_Skin =& $SkinCache->get_next()) != NULL) {
    if ($iterator_Skin->type != $skin_type) {
        // This skin cannot be used here...
        continue;
    }
    $selected = $current_skin_ID == $iterator_Skin->ID;
    $blog_skin_param = $skin_type . '_skin_ID=';
    $select_url = '?ctrl=coll_settings&tab=skin&blog=' . $edited_Blog->ID . '&amp;action=update&amp;skinpage=selection&amp;' . $blog_skin_param . $iterator_Skin->ID . '&amp;' . url_crumb('collection');
    $preview_url = url_add_param($edited_Blog->gen_blogurl(), 'tempskin=' . rawurlencode($iterator_Skin->folder));
    $disp_params = array('function' => 'select', 'selected' => $selected, 'select_url' => $select_url, 'function_url' => $preview_url);
    // Display skinshot:
    Skin::disp_skinshot($iterator_Skin->folder, $iterator_Skin->name, $disp_params);
}
echo '<div class="clear"></div>';
$block_item_Widget->disp_template_replaced('block_end');
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_coll_skin.view.php

示例3: die

 *
 * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
 * See also {@link http://sourceforge.net/projects/evocms/}.
 *
 * @copyright (c)2003-2013 by Francois Planque - {@link http://fplanque.com/}.
 *
 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
 *
 * @package admin
 *
 * @version $Id: _coll_sel_skin.view.php 3328 2013-03-26 11:44:11Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $kind;
echo '<h2>' . sprintf(T_('New %s'), get_collection_kinds($kind)) . ':</h2>';
echo '<h3>' . T_('Pick a skin:') . '</h3>';
$SkinCache =& get_SkinCache();
$SkinCache->load_all();
// TODO: this is like touching private parts :>
foreach ($SkinCache->cache as $Skin) {
    if ($Skin->type != 'normal') {
        // This skin cannot be used here...
        continue;
    }
    $disp_params = array('function' => 'pick', 'select_url' => '?ctrl=collections&amp;action=new-name&amp;kind=' . $kind . '&amp;skin_ID=' . $Skin->ID);
    // Display skinshot:
    Skin::disp_skinshot($Skin->folder, $Skin->name, $disp_params);
}
echo '<div class="clear"></div>';
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_coll_sel_skin.view.php

示例4: Form

/**
 * @var Skin
 */
global $edited_Skin;
$Form = new Form(NULL, 'skin_checkchanges');
$Form->global_icon(T_('Uninstall this skin!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('skin')));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', T_('Skin properties'));
$Form->add_crumb('skin');
$Form->hidden_ctrl();
$Form->hidden('action', 'update');
$Form->hidden('skin_ID', $edited_Skin->ID);
$Form->begin_fieldset(T_('Skin properties') . get_manual_link('skin-system-settings'));
echo '<div class="skin_settings well">';
$disp_params = array('skinshot_class' => 'coll_settings_skinshot');
Skin::disp_skinshot($edited_Skin->folder, $edited_Skin->name, $disp_params);
// Skin name
echo '<div class="skin_setting_row">';
echo '<label>' . T_('Skin name') . ':</label>';
echo '<span>' . $edited_Skin->name . '</span>';
echo '</div>';
if (isset($edited_Skin->version)) {
    // Skin version
    echo '<div class="skin_setting_row">';
    echo '<label>' . T_('Skin version') . ':</label>';
    echo '<span>' . $edited_Skin->version . '</span>';
    echo '</div>';
}
// Skin type
echo '<div class="skin_setting_row">';
echo '<label>' . T_('Skin type') . ':</label>';
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_skin.form.php

示例5: die

 * @author fplanque: Francois PLANQUE.
 *
 * @version $Id: _skin.form.php 3328 2013-03-26 11:44:11Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Skin
 */
global $edited_Skin;
$Form = new Form(NULL, 'skin_checkchanges');
$Form->global_icon(T_('Uninstall this skin!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('skin')));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', T_('Skin properties'));
$Form->add_crumb('skin');
$Form->hidden_ctrl();
$Form->hidden('action', 'update');
$Form->hidden('skin_ID', $edited_Skin->ID);
$Form->begin_fieldset(T_('Skin properties'));
Skin::disp_skinshot($edited_Skin->folder, $edited_Skin->name);
$Form->text_input('skin_name', $edited_Skin->name, 32, T_('Skin name'), T_('As seen by blog owners'), array('required' => true));
$Form->radio('skin_type', $edited_Skin->type, array(array('normal', T_('Normal'), T_('Normal skin for general browsing')), array('mobile', T_('Mobile'), T_('Mobile skin for mobile phones browsers')), array('tablet', T_('Tablet'), T_('Tablet skin for tablet browsers')), array('feed', T_('XML Feed'), T_('Special system skin for XML feeds like RSS and Atom')), array('sitemap', T_('XML Sitemap'), T_('Special system skin for XML sitemaps'))), T_('Skin type'), true);
if ($skin_containers = $edited_Skin->get_containers()) {
    $container_ul = '<ul><li>' . implode('</li><li>', $skin_containers) . '</li></ul>';
} else {
    $container_ul = '-';
}
$Form->info(T_('Containers'), $container_ul);
$Form->end_fieldset();
$Form->end_form(array(array('submit', 'submit', T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_skin.form.php

示例6: display_skin_fieldset

/**
 * Display a blog skin setting fieldset which can be normal, mobile or tablet ( used on _coll_skin_settings.form.php )
 *
 * @param object Form
 * @param integer skin ID
 * @param array display params
 */
function display_skin_fieldset(&$Form, $skin_ID, $display_params)
{
    $Form->begin_fieldset($display_params['fieldset_title'] . get_manual_link('blog_skin_settings') . ' ' . $display_params['fieldset_links']);
    if (!$skin_ID) {
        // The skin ID is empty use the same as normal skin ID
        echo '<div style="font-weight:bold;padding:0.5ex;">' . T_('Same as normal skin.') . '</div>';
    } else {
        $SkinCache =& get_SkinCache();
        $edited_Skin = $SkinCache->get_by_ID($skin_ID);
        echo '<div style="float:left;width:30%">';
        $disp_params = array('skinshot_class' => 'coll_settings_skinshot');
        Skin::disp_skinshot($edited_Skin->folder, $edited_Skin->name, $disp_params);
        $Form->info(T_('Skin name'), $edited_Skin->name);
        if (isset($edited_Skin->version)) {
            $Form->info(T_('Skin version'), $edited_Skin->version);
        }
        $Form->info(T_('Skin type'), $edited_Skin->type);
        if ($skin_containers = $edited_Skin->get_containers()) {
            $container_ul = '<ul><li>' . implode('</li><li>', $skin_containers) . '</li></ul>';
        } else {
            $container_ul = '-';
        }
        $Form->info(T_('Containers'), $container_ul);
        echo '</div>';
        echo '<div style="margin-left:30%">';
        $skin_params = $edited_Skin->get_param_definitions($tmp_params = array('for_editing' => true));
        if (empty($skin_params)) {
            // Advertise this feature!!
            echo '<p>' . T_('This skin does not provide any configurable settings.') . '</p>';
        } else {
            load_funcs('plugins/_plugin.funcs.php');
            // Loop through all widget params:
            foreach ($skin_params as $l_name => $l_meta) {
                // Display field:
                autoform_display_field($l_name, $l_meta, $Form, 'Skin', $edited_Skin);
            }
        }
        echo '</div>';
    }
    $Form->end_fieldset();
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:48,代码来源:_skin.funcs.php

示例7: die

 *
 * @author fplanque: Francois PLANQUE.
 *
 * @version $Id: _skin.form.php,v 1.3 2008/01/21 09:35:35 fplanque Exp $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Skin
 */
global $edited_Skin;
$Form =& new Form(NULL, 'skin_checkchanges');
$Form->global_icon(T_('Uninstall this skin!'), 'delete', regenerate_url('action', 'action=delete'));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', T_('Skin properties'));
$Form->hidden_ctrl();
$Form->hidden('action', 'update');
$Form->hidden('skin_ID', $edited_Skin->ID);
$Form->begin_fieldset(T_('Skin properties'));
Skin::disp_skinshot($edited_Skin->folder);
$Form->text_input('skin_name', $edited_Skin->name, 32, T_('Skin name'), T_('As seen by blog owners'), array('required' => true));
$Form->radio('skin_type', $edited_Skin->type, array(array('normal', T_('Normal'), T_('Normal skin for general browsing')), array('feed', T_('XML Feed'), T_('Special system skin for XML feeds like RSS and Atom'))), T_('Skin type'), true);
if ($skin_containers = $edited_Skin->get_containers()) {
    $container_ul = '<ul><li>' . implode('</li><li>', $skin_containers) . '</li></ul>';
} else {
    $container_ul = '-';
}
$Form->info(T_('Containers'), $container_ul);
$Form->end_fieldset();
$Form->end_form(array(array('submit', 'submit', T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
开发者ID:LFSF,项目名称:oras,代码行数:31,代码来源:_skin.form.php

示例8: die

    die('Please, do not access this page directly.');
}
/**
 * @var Blog
 */
global $edited_Blog;
global $admin_url;
$block_item_Widget =& new Widget('block_item');
$block_item_Widget->title = T_('Choose a skin');
if ($current_User->check_perm('options', 'edit', false)) {
    // We have permission to modify:
    $block_item_Widget->global_icon(T_('Manage installed skins...'), 'properties', 'admin.php?ctrl=skins', T_('Manage skins'), 3, 4);
    $block_item_Widget->global_icon(T_('Install new skin...'), 'new', 'admin.php?ctrl=skins&amp;action=new&amp;redirect_to=' . rawurlencode(url_rel_to_same_host(regenerate_url('', '', '', '&'), $admin_url)), T_('Install new'), 3, 4);
}
$block_item_Widget->disp_template_replaced('block_start');
$SkinCache =& get_Cache('SkinCache');
$SkinCache->load_all();
// TODO: this is like touching private parts :>
foreach ($SkinCache->cache as $Skin) {
    if ($Skin->type != 'normal') {
        // This skin cannot be used here...
        continue;
    }
    $selected = $edited_Blog->skin_ID == $Skin->ID;
    $select_url = '?ctrl=coll_settings&tab=skin&blog=' . $edited_Blog->ID . '&amp;action=update&amp;blog_skin_ID=' . $Skin->ID;
    $preview_url = url_add_param($edited_Blog->gen_blogurl(), 'tempskin=' . rawurlencode($Skin->folder));
    // Display skinshot:
    Skin::disp_skinshot($Skin->folder, 'select', $selected, $select_url, $preview_url);
}
echo '<div class="clear"></div>';
$block_item_Widget->disp_template_replaced('block_end');
开发者ID:LFSF,项目名称:oras,代码行数:31,代码来源:_coll_skin.view.php

示例9: empty

    } else {
        // Skin class seems fine...
        if (!empty($skin_type) && $folder_Skin->type != $skin_type) {
            // Filter skin by selected type:
            continue;
        }
        $redirect_to_after_install = $redirect_to;
        $skin_compatible = empty($kind) || $folder_Skin->type == 'normal';
        if (!empty($kind) && $skin_compatible) {
            // If we are installing skin for a new collection we're currently creating:
            $redirect_to_after_install = $admin_url . '?ctrl=collections&action=new-name&kind=' . $kind . '&skin_ID=$skin_ID$';
        }
        $disp_params = array('function' => 'install', 'function_url' => $admin_url . '?ctrl=skins&amp;action=create&amp;skin_folder=' . rawurlencode($skin_folder) . '&amp;redirect_to=' . rawurlencode($redirect_to_after_install) . '&amp;' . url_crumb('skin'), 'skin_compatible' => $skin_compatible);
    }
    // Display skinshot:
    Skin::disp_skinshot($skin_folder, $skin_folder, $disp_params);
    $skins_exist = true;
}
echo '<div class="clear"></div>';
echo '</div>';
if ($skins_exist && empty($kind)) {
    // Display form buttons only when at least one skin exists for installation
    $form_buttons = array(array('type' => 'button', 'id' => 'check_all_skins', 'value' => T_('Check All'), 'class' => 'btn btn-default'), array('type' => 'submit', 'value' => T_('Install Checked'), 'class' => 'btn btn-primary'));
} else {
    $form_buttons = array();
}
$Form->end_form($form_buttons);
$block_item_Widget->disp_template_replaced('block_end');
?>
<script type="text/javascript">
jQuery( '#check_all_skins' ).click( function() {
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_skin_list_available.view.php

示例10: die

    die('Please, do not access this page directly.');
}
global $skins_path;
global $redirect_to;
/**
 * @var SkinCache
 */
$SkinCache =& get_Cache('SkinCache');
$SkinCache->load_all();
$block_item_Widget =& new Widget('block_item');
$block_item_Widget->title = T_('Skins available for installation');
if ($current_User->check_perm('options', 'edit', false)) {
    // We have permission to modify:
    $block_item_Widget->global_icon(T_('Cancel install!'), 'close', $redirect_to);
}
$block_item_Widget->disp_template_replaced('block_start');
$skin_folders = get_filenames($skins_path, false, true, true, false, true);
foreach ($skin_folders as $skin_folder) {
    if (!strlen($skin_folder) || $skin_folder[0] == '.' || $skin_folder == 'CVS') {
        continue;
    }
    if ($SkinCache->get_by_folder($skin_folder, false)) {
        // Already installed...
        continue;
    }
    // Display skinshot:
    $function_url = '?ctrl=skins&amp;action=create&amp;skin_folder=' . rawurlencode($skin_folder) . '&amp;redirect_to=' . rawurlencode($redirect_to);
    Skin::disp_skinshot($skin_folder, 'install', false, NULL, $function_url);
}
echo '<div class="clear"></div>';
$block_item_Widget->disp_template_replaced('block_end');
开发者ID:LFSF,项目名称:oras,代码行数:31,代码来源:_skin_list_available.view.php

示例11: die

 * This file implements the UI view for the skin selection when creating a blog.
 *
 * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
 * See also {@link http://sourceforge.net/projects/evocms/}.
 *
 * @copyright (c)2003-2008 by Francois PLANQUE - {@link http://fplanque.net/}.
 *
 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
 *
 * @package admin
 *
 * @version $Id: _coll_sel_skin.view.php,v 1.2 2008/01/21 09:35:35 fplanque Exp $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $kind;
echo '<h2>' . sprintf(T_('New %s'), Blog::kind_name($kind)) . ':</h2>';
echo '<h3>' . T_('Pick a skin:') . '</h3>';
$SkinCache =& get_Cache('SkinCache');
$SkinCache->load_all();
// TODO: this is like touching private parts :>
foreach ($SkinCache->cache as $Skin) {
    if ($Skin->type != 'normal') {
        // This skin cannot be used here...
        continue;
    }
    // Display skinshot:
    Skin::disp_skinshot($Skin->folder, 'pick', false, '?ctrl=collections&amp;action=new-name&amp;kind=' . $kind . '&amp;skin_ID=' . $Skin->ID);
}
echo '<div class="clear"></div>';
开发者ID:LFSF,项目名称:oras,代码行数:31,代码来源:_coll_sel_skin.view.php


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