• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP templates_page_draw函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: templates_page_output

/**
 * Outputs html page
 * @param string $title   The title of the page
 * @param string $body    The body of the content    
 * @param string $context Optional template context
 * @param string $sidebar Optional sidebar content 
 */
function templates_page_output($title, $body, $context = null, $sidebar = null)
{
    // hook pre-output page
    // @rho i think no needed because there is already
    //      _init and _pagesetup
    if (!isset($context)) {
        $context = 'contentholder';
    }
    if ($context !== false) {
        // allow title with html tags or specialchars
        $body = templates_draw(array('context' => $context, 'title' => $title, 'body' => $body));
    }
    // clean title for <title> tag
    $title = htmlspecialchars_decode(strip_tags($title), ENT_COMPAT);
    // print output!
    echo templates_page_draw(array($title, $body, $sidebar));
    // hook post-output
    action('end');
    // end execution
    exit;
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:28,代码来源:templates.php


示例2: 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


示例3: dirname

<?php

//    ELGG manage community members page
// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
// Initialise functions for user details, icon management and profile management
run("userdetails:init");
run("profile:init");
run("friends:init");
define("context", "network");
templates_page_setup();
// Whose friends are we looking at?
global $page_owner;
// You must be logged on to view this!
//    protect(1);
$title = run("profile:display:name") . " :: " . gettext("Members");
echo templates_page_draw(array($title, templates_draw(array('context' => 'contentholder', 'title' => $title, 'body' => run("communities:members", array($page_owner))))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:17,代码来源:members.php


示例4: dirname

<?php

// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
templates_page_setup();
// Draw page
echo templates_page_draw(array(sprintf(gettext("About %s"), sitename), templates_draw(array('body' => run("content:about"), 'name' => sprintf(gettext("About %s"), sitename), 'context' => 'contentholder'))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:7,代码来源:about.php


示例5: dirname

<?php

//    ELGG manage friends and groups page
// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
// Initialise functions for user details, icon management and profile management
run("userdetails:init");
run("profile:init");
run("friends:init");
define("context", "network");
// Whose friends are we looking at?
global $page_owner;
// You must be logged on to view this!
//    protect(1);
templates_page_setup();
$title = run("profile:display:name") . " :: " . gettext("Friends who have linked to you");
echo templates_page_draw(array($title, run("friends:of:editpage")));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:17,代码来源:friendsof.php


示例6: sprintf

                $body .= <<<END
        <td width="100" align="center">
            <p>
            <a href="{$CFG->wwwroot}{$info->username}/weblog">
            <img src="{$CFG->wwwroot}{$info->username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br />
            <span class="userdetails">
                {$friends_name}
            </span>
            </p>
        </td>
END;
                if ($i % 5 == 0) {
                    $body .= "</tr><tr>";
                }
                $i++;
                if ($i > 5) {
                    break;
                }
            }
        }
    }
    $body .= <<<END
    </tr>
    </table>
    </div>
END;
    $body .= sprintf(gettext("<a href=\"%s\">Find others</a> with similar interests and goals."), url . "search/tags.php") . "<br /><br />";
    $body .= "<p align=\"center\"><a href=\"_weblog/everyone.php\"><img src=\"_templates/default_images/view_blog.gif\" border=\"0\"></a></p>";
}
echo templates_page_draw(array(sitename, templates_draw(array('body' => $body, 'title' => gettext("Main Index"), 'context' => 'contentholder'))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:30,代码来源:index2.php


示例7: define

<?php

//    ELGG generate-a-new-password page
// Run includes
define("context", "login");
require_once dirname(dirname(__FILE__)) . "/includes.php";
run("profile:init");
run("invite:init");
templates_page_setup();
$title = gettext("Generate a New Password");
$body = run("invite:password:request");
$body = templates_draw(array('context' => 'contentholder', 'title' => $title, 'body' => $body));
echo templates_page_draw(array($title, $body, '&nbsp;'));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:13,代码来源:forgotten_password.php


示例8: dirname

<?php

//    ELGG main admin panel page
// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
// Initialise functions for user details, icon management and profile management
run("admin:init");
define("context", "admin");
templates_page_setup();
// You must be logged on to view this!
echo templates_page_draw(array(gettext("Administration"), templates_draw(array('context' => 'contentholder', 'title' => gettext("Administration"), 'body' => run("admin:main")))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:11,代码来源:index.php


示例9: dirname

<?php

// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
define("context", "weblog");
templates_page_setup();
// Draw page
echo templates_page_draw(array("Blog help", templates_draw(array('body' => run("help:blogs"), 'title' => gettext("'Your blog' help"), 'context' => 'contentholder'))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:8,代码来源:blogs_help.php


示例10: dirname

<?php

//	ELGG manage owned users page
global $CFG;
// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
// Initialise functions for user details, icon management and profile management
run("userdetails:init");
run("profile:init");
run("friends:init");
run("ownedusers:init");
define("context", "network");
templates_page_setup();
// Whose owned users are we looking at?
global $page_owner;
$profile_id = optional_param('profile_id');
// You must be logged on to view this!
protect(1);
$title = run("profile:display:name") . " :: " . gettext($CFG->owned_users_caption);
echo templates_page_draw(array($title, templates_draw(array('context' => 'contentholder', 'title' => $title, 'body' => run("ownedusers:move", array($page_owner, $profile_id))))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:20,代码来源:moveownedusers.php


示例11: dirname

<?php

//    ELGG manage friendship requests page
// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
// Initialise functions for user details, icon management and profile management
run("userdetails:init");
run("profile:init");
run("friends:init");
define("context", "network");
templates_page_setup();
// Whose friends are we looking at?
global $page_owner;
// You must be logged on to view this!
//    protect(1);
$title = run("profile:display:name") . " :: " . gettext("Friendship requests");
echo templates_page_draw(array($title, run("friends:requests:view")));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:17,代码来源:requests.php


示例12: dirname

<?php

// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
define("context", "files");
templates_page_setup();
// Draw page
echo templates_page_draw(array(sprintf(gettext("Help for %s"), sitename), templates_draw(array('body' => run("help:files"), 'title' => gettext("'Your Files' help"), 'context' => 'contentholder'))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:8,代码来源:files_help.php


示例13: dirname

<?php

//    ELGG content flagging admin panel page
// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
// Initialise functions for user details, icon management and profile management
run("admin:init");
define("context", "admin");
templates_page_setup();
// You must be logged on to view this!
echo templates_page_draw(array(gettext("Content flags"), templates_draw(array('context' => 'contentholder', 'title' => gettext("Content flags"), 'body' => run("admin:contentflags")))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:11,代码来源:flags.php


示例14: dirname

<?php

//	ELGG manage owned users page
global $CFG;
// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
// Initialise functions for user details, icon management and profile management
run("userdetails:init");
run("profile:init");
run("friends:init");
run("ownedusers:init");
define("context", "network");
templates_page_setup();
// Whose owned users are we looking at?
global $page_owner;
// You must be logged on to view this!
//	protect(1);
$title = run("profile:display:name") . " :: " . gettext($CFG->owned_users_caption);
echo templates_page_draw(array($title, templates_draw(array('context' => 'contentholder', 'title' => $title, 'body' => run("ownedusers:owned", array($page_owner))))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:19,代码来源:owned.php


示例15: dirname

<?php

// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
define("context", "calendar");
// Draw page
echo templates_page_draw(array(gettext("Calendar help"), templates_draw(array('body' => run("help:calendar"), 'title' => gettext("'Your calendar' help"), 'context' => 'contentholder'))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:7,代码来源:calendar_help.php


示例16: dirname

<?php

//    ELGG manage files page
// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
// Initialise functions for user details, icon management and profile management
run("userdetails:init");
run("profile:init");
run("files:init");
define("context", "files");
templates_page_setup();
// Whose files are we looking at?
global $page_owner;
$title = run("profile:display:name") . " :: " . gettext("Edit File");
$body = run("content:files:edit");
$body .= run("files:edit");
echo templates_page_draw(array($title, templates_draw(array('context' => 'contentholder', 'title' => $title, 'body' => $body))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:17,代码来源:edit_file.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP templates_page_output函数代码示例发布时间:2022-05-23
下一篇:
PHP templates_draw函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap