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


PHP templates_page_setup函数代码示例

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


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

示例1: elggadmin_render_output

function elggadmin_render_output($controller)
{
    $before_render = $controller[0] . '_before';
    run2($before_render, $controller);
    //before render
    templates_page_setup();
    //print_object($controller);
    //run func, must return page object
    $result = run2($controller[0], $controller[1]);
    //take only the output of controller
    $page = $result[$controller[0]];
    if (!isset($page->title) || !isset($page->body)) {
        trigger_error(__FUNCTION__ . ": returned page title or body not defined", E_USER_WARNING);
    }
    templates_page_output($page->title, $page->body);
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:16,代码来源:engine.inc.php

示例2: dirname

<?php

require_once dirname(dirname(__FILE__)) . "/includes.php";
run("weblogs:init");
run("profile:init");
run("rss:init");
define('context', 'resources');
global $page_owner;
templates_page_setup();
$title = run("profile:display:name") . " :: " . gettext("Feeds");
run("rss:update:all", $page_owner);
$body = run("rss:view", $page_owner);
$body = templates_draw(array('context' => 'contentholder', 'title' => $title, 'body' => $body));
echo templates_page_draw(array($title, $body));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:14,代码来源:index.php

示例3: returnHTML

/**
* Build presentation data
**/
function returnHTML($purpose, $format, $results, $resultcount, $page, $username)
{
    $url = url;
    // PURPOSE
    if ($purpose == 'activity') {
        $pagetitle = 'Recent Activity';
    } elseif ($purpose == 'subscribe') {
        $pagetitle = 'Recent Changes';
    } else {
        error('Invalid purpose ' . $purpose . ' passed to feeds.php');
        die;
    }
    switch ($format) {
        case 'html':
            $body = folio_control_htmlfeed($results, $resultcount, $page, $username);
            // Transfer into template & write.
            templates_page_setup();
            if (isloggedin()) {
                $rsskey = folio_createhash($_SESSION['userid'] . '/');
            } else {
                $rsskey = '';
            }
            $types = str_replace(' ', '+', required_param('types'));
            $body = templates_draw(array('context' => 'contentholder', 'title' => "<a href='{$url}{$username}/{$purpose}/rss/{$types}/{$rsskey}'><img border=0 src='{$url}_templates/icons/rss.png' /></a> {$username} :: {$pagetitle} ", 'body' => $body));
            return templates_page_draw(array($pagetitle, $body));
            break;
        case 'rss':
            $body = folio_control_rssfeed($results, $resultcount, $username);
            header("Pragma: public");
            header("Cache-Control: public");
            header('Expires: ' . gmdate("D, d M Y H:i:s", time() + 3600) . " GMT");
            $etag = md5($body);
            header('ETag: "' . $etag . '"');
            header("Content-Length: " . strlen($body));
            header("Content-type: text/xml; charset=utf-8");
            return $body;
            break;
        default:
            error('Invalid format passed to feeds.php');
            break;
    }
}
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:45,代码来源:feeds.php

示例4: templates_page_draw

function templates_page_draw($param)
{
    // Draws the page, given a title and a main body (parameters[0] and [1]).
    $title = $param[0];
    $mainbody = $param[1];
    $run_result = '';
    global $messages;
    ////
    //// Prepare things for the module run
    //// populating $PAGE as required
    ////
    if (empty($PAGE->setupdone)) {
        templates_page_setup();
    }
    $messageshell = "";
    if (isset($messages) && sizeof($messages) > 0) {
        foreach ($messages as $message) {
            $messageshell .= templates_draw(array('context' => 'messages', 'message' => $message));
        }
        $messageshell = templates_draw(array('context' => 'messageshell', 'messages' => $messageshell));
    }
    // If $parameter[2] is set, we'll substitute it for the
    // sidebar
    if (isset($param[2])) {
        $sidebarhtml = $param[2];
    } else {
        $sidebarhtml = run("display:sidebar");
    }
    $run_result .= templates_draw(array('context' => 'pageshell', 'title' => htmlspecialchars($title, ENT_COMPAT, 'utf-8'), 'menu' => displaymenu(), 'submenu' => displaymenu_sub(), 'top' => displaymenu_top(), 'sidebar' => $sidebarhtml, 'mainbody' => $mainbody, 'messageshell' => $messageshell));
    return $run_result;
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:31,代码来源:templates.php


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