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


PHP Page::set_title方法代码示例

本文整理汇总了PHP中Page::set_title方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::set_title方法的具体用法?PHP Page::set_title怎么用?PHP Page::set_title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Page的用法示例。


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

示例1: display_aliases

 public function display_aliases(Page $page, $aliases, $is_admin, $pageNumber, $totalPages)
 {
     if ($is_admin) {
         $action = "<th width='10%'>Action</th>";
         $add = "\n\t\t\t\t<tr>\n\t\t\t\t\t<form action='" . make_link("alias/add") . "' method='POST'>\n\t\t\t\t\t\t<td><input type='text' name='oldtag'></td>\n\t\t\t\t\t\t<td><input type='text' name='newtag'></td>\n\t\t\t\t\t\t<td><input type='submit' value='Add'></td>\n\t\t\t\t\t</form>\n\t\t\t\t</tr>\n\t\t\t";
     } else {
         $action = "";
         $add = "";
     }
     $h_aliases = "";
     $n = 0;
     foreach ($aliases as $old => $new) {
         $h_old = html_escape($old);
         $h_new = "<a href='" . make_link("post/list/" . url_escape($new) . "/1") . "'>" . html_escape($new) . "</a>";
         $oe = $n++ % 2 == 0 ? "even" : "odd";
         $h_aliases .= "<tr class='{$oe}'><td>{$h_old}</td><td>{$h_new}</td>";
         if ($is_admin) {
             $h_aliases .= "\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<form action='" . make_link("alias/remove") . "' method='POST'>\n\t\t\t\t\t\t\t<input type='hidden' name='oldtag' value='{$h_old}'>\n\t\t\t\t\t\t\t<input type='submit' value='Remove'>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</td>\n\t\t\t\t";
         }
         $h_aliases .= "</tr>";
     }
     $html = "\n\t\t\t<script>\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$(\"#aliases\").tablesorter();\n\t\t\t});\n\t\t\t</script>\n\t\t\t<table id='aliases' class='zebra'>\n\t\t\t\t<thead><tr><th>From</th><th>To</th>{$action}</tr></thead>\n\t\t\t\t<tbody>{$h_aliases}</tbody>\n\t\t\t\t<tfoot>{$add}</tfoot>\n\t\t\t</table>\n\t\t\t<p><a href='" . make_link("alias/export/aliases.csv") . "'>Download as CSV</a></p>\n\t\t";
     $bulk_html = "\n\t\t\t<form enctype='multipart/form-data' action='" . make_link("alias/import") . "' method='POST'>\n\t\t\t\t<input type='file' name='alias_file'>\n\t\t\t\t<input type='submit' value='Upload List'>\n\t\t\t</form>\n\t\t";
     $page->set_title("Alias List");
     $page->set_heading("Alias List");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Aliases", $html));
     if ($is_admin) {
         $page->add_block(new Block("Bulk Upload", $bulk_html, "main", 51));
     }
     $this->display_paginator($page, "alias/list", null, $pageNumber, $totalPages);
 }
开发者ID:kmcasto,项目名称:shimmie2,代码行数:32,代码来源:theme.php

示例2: display_page_editor

 public function display_page_editor(Page $page, WikiPage $wiki_page)
 {
     $page->set_title(html_escape($wiki_page->title));
     $page->set_heading(html_escape($wiki_page->title));
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Editor", $this->create_edit_html($wiki_page)));
 }
开发者ID:nsuan,项目名称:shimmie2,代码行数:7,代码来源:theme.php

示例3: display_signups_disabled

 public function display_signups_disabled(Page $page)
 {
     $page->set_title("Signups Disabled");
     $page->set_heading("Signups Disabled");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Signups Disabled", "The board admin has disabled the ability to create new accounts~"));
 }
开发者ID:kmcasto,项目名称:shimmie2,代码行数:7,代码来源:theme.php

