page_number = $page_number;
$this->total_pages = $total_pages;
$this->search_terms = $search_terms;
}
public function display_intro(Page $page)
{
$text = "
The first thing you'll probably want to do is create a new account; note
that the first account you create will by default be marked as the board's
administrator, and any further accounts will be regular users.
Once logged in you can play with the settings, install extra features,
and of course start organising your images :-)
This message will go away once your first image is uploaded~
";
$page->set_title("Welcome to Shimmie ".VERSION);
$page->set_heading("Welcome to Shimmie");
$page->add_block(new Block("Nothing here yet!", $text, "main", 0));
}
/**
* #param Image[] $images
*/
public function display_page(Page $page, array $images)
{
$this->display_shortwiki($page);
$this->display_page_header($page, $images);
$nav = $this->build_navigation($this->page_number, $this->total_pages, $this->search_terms);
$page->add_block(new Block("Navigation", $nav, "left", 0));
if (count($images) > 0) {
$this->display_page_images($page, $images);
} else {
$this->display_error(404, "No posts Found", "No posts were found to match the search criteria");
}
}
/**
* #param string[] $parts
*/
public function display_admin_block(array $parts)
{
global $page;
$page->add_block(new Block("List Controls", join("";
foreach ($images as $image) {
$table .= $this->build_thumb_html($image);
}
$table .= "
";
return $table;
}
protected function display_shortwiki(Page $page)
{
global $config;
if (class_exists('Shimmie2\Wiki') && $config->get_bool(WikiConfig::TAG_SHORTWIKIS)) {
if (count($this->search_terms) == 1) {
$st = Tag::implode($this->search_terms);
$wikiPage = Wiki::get_page($st);
$short_wiki_description = '';
if ($wikiPage->id != -1) {
// only show first line of wiki
$short_wiki_description = explode("\n", $wikiPage->body, 2)[0];
$tfe = send_event(new TextFormattingEvent($short_wiki_description));
$short_wiki_description = $tfe->formatted;
}
$wikiLink = make_link("wiki/$st");
if (class_exists('Shimmie2\TagCategories')) {
$tagcategories = new TagCategories();
$tag_category_dict = $tagcategories->getKeyedDict();
$st = $tagcategories->getTagHtml(html_escape($st), $tag_category_dict);
}
$short_wiki_description = '