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


PHP get_filename_id函数代码示例

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


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

示例1: loadPluginData

/**
 * Initialize plugins data
 * create GSPLUGINSFILE if not exist
 * else load in plugins and register the inactive ones
 *
 * @since  3.4
*/
function loadPluginData()
{
    global $live_plugins, $plugin_info, $live_plugins;
    $live_plugins = array();
    $plugin_info = array();
    // Check if data\other\plugins.xml exists
    if (!file_exists(GSDATAOTHERPATH . getDef('GSPLUGINSFILE'))) {
        create_pluginsxml();
        registerInactivePlugins(get_filename_id() == 'plugins');
        return true;
    }
    read_pluginsxml();
    // get the live plugins into $live_plugins array
    if (!is_frontend()) {
        create_pluginsxml(get_filename_id() == 'plugins');
    }
    // only on backend check that plugin files have not changed, and regen
    registerInactivePlugins();
    if (getDef('GSPLUGINORDER', true)) {
        $reorderplugins = explode(',', getDef('GSPLUGINORDER'));
        debugLog("reorder plugins" . print_r($reorderplugins, true));
        $reorderplugins = array_reverse($reorderplugins);
        foreach ($reorderplugins as $reorderplugin) {
            $live_plugins = array($reorderplugin => $live_plugins[$reorderplugin]) + $live_plugins;
        }
    }
    return true;
}
开发者ID:HelgeSverre,项目名称:GetSimpleCMS,代码行数:35,代码来源:plugin_functions.php

示例2: loadPluginData

/**
 * Include any plugins, depending on where the referring 
 * file that calls it we need to set the correct paths. 
 *
 * @since  3.4.0
 * @uses  $live_plugins
*/
function loadPluginData()
{
    if (file_exists(GSPLUGINPATH)) {
        $pluginfiles = getFiles(GSPLUGINPATH);
    }
    // Check if data\other\plugins.xml exists
    if (!file_exists(GSDATAOTHERPATH . "plugins.xml")) {
        create_pluginsxml();
        registerInactivePlugins(get_filename_id() == 'plugins');
        return true;
    }
    read_pluginsxml();
    // get the live plugins into $live_plugins array
    if (!is_frontend()) {
        create_pluginsxml(get_filename_id() == 'plugins');
    }
    // only on backend check that plugin files have not changed, and regen
    registerInactivePlugins();
    return true;
}
开发者ID:promil23,项目名称:GetSimpleCMS,代码行数:27,代码来源:plugin_functions.php

示例3: cl

<h1 class="sitename"><a href="<?php 
echo $SITEURL;
?>
" target="_blank" ><?php 
echo cl($SITENAME);
?>
 <i class="icon fa fa-external-link"></i></a></h1>
<ul class="nav <?php 
echo $plugin_class;
?>
">

