本文整理汇总了PHP中templates_page_draw函数的典型用法代码示例。如果您正苦于以下问题:PHP templates_page_draw函数的具体用法?PHP templates_page_draw怎么用?PHP templates_page_draw使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了templates_page_draw函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
}
示例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))))));
示例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'))));
示例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")));
示例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'))));
示例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, ' '));
示例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")))));
示例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'))));
示例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))))));
示例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")));
示例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'))));
示例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")))));
示例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))))));
示例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'))));