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


PHP Typeframe::IncludeScript方法代码示例

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


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

示例1: array

}
$pm->addLoop('usergroups', array('usergroupid' => '0', 'usergroupname' => 'Everyone', 'selected' => in_array(0, $selected) ? true : false));
foreach ($usergroups->getAll() as $usergroup) {
    if (in_array($usergroup['usergroupid'], $selected)) {
        $usergroup['selected'] = true;
    }
    $pm->addLoop('usergroups', $usergroup);
}
foreach (Typeframe::Registry()->applications() as $app) {
    //if ('soft' == $app->map())
    $pm->addLoop('applications', array('application' => $app->name()));
}
$pm->sortLoop('applications', 'application');
if (PAGES_DEFAULT_APPLICATION) {
    $app = Typeframe::Registry()->application(PAGES_DEFAULT_APPLICATION);
    //if ($app && ('soft' == $app->map()))
    if ($app) {
        $pm->setVariable('application', PAGES_DEFAULT_APPLICATION);
    }
}
// add skins to template
foreach (Typeframe::GetSkins() as $skin) {
    $pm->addLoop('skins', array('skin' => $skin));
}
$pm->setVariable('typef_site_skin', TYPEF_SITE_SKIN);
$application = Typeframe::Registry()->application($page['application']);
if ($application && $application->admin()) {
    if (file_exists(TYPEF_SOURCE_DIR . '/scripts' . $application->admin() . '/settings.php')) {
        Typeframe::IncludeScript($application->admin() . '/settings.php');
    }
}
开发者ID:ssrsfs,项目名称:blg,代码行数:31,代码来源:options.inc.php

示例2:

<?php

/*
	29 december 2010: cleanup while trying to add
		status field to typef_news table;
		rewrote to use news categories class
	3 january 2011: DAOFactory, not DAO_Factory;
		setCategoryId now static
	28 march 2011: merged in HL code
	29 march 2011: added page title, header
*/
// define some handy shortcuts to save typing
$settings = Typeframe::CurrentPage()->settings();
if (Typeframe::CurrentPage()->pathInfo()) {
    Typeframe::IncludeScript('/news/categories/view.php');
    return;
}
if (is_array($settings['categoryid']) && !in_array(0, $settings['categoryid']) && 1 == count($settings['categoryid'])) {
    Typeframe::Redirect('Redirecting to category listing...', Typeframe::CurrentPage()->applicationUri() . 'categories/' . $settings['categoryid'][0]);
    return;
}
// create news category object
$categories = News_Category::DAOFactory();
// limit to a particular category id
News::SetCategoryId($categories, @$settings['categoryid']);
// add categories to template
$pm->setVariable('categories', $categories);
// add page title and header to template
$title = News::GetTitle();
$pm->setVariable('page_title', $title);
$pm->setVariable('page_header', $title);
开发者ID:ssrsfs,项目名称:blg,代码行数:31,代码来源:index.php

示例3: _executeTriggers

 private function _executeTriggers($when)
 {
     if ($this->stopped()) {
         return;
     }
     $currentPath = $this->path();
     foreach (Typeframe::Registry()->getTriggersWhen($when) as $trigger) {
         $triggerOnPath = false;
         if ($trigger->path() == $currentPath) {
             $triggerOnPath = true;
         } else {
             if (substr($trigger->path(), 0, 1) == '*') {
                 $triggerOnPath = true;
             } else {
                 $asterisk = strpos($trigger->path(), '*');
                 if ($asterisk !== false) {
                     $path = substr($trigger->path(), 0, $asterisk);
                     if ($currentPath == $path) {
                         $triggerOnPath = true;
                     } else {
                         if (substr($currentPath, 0, strlen($path)) == $path) {
                             if (substr($trigger->path(), $asterisk - 1, 1) == '/') {
                                 $triggerOnPath = true;
                             } else {
                                 if (substr($currentPath, $asterisk, 1) == '/') {
                                     $triggerOnPath = true;
                                 }
                             }
                         }
                     }
                 }
             }
         }
         if ($triggerOnPath) {
             Typeframe::IncludeScript($trigger->script());
         }
         if (Typeframe::CurrentPage()->stopped()) {
             return;
         }
     }
 }
开发者ID:ssrsfs,项目名称:blg,代码行数:41,代码来源:Page.dep.php

示例4: scandir

<?php

/*
 * Applications can add their own control panels to the Admin index with a
 * script in the source/scripts/admin/index directory.
 *
 * Access to administrable pages (e.g., Content pages) is provided by adding
 * an element to the admin_pages array. The easiest way to add the element is
 * to use a Model_Page record and add the URL to the application's relevant
 * control panel (e.g., ~/admin/content/page?pageid=#).
 *
 * Custom navigation panels can be added to the index through the
 * admin_categories array. Each element should contain two keys: name (the name
 * of the category) and template (the relative path to the template). In the
 * default skin, the category name gets added to a list of tabs and the template
 * gets inserted into the corresponding panel. The application's script can add
 * add data to the Typeframe::Pagemill() object if necessary.
 */
$scripts = scandir(TYPEF_SOURCE_DIR . '/scripts/admin.d');
foreach ($scripts as $script) {
    if (substr($script, 0, 1) != '.') {
        Typeframe::IncludeScript("/admin.d/{$script}");
    }
}
if ($pm->getVariable('admin_pages')) {
    $pm->sortLoop('admin_pages', 'nickname');
}
if ($pm->getVariable('admin_categories')) {
    $pm->sortLoop('admin_categories', 'name');
}
开发者ID:ssrsfs,项目名称:blg,代码行数:30,代码来源:index.php

示例5:

<?php

/**
 * Typeframe Install application
 *
 * admin-side index controller
 */
/*
 * TODO: The Installer needs to handle dependencies elegantly. This includes
 * the ability to detect when local copies of a dependency's files have been
 * customized. This process appears to handle the most scenarios:
 * 1. Query the provider for the package's dependencies.
 * 2. If the package or any of its dependencies exist, check the md5 hash
 *    on the files and look for changes. Recurse into deeper dependencies.
 * 3. If local changes exist, request confirmation for which files should be
 *    overwritten.
 */
if ('POST' == $_SERVER['REQUEST_METHOD']) {
    // TODO: don't do.php
    Typeframe::IncludeScript('/admin/install/do.php');
}
开发者ID:ssrsfs,项目名称:blg,代码行数:21,代码来源:index.php


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