示例4: display_global_page

    /**
     * @param Page $page
     * @param array $history
     * @param int $page_number
     */
    public function display_global_page(Page $page, $history, $page_number)
    {
        $start_string = "\n\t\t\t<div style='text-align: left'>\n\t\t\t\t" . make_form(make_link("tag_history/revert")) . "\n\t\t\t\t\t<ul style='list-style-type:none;'>\n\t\t";
        $end_string = "\n\t\t\t\t\t</ul>\n\t\t\t\t\t<input type='submit' value='Revert To'>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t";
        global $user;
        $history_list = "";
        foreach ($history as $fields) {
            $current_id = $fields['id'];
            $image_id = $fields['image_id'];
            $current_tags = html_escape($fields['tags']);
            $name = $fields['name'];
            $h_ip = $user->can("view_ip") ? " " . show_ip($fields['user_ip'], "Tagging Image #{$image_id} as '{$current_tags}'") : "";
            $setter = "<a href='" . make_link("user/" . url_escape($name)) . "'>" . html_escape($name) . "</a>{$h_ip}";
            $history_list .= '
				<li>
					<input type="radio" name="revert" value="' . $current_id . '">
					<a href="' . make_link('post/view/' . $image_id) . '">' . $image_id . '</a>:
					' . $current_tags . ' (Set by ' . $setter . ')
				</li>
			';
        }
        $history_html = $start_string . $history_list . $end_string;
        $page->set_title("Global Tag History");
        $page->set_heading("Global Tag History");
        $page->add_block(new Block("Tag History", $history_html, "main", 10));
        $h_prev = $page_number <= 1 ? "Prev" : '<a href="' . make_link('tag_history/all/' . ($page_number - 1)) . '">Prev</a>';
        $h_index = "<a href='" . make_link() . "'>Index</a>";
        $h_next = '<a href="' . make_link('tag_history/all/' . ($page_number + 1)) . '">Next</a>';
        $nav = $h_prev . ' | ' . $h_index . ' | ' . $h_next;
        $page->add_block(new Block("Navigation", $nav, "left"));
    }
开发者ID:JarJak,项目名称:shimmie2,代码行数:36,代码来源:theme.php

示例5: display_reported_images

 public function display_reported_images(Page $page, $reports)
 {
     global $config;
     $h_reportedimages = "";
     $n = 0;
     foreach ($reports as $report) {
         $image = $report['image'];
         $h_reason = format_text($report['reason']);
         if ($config->get_bool('report_image_show_thumbs')) {
             $image_link = $this->build_thumb_html($image);
         } else {
             $image_link = "<a href=\"" . make_link("post/view/{$image->id}") . "\">{$image->id}</a>";
         }
         $reporter_name = html_escape($report['reporter_name']);
         $userlink = "<a href='" . make_link("user/{$reporter_name}") . "'>{$reporter_name}</a>";
         global $user;
         $iabbe = new ImageAdminBlockBuildingEvent($image, $user);
         send_event($iabbe);
         ksort($iabbe->parts);
         $actions = join("<br>", $iabbe->parts);
         $oe = $n++ % 2 == 0 ? "even" : "odd";
         $h_reportedimages .= "\n\t\t\t\t<tr class='{$oe}'>\n\t\t\t\t\t<td>{$image_link}</td>\n\t\t\t\t\t<td>Report by {$userlink}: {$h_reason}</td>\n\t\t\t\t\t<td class='formstretch'>\n\t\t\t\t\t\t<form action='" . make_link("image_report/remove") . "' method='POST'>\n\t\t\t\t\t\t\t<input type='hidden' name='id' value='{$report['id']}'>\n\t\t\t\t\t\t\t<input type='submit' value='Remove Report'>\n\t\t\t\t\t\t</form>\n\n\t\t\t\t\t\t<br>{$actions}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t";
     }
     $thumb_width = $config->get_int("thumb_width");
     $html = "\n\t\t\t<table id='reportedimage' class='zebra'>\n\t\t\t\t<thead><td width='{$thumb_width}'>Image</td><td>Reason</td><td width='128'>Action</td></thead>\n\t\t\t\t{$h_reportedimages}\n\t\t\t</table>\n\t\t";
     $page->set_title("Reported Images");
     $page->set_heading("Reported Images");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Reported Images", $html));
 }
