本文整理汇总了PHP中PageRenderer::add_header_css方法的典型用法代码示例。如果您正苦于以下问题:PHP PageRenderer::add_header_css方法的具体用法?PHP PageRenderer::add_header_css怎么用?PHP PageRenderer::add_header_css使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageRenderer
的用法示例。
在下文中一共展示了PageRenderer::add_header_css方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MessagesHandler
/* To avoding javascript select value function alert */
if(!isset($_GET['msg_rep'])) {
if (!empty($msg) || !empty($_GET['msg_id'])) {
$msg_obj = new MessagesHandler();
$msg_id = ($_GET['msg_id']) ? $_GET['msg_id']: $msg;
$dynamic_msg = ($msg_id == 2007)?substr ($type,0,5):NULL;
$msg = $msg_obj->get_message($msg_id,$dynamic_msg);
if ($msg) {
$msg_tpl = & new Template(CURRENT_THEME_FSPATH."/display_message.tpl");
$msg_tpl->set('message', $msg);
$page->add_module("middle", "top", $msg_tpl->fetch());
}
}
}
// Jtip is shown when user watching the image media
if ($type == 'Images') {
$parameter = js_includes('jtip.js');
$page->add_header_html($parameter);
$css = $current_theme_path.'/jtip.css';
$page->add_header_css($css);
}
// if user is not log in as well as not viewing any user page
if (!empty($uid)) {
uihelper_set_user_heading($page,$do_theme=TRUE, $uid);
}
else {
uihelper_get_network_style();
}
echo $page->render();
?>
示例2: switch
{
$user = get_login_user();
switch ($module) {
case 'EventCalendarModule':
$obj->assoc_type = 'user';
$obj->assoc_id = (int) $_SESSION['user']['id'];
$obj->may_edit = true;
// user may edit own events, right? ;)
$obj->assoc_title = $user->login_name;
break;
}
$obj->mode = PUB;
}
$page = new PageRenderer("setup_module", PAGE_CALENDAR, "Calendar - PeopleAggregator", "container_one_column.tpl", "header_user.tpl", NULL, PRI, $network_info);
$theme_details = get_user_theme($login_uid);
if (is_array($theme_details['css_files'])) {
foreach ($theme_details['css_files'] as $key => $value) {
$page->add_header_css($value);
}
}
$css_path = $current_theme_path . '/calendar.css';
$page->add_header_css($css_path);
$page->add_header_html(js_includes('calendar.js'));
if (!empty($msg)) {
$msg_tpl =& new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
$msg_tpl->set('message', $msg);
$page->add_module("middle", "top", $msg_tpl->fetch());
}
$page->add_header_html($parameter);
// uihelper_get_group_style($gid);
echo $page->render();
示例3: setup_module
}
function setup_module($column, $module, $obj)
{
global $network_info, $login_uid, $configure_permission;
switch ($module) {
case 'EventCalendarModule':
if (!$configure_permission) {
return 'skip';
}
$obj->title = 'Network Events';
$obj->assoc_type = 'network';
$obj->assoc_id = $network_info->network_id;
$obj->assoc_title = $network_info->name;
$is_admin = Network::is_admin($network_info->network_id, $login_uid);
if ($is_admin) {
$obj->may_edit = true;
} else {
$obj->may_edit = false;
}
break;
}
$obj->mode = PUB;
}
$page = new PageRenderer("setup_module", PAGE_CALENDAR, "Calendar - PeopleAggregator", "container_one_column.tpl", "header.tpl", NULL, PRI, $network_info);
$page->html_body_attributes = 'class="no_second_tier network_config"';
$css_path = $current_theme_path . '/calendar.css';
$page->add_header_css($css_path);
$page->add_header_html(js_includes('calendar.js'));
uihelper_error_msg($msg);
uihelper_get_network_style();
echo $page->render();
示例4: PageRenderer
$obj->contentcollection_type = $cc_info->type;
break;
case 'right':
$obj->uid = $uid;
if ($moduleName == 'UserPhotoModule') {
$obj->block_type = 'UserPhotoBlock';
}
if ($moduleName != 'AdsByGoogleModule') {
$obj->block_type = HOMEPAGE;
}
break;
}
}
$page = new PageRenderer("setup_module", PAGE_EDIT_MEDIA, "Edit Media", "container_three_column.tpl", "header.tpl", PUB, HOMEPAGE, $network_info);
if (!empty($error)) {
$msg_tpl =& new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
$msg_tpl->set('message', $error);
$page->add_module("middle", "top", $msg_tpl->fetch());
}
$css_array = get_network_css();
if (is_array($css_array)) {
foreach ($css_array as $key => $value) {
$page->add_header_css($value);
}
}
$css_data = inline_css_style();
if (!empty($css_data['newcss']['value'])) {
$css_data = '<style type="text/css">' . $css_data['newcss']['value'] . '</style>';
$page->add_header_html($css_data);
}
echo $page->render();
示例5: User
{$your_permissions}
<p>{$paging}</p>
<table class="bulk_comment_summary"><tr>
<td>ID</td>
<td>Post</td>
<td>Name</td>
<td>Email</td>
<td>Website</td>
<td>Subject</td>
<td>Comment</td>
<td>IP</td>
<td>X</td>
</tr>
{$comments}
</table>
</div><!-- comment_manage_pane -->
EOS;
return $page_html;
}
// ---
$user = new User();
$user->load($login_uid);
$page = new PageRenderer(NULL, PAGE_COMMENT_MANAGEMENT, "Manage comments", "container_one_column.tpl", "header.tpl");
$page->add_header_js("fat.js");
$page->add_header_css(PA::$theme_url . "/comment_management.css");
$page->add_module("middle", "top", render_main_page_area($user));
uihelper_set_user_heading($page);
echo $page->render();
示例6: render_debug_sidebar
// --- left sidebar (debugging)
function render_debug_sidebar() {
global $user;
ob_start();
echo "<p>badges: "; var_dump($user->list_widgets()); echo "</p>";
try {
$default_badge = $user->load_widget("default");
echo "<p>default badge: "; var_dump($default_badge); echo "</p>";
} catch (PAException $e) {
echo "<p>no default badge available.</p>";
}
$debug_sidebar = ob_get_contents();
ob_end_clean();
return $debug_sidebar;
}
// ---
$page = new PageRenderer(NULL, PAGE_BADGE_CREATE, sprintf(__("%s - My Widgets - %s"), $login_user->get_name(), PA::$network_info->name), "container_three_column.tpl", 'header_user.tpl');
$page->onload = "badge.update();";
$page->add_header_css(PA::$theme_url . "/badge_create.css");
$page->add_module("left", "top", render_left_sidebar());
//$page->add_module("left", "top", render_debug_sidebar()); // debugging
$page->add_module("middle", "top", $page_html);
$page->add_module("right", "top", render_right_sidebar());
uihelper_set_user_heading($page);
echo $page->render();
?>
示例7: PageRenderer
}
$use_theme = $page_settings['page_theme'];
$page = new PageRenderer('setup_module', $page_settings['page_id'], sprintf(__('%s - %s'), __($page_settings['page_name']), PA::$network_info->name), $page_settings['page_template'], $page_settings['header_template'], $page_settings['page_mode'], $page_settings['block_type'], PA::$network_info, NULL, NULL);
if (isset($page_settings['body_attributes'])) {
$page->html_body_attributes = $page_settings['body_attributes'];
}
if (isset($page_settings['javascripts'])) {
if (is_array($page_settings['javascripts'])) {
foreach ($page_settings['javascripts'] as $js_file) {
$page->add_header_html(js_includes($js_file));
}
} else {
$page->add_header_html(js_includes($page_settings['javascripts']));
}
}
if (isset($page_settings['page_css'])) {
if (is_array($page_settings['page_css'])) {
foreach ($page_settings['page_css'] as $css_file) {
$page->add_header_css("/Themes/{$use_theme}/css/{$css_file}");
}
} else {
$page->add_header_css("/Themes/{$use_theme}/css/" . $page_settings['page_css']);
}
}
uihelper_error_msg($error_msg);
echo $page->render();
} catch (Exception $e) {
throw $e;
exit;
}
}
示例8: render_debug_sidebar
// --- left sidebar (debugging)
function render_debug_sidebar() {
global $user;
ob_start();
echo "<p>badges: "; var_dump($user->list_widgets()); echo "</p>";
try {
$default_badge = $user->load_widget("default");
echo "<p>default badge: "; var_dump($default_badge); echo "</p>";
} catch (PAException $e) {
echo "<p>no default badge available.</p>";
}
$debug_sidebar = ob_get_contents();
ob_end_clean();
return $debug_sidebar;
}
// ---
$page = new PageRenderer(NULL, PAGE_BADGE_CREATE, sprintf(__("%s - My Widgets - %s"), $login_user->get_name(), $network_info->name), "container_three_column.tpl", 'header_user.tpl');
$page->onload = "badge.update();";
$page->add_header_css("$current_theme_path/badge_create.css");
$page->add_module("left", "top", render_left_sidebar());
//$page->add_module("left", "top", render_debug_sidebar()); // debugging
$page->add_module("middle", "top", $page_html);
$page->add_module("right", "top", render_right_sidebar());
uihelper_set_user_heading($page);
echo $page->render();
?>
示例9: PageRenderer
break;
}
}
$page = new PageRenderer("setup_module", PAGE_NETWORK_MANAGE_USERS, "Manage Registered User", 'container_two_column.tpl', 'header.php', PUB, HOMEPAGE, PA::$network_info);
if (@$_GET['msg']) {
require_once 'web/languages/english/MessagesHandler.php';
$msg_obj = new MessagesHandler();
$message = $msg_obj->get_message($_GET['msg']);
}
if (@$message) {
$msg_tpl = new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
$msg_tpl->set('message', $message);
$m = $msg_tpl->fetch();
$page->add_module("middle", "top", $m);
}
$page->html_body_attributes = 'class="hold-transition skin-blue sidebar-collapse sidebar-mini"';
$css_array = get_network_css();
if (is_array($css_array)) {
foreach ($css_array as $key => $value) {
$page->add_header_css($value);
}
}
$page->add_header_html(js_includes('roles.js'));
$page->add_header_html(js_includes('ModalWindow.js'));
$page->add_header_css(PA::$theme_rel . '/invite_modal.css');
$css_data = inline_css_style();
if (!empty($css_data['newcss']['value'])) {
$css_data = '<style type="text/css">' . $css_data['newcss']['value'] . '</style>';
$page->add_header_html($css_data);
}
echo $page->render();
示例10: User
{$your_permissions}
<p>{$paging}</p>
<table class="bulk_comment_summary"><tr>
<td>ID</td>
<td>Post</td>
<td>Name</td>
<td>Email</td>
<td>Website</td>
<td>Subject</td>
<td>Comment</td>
<td>IP</td>
<td>X</td>
</tr>
{$comments}
</table>
</div><!-- comment_manage_pane -->
EOS;
return $page_html;
}
// ---
$user = new User();
$user->load($login_uid);
$page = new PageRenderer(NULL, PAGE_COMMENT_MANAGEMENT, "Manage comments", "container_one_column.tpl", "header.tpl");
$page->add_header_js("fat.js");
$page->add_header_css("{$current_theme_path}/comment_management.css");
$page->add_module("middle", "top", render_main_page_area($user));
uihelper_set_user_heading($page);
echo $page->render();
示例11: exception_handler
function exception_handler($exception)
{
global $current_theme_path;
// clean out any buffering so we can write straight to the client
while (@ob_end_clean()) {
}
try {
while ($exception->getCode() == 100 && strpos($exception->getMessage(), "no such table") != -1) {
// See if the database hasn't been populated.
// (Note: we use 'while' here rather than 'if' so we can use break
// to avoid this turning into a mess of nested blocks).
// First, make sure we have a working database connection.
try {
$sth = Dal::query("SHOW TABLES");
} catch (PAException $e) {
// The database connection isn't working - so fall through to
// the normal error handler.
break;
}
// Now run through the results and see if we can find a familiar
// table.
$found = 0;
while ($r = $sth->fetchRow()) {
if ($r[0] == "page_settings") {
$found = 1;
break;
}
}
if ($found) {
// ok, the db *has* been populated - fall through
break;
}
// If we get this far, it means that the DB isn't populated, so we
// show a message to the user (who is presumably an admin,
// installing the system).
global $path_prefix;
?>
<h1>Database not populated</h1>
<p>Before you can run PeopleAggregator, you need to populate the database by running the script <code><?php
echo $path_prefix;
?>
/db/PeepAgg.mysql</code> on your database. You can do it in the MySQL console like this:</p>
<pre><i>user</i>@<i>server</i>:<?php
echo $path_prefix;
?>
$ <b>mysql -u <i>username</i> -p</b>
Enter password: <b><i>password</i></b>
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 63048 to server version: 4.1.14-Debian_6-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> <b>use paalpha</b>
Database changed
mysql> <b>source <?php
echo $path_prefix;
?>
/db/PeepAgg.mysql</b></pre>
<?php
exit;
}
// render an error message
$code_esc = intval($exception->getCode());
$msg_esc = htmlspecialchars($exception->getMessage());
$page = new PageRenderer(NULL, NULL, "Error {$code_esc}: {$msg_esc}", "container_one_column.tpl");
$msg_tpl =& new Template(CURRENT_THEME_FSPATH . "/error_middle.tpl");
$msg_tpl->set('code', $code_esc);
$msg_tpl->set('msg', $msg_esc);
$page->add_module("middle", "top", $msg_tpl->fetch());
$css_path = $current_theme_path . '/layout.css';
$page->add_header_css($css_path);
$css_path = $current_theme_path . '/network_skin.css';
$page->add_header_css($css_path);
$page->header->set('navigation_links', null);
//setting the links to null
echo $page->render();
// write a copy into the log
Logger::log("An exception occurred: code " . $exception->getCode() . ", message " . $exception->getMessage() . "\n" . $exception->getTraceAsString(), LOGGER_ERROR);
} catch (Exception $e) {
// If an error occurred in PageRenderer or something, present a much plainer screen with both errors:
echo "<h1>Lots of errors occurred!</h1>\n<p>An error occurred, then the error handler crashed while trying to handle the error. Whoops!</p>\n<p><b>Here are the details of the original error:</b></p>\n<p>" . $exception->getMessage() . "</p>\n<pre>" . $exception->getTraceAsString() . "</pre>\n<p><b>Here are the details of the second error:</b></p>\n<p>" . $e->getMessage() . "</p>\n<pre>" . $e->getTraceAsString() . "</pre>";
}
exit;
}