<?php 
$tabs = explode(',', getDef('GSTABS'));
// $tabs  = array_keys($sidemenudefinition); // debug all
$current = get_filename_id();
// if current tab is not in GSTABS, then set its parent tab as current
if (!in_array($current, $tabs)) {
    if (isset($sidemenudefinition[$current]) && !empty($sidemenudefinition[$current])) {
        $current = $sidemenudefinition[$current];
    }
}
if ($tabs) {
    foreach ($tabs as $tab) {
        if (empty($tab)) {
            continue;
        }
        $tabtitle = i18n_r('TAB_' . uppercase($tab));
        $class = $tab == $current ? ' current' : '';
        echo '<li id="nav_' . $tab . '" ><a class="' . $tab . $class . '" href="' . $tab . '.php" accesskey="' . find_accesskey($tabtitle) . '" >' . $tabtitle . '</a></li>';
    }
开发者ID:kix23,项目名称:GetSimpleCMS,代码行数:31,代码来源:include-nav.php

示例4: die

if (!defined('IN_GS')) {
    die('you cannot load this page directly.');
}
/**
 * Error Checking
 *
 * Displays error and success messages
 *
 * @package GetSimple
 *
 * You can pass $update(global) directly if not using a redirrect and querystring
 *
 */
// do not use these alerts if ajax requests as they will not be seen, and interfere with other alerts
if (!requestIsAjax() && file_exists(GSUSERSPATH . _id($USR) . ".xml.reset") && get_filename_id() != 'index' && get_filename_id() != 'resetpassword') {
    doNotify(sprintf(i18n_r('ER_PWD_CHANGE'), 'profile.php'), 'error');
}
if (!requestIsAjax() && (!defined('GSNOAPACHECHECK') || GSNOAPACHECHECK == false) and !server_is_apache()) {
    doNotify(i18n_r('WARNING') . ': <a href="health-check.php">' . i18n_r('SERVER_SETUP') . ' non-Apache</a>', 'info');
}
if (!isset($update)) {
    $update = '';
}
if (isset($_GET['upd'])) {
    $update = var_in($_GET['upd']);
}
if (isset($_GET['success'])) {
    $success = var_in($_GET['success']);
}
if (isset($_GET['error'])) {
开发者ID:promil23,项目名称:GetSimpleCMS,代码行数:30,代码来源:error_checking.php

示例5: find_accesskey

/**
 * Navigation Include Template
 *
 * @package GetSimple
 */
$debugInfoUrl = 'http://get-simple.info/docs/debugging';
if (cookie_check()) {
    echo '<ul id="pill"><li class="leftnav"><a href="logout.php" accesskey="' . find_accesskey(i18n_r('TAB_LOGOUT')) . '" >' . i18n_r('TAB_LOGOUT') . '</a></li>';
    if (isDebug()) {
        echo '<li class="debug"><a href="' . $debugInfoUrl . '" target="_blank">' . i18n_r('DEBUG_MODE') . '</a></li>';
    }
    echo '<li class="rightnav" ><a href="settings.php#profile">' . i18n_r('WELCOME') . ' <strong>' . $USR . '</strong>!</a></li></ul>';
}
//determine page type if plugin is being shown
if (get_filename_id() == 'load') {
    $plugin_class = $plugin_info[$plugin_id]['page_type'];
} else {
    $plugin_class = '';
}
?>
<h1 id="sitename"><a href="<?php 
echo $SITEURL;
?>
" target="_blank" ><?php 
echo cl($SITENAME);
?>
</a></h1>
<ul class="nav <?php 
echo $plugin_class;
?>
开发者ID:elephantcode,项目名称:elephantcode,代码行数:30,代码来源:include-nav.php

示例6: returnJsArray

if (getGlobal('EDTOOL')) {
    echo ",toolbar: " . returnJsArray(getGlobal('EDTOOL'));
}
if (getGlobal('EDOPTIONS')) {
    echo ',' . trim(getGlobal('EDOPTIONS'));
}
?>
        };

        // wipe the ckeditor shim, so it does not interfere with the real one
        if(typeof CKEDITOR !== 'undefined'){
            if(CKEDITOR.SHIM == true) CKEDITOR = null;
        }

       <?php 
if (get_filename_id() == 'snippets') {
    echo "htmlEditorConfig.height = '130px';";
}
?>

    </script>

	<?php 
// load scripts after globals set
get_scripts_backend();
?>
    <script type="text/javascript">
		jQuery(document).ready(function () {
			// disable page editing during safemode
	       	$('body#edit.safemode :input').prop("disabled", true);
	    });
开发者ID:kix23,项目名称:GetSimpleCMS,代码行数:31,代码来源:header.php

示例7: die

if (!defined('IN_GS')) {
    die('you cannot load this page directly.');
}
/****************************************************
*
* @File:  caching_functions.php
* @Package: GetSimple
* @since 3.1
* @Action:  Plugin to create pages.xml and new functions  
*
*****************************************************/
$pagesArray = array();
add_action('index-header', 'getPagesXmlValues', array(false));
// make $pagesArray available to the front
add_action('header', 'getPagesXmlValues', array(get_filename_id() != 'pages'));
// make $pagesArray available to the back
add_action('page-delete', 'create_pagesxml', array(true));
// Create pages.array if page deleted
add_action('page-restored', 'create_pagesxml', array(true));
// Create pages.array if page undo
add_action('changedata-aftersave', 'create_pagesxml', array(true));
// Create pages.array if page is updated
/**
 * Get Page Content
 *
 * Retrieve and display the content of the requested page. 
 * As the Content is not cahed the file is read in.
 *
 * @since 2.0
 * @param $page - slug of the page to retrieve content
开发者ID:Kevinf63,项目名称:KevPortfolio,代码行数:30,代码来源:caching_functions.php

示例8: check_menu

	<?php 
if (!getDef('GSNOSITEMAP')) {
    ?>
 <li id="sb_sitemap" class="last_sb"><a href="sitemap.php" <?php 
    check_menu('sitemap');
    ?>
 accesskey="<?php 
    echo find_accesskey(i18n_r('SIDE_VIEW_SITEMAP'));
    ?>
" ><?php 
    i18n('SIDE_VIEW_SITEMAP');
    ?>
</a></li> <?php 
}
?>
	<?php 
exec_action("theme-sidebar");
?>
</ul>

<?php 
if (get_filename_id() === 'components' || get_filename_id() === 'theme-edit') {
    ?>
<p id="js_submit_line" ></p>
<?php 
}
?>



开发者ID:promil23,项目名称:GetSimpleCMS,代码行数:27,代码来源:sidebar-theme.php

示例9: loadPluginData

    }
    // @callout plugin_preload_callout callout before loading plugin files
    // Include plugins files in global scope
    loadPluginData();
    foreach ($live_plugins as $file => $en) {
        if ($en == 'true' && file_exists(GSPLUGINPATH . $file)) {
            // debugLog('including plugin: ' . $file);
            include_once GSPLUGINPATH . $file;
            exec_action('plugin-loaded');
            // @hook plugin-loaded called after each plugin is included
        }
    }
    exec_action('plugins-loaded');
    // @hook plugins-loaded plugin files have been included
    // load api
    if (get_filename_id() == 'settings' || get_filename_id() == 'load') {
        /* this core plugin only needs to be visible when you are viewing the
        		settings page since that is where its sidebar item is. */
        if (getDef('GSEXTAPI', true)) {
            include_once 'api.plugin.php';
        }
    }
    # main hook for common.php
    exec_action('common');
    // @hook common common.php has completed loading resoruces, base not yet loaded
    // debugLog('calling common_callout');
    if (function_exists('common_callout')) {
        common_callout();
    }
    // @callout common_callout callout after common loaded, before templating
}
开发者ID:kix23,项目名称:GetSimpleCMS,代码行数:31,代码来源:common.php