开发者ID:jackrabbitjoey,项目名称:shimmie2,代码行数:30,代码来源:theme.php

示例6: display_page

 public function display_page(Page $page, $images)
 {
     global $config;
     if (count($this->search_terms) == 0) {
         $query = null;
         $page_title = $config->get_string('title');
     } else {
         $search_string = implode(' ', $this->search_terms);
         $query = url_escape($search_string);
         $page_title = html_escape($search_string);
         if (count($images) > 0) {
             $page->set_subheading("Page {$this->page_number} / {$this->total_pages}");
         }
     }
     if ($this->page_number > 1 || count($this->search_terms) > 0) {
         // $page_title .= " / $page_number";
     }
     $nav = $this->build_navigation($this->page_number, $this->total_pages, $this->search_terms);
     $page->set_title($page_title);
     $page->set_heading($page_title);
     $page->add_block(new Block("Navigation", $nav, "left", 0));
     if (count($images) > 0) {
         if ($query) {
             $page->add_block(new Block("Images", $this->build_table($images, "search={$query}"), "main", 10));
             $this->display_paginator($page, "post/list/{$query}", null, $this->page_number, $this->total_pages);
         } else {
             $page->add_block(new Block("Images", $this->build_table($images, null), "main", 10));
             $this->display_paginator($page, "post/list", null, $this->page_number, $this->total_pages);
         }
     } else {
         $page->add_block(new Block("No Images Found", "No images were found to match the search criteria"));
     }
 }
开发者ID:kmcasto,项目名称:shimmie2,代码行数:33,代码来源:theme.php

示例7: display_info_page

 public function display_info_page(Page $page, $info)
 {
     $page->set_title("System Info");
     $page->set_heading("System Info");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Information:", $this->build_data_form($info)));
 }
开发者ID:kmcasto,项目名称:shimmie2,代码行数:7,代码来源:theme.php

示例8: display_advanced

 public function display_advanced(Page $page, $options)
 {
     global $user;
     $rows = "";
     $n = 0;
     ksort($options);
     foreach ($options as $name => $value) {
         $h_value = html_escape($value);
         $len = strlen($h_value);
         $oe = $n++ % 2 == 0 ? "even" : "odd";
         $box = "";
         if (strpos($value, "\n") > 0) {
             $box .= "<textarea cols='50' rows='4' name='_config_{$name}'>{$h_value}</textarea>";
         } else {
             $box .= "<input type='text' name='_config_{$name}' value='{$h_value}'>";
         }
         $box .= "<input type='hidden' name='_type_{$name}' value='string'>";
         $rows .= "<tr class='{$oe}'><td>{$name}</td><td>{$box}</td></tr>";
     }
     $table = "\n\t\t\t<script type='text/javascript'>\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$(\"#settings\").tablesorter();\n\t\t\t});\n\t\t\t</script>\n\t\t\t" . make_form(make_link("setup/save")) . "\n\t\t\t\t<table id='settings' class='zebra'>\n\t\t\t\t\t<thead><tr><th width='25%'>Name</th><th>Value</th></tr></thead>\n\t\t\t\t\t<tbody>{$rows}</tbody>\n\t\t\t\t\t<tfoot><tr><td colspan='2'><input type='submit' value='Save Settings'></td></tr></tfoot>\n\t\t\t\t</table>\n\t\t\t</form>\n\t\t\t";
     $page->set_title("Shimmie Setup");
     $page->set_heading("Shimmie Setup");
     $page->add_block(new Block("Navigation", $this->build_navigation(), "left", 0));
     $page->add_block(new Block("Setup", $table));
 }
