本文整理汇总了PHP中PageRenderer::add_header_html方法的典型用法代码示例。如果您正苦于以下问题:PHP PageRenderer::add_header_html方法的具体用法?PHP PageRenderer::add_header_html怎么用?PHP PageRenderer::add_header_html使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageRenderer
的用法示例。
在下文中一共展示了PageRenderer::add_header_html方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
示例2: 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();
示例3: setup_module
}
}
//error displaying
function setup_module($column, $moduleName, $obj)
{
global $content_type, $users, $uid, $group_ids, $user;
switch ($column) {
case 'middle':
$obj->orientation = CENTER;
$obj->get_link_categories();
$obj->uid = $uid;
break;
}
$obj->mode = PUB;
}
$page = new PageRenderer("setup_module", PAGE_LINKS_MANAGEMENT, sprintf(__("%s - My Links - %s"), $login_user->get_name(), $network_info->name), "container_three_column.tpl", "header.tpl", PUB, HOMEPAGE, $network_info);
$page->add_header_html('<script type="text/javascript" language="javascript" src="' . $current_theme_path . '/javascript/links.js"></script>');
$updated_category_id = null;
if (!empty($_POST['updated_category_id'])) {
$updated_category_id = $_POST['updated_category_id'];
}
$page->add_header_html('<script type="text/javascript" language="javascript">var cat_id = "' . $updated_category_id . '";</script>');
$message = NULL;
if (count($error_array) > 0) {
for ($counter = 0; $counter < count($error_array); $counter++) {
$message .= $error_array[$counter] . "<br>";
}
}
uihelper_error_msg($message);
uihelper_set_user_heading($page);
echo $page->render();
示例4: PageRenderer
$obj->block_type = HOMEPAGE;
}
break;
case 'middle':
break;
case 'right':
if (PA::$network_info->type == PRIVATE_NETWORK_TYPE) {
return 'skip';
}
$obj->mode = PRI;
break;
}
}
$page = new PageRenderer("setup_module", PAGE_LOGIN, "Login page", "container_three_column.php", "header.php", PUB, HOMEPAGE, PA::$network_info);
// added by Zoran Hron: JQuery validation & AJAX file upload --
$page->add_header_html(js_includes('jquery.validate.js'));
$page->add_header_html(js_includes('jquery.metadata.js'));
$page->add_header_html(js_includes('ajaxfileupload.js'));
$page->add_header_html(js_includes('user_registration.js'));
// ------------------------------------------------------------
$page->add_header_html(js_includes('common.js'));
$page->add_header_html(js_includes('login.js'));
if (isset($_GET['msg_id'])) {
$msg = MessagesHandler::get_message($_GET['msg_id']);
}
if (isset($msg)) {
$msg_tpl = new Template(CURRENT_THEME_FSPATH . "/display_message.php");
$msg_tpl->set('message', $msg);
$page->add_module("middle", "top", $msg_tpl->fetch());
}
if (isset($page_settings['body_attributes'])) {
示例5: setup_module
// for query count
global $query_count_on_page;
$query_count_on_page = 0;
$user = get_login_user();
function setup_module($column, $module, $obj)
{
global $user;
switch ($module) {
case 'EventCalendarModule':
$obj->title = __('Personal Events');
$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;
}
global $msg;
$page = new PageRenderer("setup_module", PAGE_USER_CALENDAR, __("My Events"), "container_one_column.php", "header_user.php", PRI, NULL, PA::$network_info);
$css_path = PA::$theme_url . '/css/calendar.css';
$page->add_header_css($css_path);
$page->add_header_html(js_includes('calendar.js'));
$page->add_header_html(js_includes('date.js'));
$page->add_header_html(js_includes('jquery.dimensions.min.js'));
$page->add_header_html(js_includes('jquery.datePicker.js'));
$page->add_header_html($parameter);
uihelper_error_msg($msg);
uihelper_set_user_heading($page);
echo $page->render();
示例6: PageRenderer
$obj->super_user_and_mothership = $super_user_and_mothership;
break;
}
}
$page = new PageRenderer("setup_module", PAGE_NETWORK_MANAGE_USERS, "Manage Registered User", 'container_two_column.tpl', 'header.tpl', PUB, HOMEPAGE, $network_info);
if (@$_GET['msg']) {
require_once $path_prefix . '/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="no_second_tier network_config"';
$css_array = get_network_css();
if (is_array($css_array)) {
foreach ($css_array as $key => $value) {
$page->add_header_css($value);
}
}
$parameter = js_includes('roles.js');
$page->add_header_html($parameter);
$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();
示例7: PageRenderer
// stands for the Update for emblum data
if (!$error) {
ModuleData::update($data, $id);
// call the ModuleData to update the data
}
}
//render the page
$page = new PageRenderer("setup_module", PAGE_MANAGE_EMBLEM, "Manage Emblem", 'container_two_column.tpl', 'header.tpl', PRI, HOMEPAGE, PA::$network_info);
if (!empty($msg)) {
$msg_tpl = new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
$msg_tpl->set('message', $msg);
$m = $msg_tpl->fetch();
$page->add_module("middle", "top", $m);
}
$page->html_body_attributes = 'class="no_second_tier network_config"';
$page->add_header_html(js_includes('edit_profile.js'));
$page->add_header_html(js_includes('manage_data.js'));
$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);
}
//..end render the page
/* ---------- FUNCTION DEFINITION ------------------*/
//call back function
示例8: foreach
$css_path = $current_theme_path.'/network_skin.css';
$page->add_header_css($css_path);
$css_path = $current_theme_path.'/edit_skin.css';
$page->add_header_css($css_path);*/
// Currently using the CSS from the live site, due to some problem in merging local and server CSS.
$theme_details = get_user_theme($uid);
if (is_array($theme_details['css_files'])) {
foreach ($theme_details['css_files'] as $key => $value) {
$page->add_header_css($value);
}
}
if (!empty($_GET['msg'])) {
$message = MessagesHandler::get_message($_GET['msg']);
}
if (!empty($message)) {
$msg_tpl =& new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
$msg_tpl->set('message', $message);
$page->add_module("middle", "top", $msg_tpl->fetch());
}
// see if we have a user defined CSS
$user_data_ui = sanitize_user_data(User::load_user_profile($uid, $uid, 'ui'));
if (!empty($user_data_ui['newcss'])) {
$usercss = "<style>" . $user_data_ui['newcss'] . "</style>";
$page->add_header_html($usercss);
}
$page->add_header_html('<script type="text/javascript" language="javascript" src="' . $current_theme_path . '/javascript/messages.js"></script>');
// Get rid of the ", FALSE" below once the UI on this page is made
// compatible with themes. Right now if you make this themeable, the
// floating left folder list causes the center column to drop down.
uihelper_set_user_heading($page, FALSE);
echo $page->render();
示例9: PageRenderer
case 'middle':
$obj->get_user_albums();
$obj->author_id = $_SESSION['user']['id'];
$content_type = 'BlogPost';
require_once "web/includes/blocks/createcontent.php";
if (!empty($cid)) {
$obj->set_id($cid);
}
if (strlen($error) > 0) {
$obj->set_error_msg($error, $data_array);
}
$obj->display = 'blog';
$obj->targets = $targets;
$obj->show_external_blogs = $show_external_blogs;
$obj->is_edit = $is_edit;
$obj->permission_to_post = $permission_to_post;
$obj->parent_collection_id = @$obj_content_type->parent_collection_id;
$obj->ccid = $obj->parent_collection_id ? $obj->parent_collection_id : $ccid;
break;
}
}
$page = new PageRenderer("setup_module", PAGE_POSTCONTENT, "Create content", "container_one_column_postcontent.tpl", "header.tpl", PRI, HOMEPAGE, PA::$network_info);
// load JQuery forms Plugin
$page->add_header_html(js_includes('forms.js'));
// and the modal overlay functions
$page->add_header_html(js_includes('attach_media_modal.js'));
$css_path = PA::$theme_url . '/modal.css';
$page->add_header_css($css_path);
uihelper_error_msg($post_err);
uihelper_get_network_style();
echo $page->render();
示例10: PageRenderer
// Check user session / login status, and redirect to login page (or
// request page, for private networks) if required.
if (!check_session($login_required, $page_redirect_function)) {
if ($login_required) {
exit;
}
}
$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);
示例11: PageRenderer
if ($moduleName == 'EditProfileModule') {
$obj->array_of_errors = $array_of_errors;
$obj->login_name = $login_name;
$obj->first_name = $first_name;
$obj->last_name = $last_name;
$obj->email = $email;
$obj->user_picture = $user_picture;
$obj->user_data = $user_data_general;
$obj->user_personal_data = $user_personal_data;
$obj->user_professional_data = $user_professional_data;
}
break;
}
}
$page = new PageRenderer("setup_module", PAGE_EDIT_PROFILE, sprintf(__("%s - Edit your profile - %s"), $login_user->get_name(), $network_info->name), "container_one_column.tpl", "header_user.tpl", NULL, PRI, $network_info);
$page->add_header_html(js_includes('edit_profile.js'));
$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 . '/modal.css';
$page->add_header_css($css_path);
if (@$_GET['updated'] == 1) {
$uploaded_msg = " Profile updated successfully";
$msg_tpl =& new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
$msg_tpl->set('message', $uploaded_msg);
$m = $msg_tpl->fetch();
$page->add_module("middle", "top", $m);
}
示例12: PageRenderer
if (!empty($user)) {
$obj->page_user = $user->get_name();
}
break;
case 'right':
$obj->mode = PRI;
if ($moduleName != 'AdsByGoogleModule') {
$obj->block_type = HOMEPAGE;
}
if (!empty($_GET['gid'])) {
if ($moduleName == 'RecentPostModule') {
$obj->type = 'group';
$obj->gid = $_GET['gid'];
}
}
break;
}
}
$page = new PageRenderer("setup_module", PAGE_VIEW_ALL_MEMBERS, $page_name, "container_three_column.php", $header_tpl, PUB, HOMEPAGE, PA::$network_info);
$page->add_header_html(js_includes('common.js'));
if ($_GET['gid']) {
uihelper_get_group_style($_GET['gid']);
} else {
if (!empty($_GET['uid'])) {
//applying the user theme
uihelper_set_user_heading($page);
} else {
uihelper_get_network_style();
}
}
echo $page->render();
示例13: 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();
示例14: PageRenderer
break;
}
}
$page = new PageRenderer("setup_module", PAGE_USER_PUBLIC, sprintf(__("%s %s - %s"), PA::$page_user->first_name, PA::$page_user->last_name, $network_info->name), 'container_three_column.tpl', 'header_user.tpl', PUB, HOMEPAGE, $network_info);
$parameter = js_includes('common.js');
// load code to initialize the collapes/expand state of modules
$parameter .= js_includes('user_blogpage.js');
// let's see if we have collapsed modules
$parameter .= "\n<script type='text/javascript'>\n";
$parameter .= "var collapsed";
if (!empty($page->setting_data['collapsed'])) {
require_once "JSON.php";
$json = new Services_JSON();
$parameter .= " = " . $json->encode($page->setting_data['collapsed']);
}
$parameter .= "\n</script>\n";
$page->add_header_html($parameter);
// add RSD XML for automatic blogging API discovery
$page->add_header_html(build_rsd_link_rel("user:" . (int) PA::$page_uid));
$css_path = $current_theme_path . '/calendar.css';
$page->add_header_css($css_path);
$page->add_header_html(js_includes('calendar.js'));
if (PA::$page_uid && PA::$page_uid != PA::$login_uid) {
$page->html_body_attributes = 'class="no_second_tier"';
}
$page->page->set('page_type', 'public');
$rss_data = '<link rel="alternate" type="application/rss+xml" title="RSS feed" href="' . $base_url . '/feed.php?uid=' . PA::$page_uid . '" />';
$page->add_header_html($rss_data);
uihelper_set_user_heading($page, TRUE, PA::$page_uid);
uihelper_error_msg(@$_GET['msg_id']);
echo $page->render();
示例15: 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();
?>