示例10: array

*
* @File:  shortcodes.php
* @Action:  Port of WP Shortcodes to GS  
*
*****************************************************/
$shortcode_tags = array();
// Shortcode tags array
$shortcode_info = array();
// Shortcode tags array
# get correct id for plugin
$thisfile = basename(__FILE__, ".php");
# register plugin
register_plugin($thisfile, 'Shortcodes', '1.1', 'Mike Swan', 'http://www.digimute.com/', 'Shortcodes for GS', 'plugins', 'shortcodes_show');
# activate hooks
add_action('plugins-sidebar', 'createSideMenu', array($thisfile, 'Shortcode Info'));
if (get_filename_id() == "edit") {
    add_action('edit-extras', 'insertJS', array());
}
function insertJS()
{
    global $shortcode_tags;
    global $shortcode_info;
    echo "<script type=\"text/javascript\">";
    echo "jQuery(document).ready(function() { ";
    $js = "<div style='width:100%;background-color:#efefef;height:36px;margin-bottom:5px;'>";
    $js .= "<h2 style='padding-top:5px;padding-left:5px;color:#222;'>[shortcodes]";
    $js .= "<select style='width:300px;margin-left:30px;font-family:courier;font-size:11px;' id='shortcode_value'>";
    while (list($key, $val) = each($shortcode_tags)) {
        $js .= '<option >' . $key . ' - ' . str_replace("\"", "'", $shortcode_info[$key]) . '</option>';
    }
    $js .= "</select><input id='shorcode_insert' style='margin-left:15px;' type='button' value=' insert ' /></h2></div>";
开发者ID:n00dles,项目名称:gs_shortcodes,代码行数:31,代码来源:gs_shortcodes.php

示例11: basename

Plugin Name: Innovation Theme Settings
Description: Settings for the default GetSimple Theme: Innovation
Version: 1.2
Author: Chris Cagle
Author URI: http://chriscagle.me
*/
# get correct id for plugin
$thisfile_innov = basename(__FILE__, ".php");
$innovation_file = GSDATAOTHERPATH . 'InnovationSettings.xml';
# add in this plugin's language file
i18n_merge($thisfile_innov) || i18n_merge($thisfile_innov, 'en_US');
# register plugin
register_plugin($thisfile_innov, i18n_r($thisfile_innov . '/INNOVATION_TITLE'), '1.2', 'Chris Cagle', 'http://chriscagle.me', i18n_r($thisfile_innov . '/INNOVATION_DESC'), 'theme', 'innovation_show');
# hooks
# enable side menu is theme is innovation or on theme page and enabling innovation, handle plugin exec before global is set
if (($TEMPLATE == "Innovation" || get_filename_id() == 'theme' && isset($_POST['template']) && $_POST['template'] == 'Innovation') && !($TEMPLATE == "Innovation" && get_filename_id() == 'theme' && isset($_POST['template']) && $_POST['template'] != 'Innovation')) {
    add_action('theme-sidebar', 'createSideMenu', array($thisfile_innov, i18n_r($thisfile_innov . '/INNOVATION_TITLE')));
}
$services = array('facebook', 'googleplus', 'twitter', 'linkedin', 'tumblr', 'instagram', 'youtube', 'vimeo', 'github');
# get XML data
if (file_exists($innovation_file)) {
    $innovation_data = getXML($innovation_file);
}
function innovation_show()
{
    global $services, $innovation_file, $innovation_data, $thisfile_innov;
    $success = $error = null;
    // submitted form
    if (isset($_POST['submit'])) {
        foreach ($services as $var) {
            if ($_POST[$var] != '') {
开发者ID:Foltys,项目名称:Masopust,代码行数:31,代码来源:InnovationPlugin.php

示例12: isAuthPage

/**
 * Check if a page is a public admin page
 * @return boolean true if page is non protected admin page
 */
function isAuthPage()
{
    $page = get_filename_id();
    return $page == 'index' || $page == 'resetpassword';
}
开发者ID:kix23,项目名称:GetSimpleCMS,代码行数:9,代码来源:template_functions.php

示例13: nm_update_extend_cache

function nm_update_extend_cache()
{
    if (!is_frontend() && get_filename_id() == 'plugins') {
        include GSADMININCPATH . 'configuration.php';
        $url = $site_link_back_url . 'api/extend/?id=541';
        $tempfile = GSCACHEPATH . md5($url) . '.txt';
        $cachefile = GSCACHEPATH . md5($site_link_back_url . 'api/extend/?file=news_manager.php') . '.txt';
        get_api_details('custom', $url);
        if (file_exists($cachefile)) {
            unlink($cachefile);
        }
        @copy($tempfile, $cachefile);
    }
}
开发者ID:Vin985,项目名称:clqweb,代码行数:14,代码来源:functions.php

示例14: get_scripts_backend

</p>
      	</div>
      	<div class="gslogo" >
	      	<a href="http://makingsolutions.net/" target="_blank" ><img src="http://makingsolutions.net/logo.jpg" alt="" /></a>
	      </div>
      	<div class="clear"></div>
      	<?php 
if (get_filename_id() != 'index') {
    get_scripts_backend(TRUE);
    exec_action('footer');
}
?>

		</div><!-- end #footer -->
		<?php 
if (get_filename_id() != 'index') {
    if (defined('GSDEBUG')) {
        global $GS_debug;
        echo '<h2>' . i18n_r('DEBUG_CONSOLE') . '</h2><div id="gsdebug">';
        echo '<pre>';
        foreach ($GS_debug as $log) {
            print $log . '<br/>';
        }
        echo '</pre>';
        echo '</div>';
    }
}
?>
	</div><!-- end .wrapper -->
	
	
开发者ID:Emmett-Brown,项目名称:linea,代码行数:29,代码来源:footer.php

示例15: create_pluginsxml

    create_pluginsxml();
}
read_pluginsxml();
// get the live plugins into $live_plugins array
if (!is_frontend()) {
    create_pluginsxml();
}
// check that plugins have not been removed or added to the directory
// load each of the plugins
foreach ($live_plugins as $file => $en) {
    $pluginsLoaded = true;
    # debugLog("plugin: $file" . " exists: " . file_exists(GSPLUGINPATH . $file) ." enabled: " . $en);
    if ($en == 'true' && file_exists(GSPLUGINPATH . $file)) {
        require_once GSPLUGINPATH . $file;
    } else {
        if (!is_frontend() and get_filename_id() == 'plugins') {
            $apiback = get_api_details('plugin', $file, getDef('GSNOPLUGINCHECK', true));
            $response = json_decode($apiback);
            if ($response and $response->status == 'successful') {
                register_plugin(pathinfo_filename($file), $file, 'disabled', $response->owner, '', i18n_r('PLUGIN_DISABLED'), '', '');
            } else {
                register_plugin(pathinfo_filename($file), $file, 'disabled', 'Unknown', '', i18n_r('PLUGIN_DISABLED'), '', '');
            }
        } else {
            register_plugin(pathinfo_filename($file), $file, 'disabled', 'Unknown', '', i18n_r('PLUGIN_DISABLED'), '', '');
        }
    }
}
/**
 * change_plugin
 * 
开发者ID:elephantcode,项目名称:elephantcode,代码行数:31,代码来源:plugin_functions.php


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