开发者ID:nsuan,项目名称:shimmie2,代码行数:25,代码来源:theme.php

示例9: display_error

 /**
  * Generic error message display
  */
 public function display_error(Page $page, $title, $message)
 {
     $page->set_title($title);
     $page->set_heading($title);
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Error", $message));
 }
开发者ID:kmcasto,项目名称:shimmie2,代码行数:10,代码来源:themelet.class.php

示例10: display_rotate_error

 /**
  * Display the error.
  *
  * @param Page $page
  * @param string $title
  * @param string $message
  */
 public function display_rotate_error(Page $page, $title, $message)
 {
     $page->set_title("Rotate Image");
     $page->set_heading("Rotate Image");
     $page->add_block(new NavBlock());
     $page->add_block(new Block($title, $message));
 }
开发者ID:JarJak,项目名称:shimmie2,代码行数:14,代码来源:theme.php

示例11: display_results

 public function display_results(Page $page, Image $image)
 {
     $page->set_title("Thumbnail Regenerated");
     $page->set_heading("Thumbnail Regenerated");
     $page->add_header("<meta http-equiv=\"cache-control\" content=\"no-cache\">");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Thumbnail", $this->build_thumb_html($image)));
 }
开发者ID:kmcasto,项目名称:shimmie2,代码行数:8,代码来源:theme.php

示例12: new_pool_composer

 public function new_pool_composer(Page $page)
 {
     $create_html = "<form action=" . make_link("pool/create") . " method='POST'>\n\t\t\t<table>\n\t\t\t<tr><td>Title:</td><td><input type='text' name='title'></td></tr>\n\t\t\t<tr><td>Public?</td><td><input name='public' type='checkbox' value='Y' checked='checked'/></td></tr>\n\t\t\t<tr><td>Description:</td><td><textarea name='description'></textarea></td></tr>\n\t\t\t<tr><td colspan='2'><input type='submit' value='Create' /></td></tr>\n\t\t\t</table>\n\t\t";
     $blockTitle = "Create Pool";
     $page->set_title(html_escape($blockTitle));
     $page->set_heading(html_escape($blockTitle));
     $page->add_block(new Block("Create Pool", $create_html, "main", 20));
 }
开发者ID:jackrabbitjoey,项目名称:shimmie2,代码行数:8,代码来源:theme.php

示例13: display_upload_results

 public function display_upload_results(Page $page)
 {
     $page->set_title("Adding folder");
     $page->set_heading("Adding folder");
     $page->add_block(new NavBlock());
     foreach ($this->messages as $block) {
         $page->add_block($block);
     }
 }
开发者ID:JarJak,项目名称:shimmie2,代码行数:9,代码来源:theme.php

示例14: search_notes_page

    public function search_notes_page(Page $page)
    {
        //IN DEVELOPMENT, NOT FULLY WORKING
        $html = '<form method="GET" action="/furpiledbeta/post/list/note=">
		<input id="search_input" type="text" name="search"/>
		<input type="submit" style="display: none;" value="Find"/>
		</form>';
        $page->set_title(html_escape("Search Note"));
        $page->set_heading(html_escape("Search Note"));
        $page->add_block(new Block("Search Note", $html, "main", 10));
    }
开发者ID:nsuan,项目名称:shimmie2,代码行数:11,代码来源:theme.php

示例15: display_upload_results

 public function display_upload_results(Page $page)
 {
     $page->set_title("Adding folder");
     $page->set_heading("Adding folder");
     $page->add_block(new NavBlock());
     $html = "";
     foreach ($this->messages as $block) {
         $html .= "<br/>" . html_escape($html);
     }
     $page->add_block(new Block("Results", $block));
 }
开发者ID:thelectronicnub,项目名称:shimmie2,代码行数:11,代码来源:theme.php


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