[themes] void return type for display_* functions
This commit is contained in:
parent
9c742b56b8
commit
a1f22ef67c
71 changed files with 143 additions and 143 deletions
|
@ -107,7 +107,7 @@ class BaseThemelet
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false)
|
public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false): void
|
||||||
{
|
{
|
||||||
if ($total_pages == 0) {
|
if ($total_pages == 0) {
|
||||||
$total_pages = 1;
|
$total_pages = 1;
|
||||||
|
|
|
@ -9,7 +9,7 @@ class AdminPageTheme extends Themelet
|
||||||
/*
|
/*
|
||||||
* Show the basics of a page, for other extensions to add to
|
* Show the basics of a page, for other extensions to add to
|
||||||
*/
|
*/
|
||||||
public function display_page()
|
public function display_page(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -40,13 +40,13 @@ class ApprovalTheme extends Themelet
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_admin_block(SetupBuildingEvent $event)
|
public function display_admin_block(SetupBuildingEvent $event): void
|
||||||
{
|
{
|
||||||
$sb = $event->panel->create_new_block("Approval");
|
$sb = $event->panel->create_new_block("Approval");
|
||||||
$sb->add_bool_option(ApprovalConfig::IMAGES, "Posts: ");
|
$sb->add_bool_option(ApprovalConfig::IMAGES, "Posts: ");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_admin_form()
|
public function display_admin_form(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,12 @@ use function MicroHTML\TEXTAREA;
|
||||||
|
|
||||||
class BiographyTheme extends Themelet
|
class BiographyTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_biography(Page $page, string $bio)
|
public function display_biography(Page $page, string $bio): void
|
||||||
{
|
{
|
||||||
$page->add_block(new Block("About Me", format_text($bio), "main", 30, "about-me"));
|
$page->add_block(new Block("About Me", format_text($bio), "main", 30, "about-me"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_composer(Page $page, string $bio)
|
public function display_composer(Page $page, string $bio): void
|
||||||
{
|
{
|
||||||
$html = SHM_SIMPLE_FORM(
|
$html = SHM_SIMPLE_FORM(
|
||||||
make_link("biography"),
|
make_link("biography"),
|
||||||
|
|
|
@ -16,7 +16,7 @@ use function MicroHTML\OPTION;
|
||||||
|
|
||||||
class BlocksTheme extends Themelet
|
class BlocksTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_blocks($blocks)
|
public function display_blocks($blocks): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class BlotterTheme extends Themelet
|
class BlotterTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_editor($entries)
|
public function display_editor($entries): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$html = $this->get_html_for_blotter_editor($entries);
|
$html = $this->get_html_for_blotter_editor($entries);
|
||||||
|
@ -16,7 +16,7 @@ class BlotterTheme extends Themelet
|
||||||
$page->add_block(new Block("Navigation", "<a href='".make_link()."'>Index</a>", "left", 0));
|
$page->add_block(new Block("Navigation", "<a href='".make_link()."'>Index</a>", "left", 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_blotter_page($entries)
|
public function display_blotter_page($entries): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$html = $this->get_html_for_blotter_page($entries);
|
$html = $this->get_html_for_blotter_page($entries);
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class BulkActionsTheme extends Themelet
|
class BulkActionsTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_selector(Page $page, array $actions, string $query)
|
public function display_selector(Page $page, array $actions, string $query): void
|
||||||
{
|
{
|
||||||
$body = "<input type='hidden' name='bulk_selected_ids' id='bulk_selected_ids' />
|
$body = "<input type='hidden' name='bulk_selected_ids' id='bulk_selected_ids' />
|
||||||
<input id='bulk_selector_activate' type='button' onclick='activate_bulk_selector();' value='Activate (M)anual Select' accesskey='m'/>
|
<input id='bulk_selector_activate' type='button' onclick='activate_bulk_selector();' value='Activate (M)anual Select' accesskey='m'/>
|
||||||
|
|
|
@ -13,7 +13,7 @@ class BulkAddTheme extends Themelet
|
||||||
*
|
*
|
||||||
* @param UploadResult[] $results
|
* @param UploadResult[] $results
|
||||||
*/
|
*/
|
||||||
public function display_upload_results(Page $page, array $results)
|
public function display_upload_results(Page $page, array $results): void
|
||||||
{
|
{
|
||||||
$page->set_title("Adding folder");
|
$page->set_title("Adding folder");
|
||||||
$page->set_heading("Adding folder");
|
$page->set_heading("Adding folder");
|
||||||
|
@ -34,7 +34,7 @@ class BulkAddTheme extends Themelet
|
||||||
* links to bulk_add with POST[dir] set to the name of a server-side
|
* links to bulk_add with POST[dir] set to the name of a server-side
|
||||||
* directory full of images
|
* directory full of images
|
||||||
*/
|
*/
|
||||||
public function display_admin_block()
|
public function display_admin_block(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$html = "
|
$html = "
|
||||||
|
|
|
@ -11,7 +11,7 @@ class BulkAddCSVTheme extends Themelet
|
||||||
/*
|
/*
|
||||||
* Show a standard page for results to be put into
|
* Show a standard page for results to be put into
|
||||||
*/
|
*/
|
||||||
public function display_upload_results(Page $page)
|
public function display_upload_results(Page $page): void
|
||||||
{
|
{
|
||||||
$page->set_title("Adding posts from csv");
|
$page->set_title("Adding posts from csv");
|
||||||
$page->set_heading("Adding posts from csv");
|
$page->set_heading("Adding posts from csv");
|
||||||
|
@ -26,7 +26,7 @@ class BulkAddCSVTheme extends Themelet
|
||||||
* links to bulk_add_csv with POST[csv] set to the name of a server-side
|
* links to bulk_add_csv with POST[csv] set to the name of a server-side
|
||||||
* csv file
|
* csv file
|
||||||
*/
|
*/
|
||||||
public function display_admin_block()
|
public function display_admin_block(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$html = "
|
$html = "
|
||||||
|
|
|
@ -13,7 +13,7 @@ class CommentListTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* Display a page with a list of images, and for each image, the image's comments.
|
* Display a page with a list of images, and for each image, the image's comments.
|
||||||
*/
|
*/
|
||||||
public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post)
|
public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post): void
|
||||||
{
|
{
|
||||||
global $config, $page, $user;
|
global $config, $page, $user;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ class CommentListTheme extends Themelet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_admin_block()
|
public function display_admin_block(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ class CommentListTheme extends Themelet
|
||||||
*
|
*
|
||||||
* @param Comment[] $comments An array of Comment objects to be shown
|
* @param Comment[] $comments An array of Comment objects to be shown
|
||||||
*/
|
*/
|
||||||
public function display_recent_comments(array $comments)
|
public function display_recent_comments(array $comments): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$this->show_anon_id = false;
|
$this->show_anon_id = false;
|
||||||
|
@ -130,7 +130,7 @@ class CommentListTheme extends Themelet
|
||||||
*
|
*
|
||||||
* @param Comment[] $comments
|
* @param Comment[] $comments
|
||||||
*/
|
*/
|
||||||
public function display_image_comments(Image $image, array $comments, bool $postbox)
|
public function display_image_comments(Image $image, array $comments, bool $postbox): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$this->show_anon_id = true;
|
$this->show_anon_id = true;
|
||||||
|
@ -149,7 +149,7 @@ class CommentListTheme extends Themelet
|
||||||
*
|
*
|
||||||
* @param Comment[] $comments
|
* @param Comment[] $comments
|
||||||
*/
|
*/
|
||||||
public function display_recent_user_comments(array $comments, User $user)
|
public function display_recent_user_comments(array $comments, User $user): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$html = "";
|
$html = "";
|
||||||
|
@ -164,7 +164,7 @@ class CommentListTheme extends Themelet
|
||||||
$page->add_block(new Block("Comments", $html, "left", 70, "comment-list-user"));
|
$page->add_block(new Block("Comments", $html, "left", 70, "comment-list-user"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_all_user_comments(array $comments, int $page_number, int $total_pages, User $user)
|
public function display_all_user_comments(array $comments, int $page_number, int $total_pages, User $user): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ class CronUploaderTheme extends Themelet
|
||||||
return (string)$html;
|
return (string)$html;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_form(array $failed_dirs)
|
public function display_form(array $failed_dirs): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ class DowntimeTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* Show the admin that downtime mode is enabled
|
* Show the admin that downtime mode is enabled
|
||||||
*/
|
*/
|
||||||
public function display_notification(Page $page)
|
public function display_notification(Page $page): void
|
||||||
{
|
{
|
||||||
$page->add_block(new Block(
|
$page->add_block(new Block(
|
||||||
"Downtime",
|
"Downtime",
|
||||||
|
@ -22,7 +22,7 @@ class DowntimeTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* Display $message and exit
|
* Display $message and exit
|
||||||
*/
|
*/
|
||||||
public function display_message(string $message)
|
public function display_message(string $message): void
|
||||||
{
|
{
|
||||||
global $config, $user, $page;
|
global $config, $user, $page;
|
||||||
$theme_name = $config->get_string(SetupConfig::THEME);
|
$theme_name = $config->get_string(SetupConfig::THEME);
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class EmoticonListTheme extends Themelet
|
class EmoticonListTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_emotes(array $list)
|
public function display_emotes(array $list): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$data_href = get_base_href();
|
$data_href = get_base_href();
|
||||||
|
|
|
@ -16,7 +16,7 @@ class ETTheme extends Themelet
|
||||||
*
|
*
|
||||||
* $info = an array of ($name => $value)
|
* $info = an array of ($name => $value)
|
||||||
*/
|
*/
|
||||||
public function display_info_page($yaml)
|
public function display_info_page($yaml): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class ExtManagerTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* @param ExtensionInfo[] $extensions
|
* @param ExtensionInfo[] $extensions
|
||||||
*/
|
*/
|
||||||
public function display_table(Page $page, array $extensions, bool $editable)
|
public function display_table(Page $page, array $extensions, bool $editable): void
|
||||||
{
|
{
|
||||||
$tbody = TBODY();
|
$tbody = TBODY();
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ class ExtManagerTheme extends Themelet
|
||||||
$page->add_block(new Block("Extension Manager", $form));
|
$page->add_block(new Block("Extension Manager", $form));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_doc(Page $page, ExtensionInfo $info)
|
public function display_doc(Page $page, ExtensionInfo $info): void
|
||||||
{
|
{
|
||||||
$author = emptyHTML();
|
$author = emptyHTML();
|
||||||
if (count($info->authors) > 0) {
|
if (count($info->authors) > 0) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ use function MicroHTML\{INPUT, LABEL, SMALL, TEXTAREA, TR, TD, TABLE, TH, TBODY,
|
||||||
|
|
||||||
class ForumTheme extends Themelet
|
class ForumTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_thread_list(Page $page, $threads, $showAdminOptions, $pageNumber, $totalPages)
|
public function display_thread_list(Page $page, $threads, $showAdminOptions, $pageNumber, $totalPages): void
|
||||||
{
|
{
|
||||||
if (count($threads) == 0) {
|
if (count($threads) == 0) {
|
||||||
$html = "There are no threads to show.";
|
$html = "There are no threads to show.";
|
||||||
|
@ -27,7 +27,7 @@ class ForumTheme extends Themelet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function display_new_thread_composer(Page $page, $threadText = null, $threadTitle = null)
|
public function display_new_thread_composer(Page $page, $threadText = null, $threadTitle = null): void
|
||||||
{
|
{
|
||||||
global $config, $user;
|
global $config, $user;
|
||||||
$max_characters = $config->get_int('forumMaxCharsPerPost');
|
$max_characters = $config->get_int('forumMaxCharsPerPost');
|
||||||
|
@ -75,7 +75,7 @@ class ForumTheme extends Themelet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function display_new_post_composer(Page $page, $threadID)
|
public function display_new_post_composer(Page $page, $threadID): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class ForumTheme extends Themelet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function display_thread($posts, $showAdminOptions, $threadTitle, $threadID, $pageNumber, $totalPages)
|
public function display_thread($posts, $showAdminOptions, $threadTitle, $threadID, $pageNumber, $totalPages): void
|
||||||
{
|
{
|
||||||
global $config, $page/*, $user*/;
|
global $config, $page/*, $user*/;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CBZFileHandlerTheme extends Themelet
|
class CBZFileHandlerTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_image(Image $image)
|
public function display_image(Image $image): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$data_href = get_base_href();
|
$data_href = get_base_href();
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class IcoFileHandlerTheme extends Themelet
|
class IcoFileHandlerTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_image(Image $image)
|
public function display_image(Image $image): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$ilink = $image->get_image_link();
|
$ilink = $image->get_image_link();
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class MP3FileHandlerTheme extends Themelet
|
class MP3FileHandlerTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_image(Image $image)
|
public function display_image(Image $image): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$data_href = get_base_href();
|
$data_href = get_base_href();
|
||||||
|
|
|
@ -8,7 +8,7 @@ use function MicroHTML\IMG;
|
||||||
|
|
||||||
class PixelFileHandlerTheme extends Themelet
|
class PixelFileHandlerTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_image(Image $image)
|
public function display_image(Image $image): void
|
||||||
{
|
{
|
||||||
global $config, $page;
|
global $config, $page;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class PixelFileHandlerTheme extends Themelet
|
||||||
$page->add_block(new Block("Image", $html, "main", 10));
|
$page->add_block(new Block("Image", $html, "main", 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_metadata(Image $image)
|
public function display_metadata(Image $image): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class SVGFileHandlerTheme extends Themelet
|
class SVGFileHandlerTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_image(Image $image)
|
public function display_image(Image $image): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$ilink = make_link("get_svg/{$image->id}/{$image->id}.svg");
|
$ilink = make_link("get_svg/{$image->id}/{$image->id}.svg");
|
||||||
|
|
|
@ -8,7 +8,7 @@ use function MicroHTML\{A, BR, VIDEO, SOURCE, emptyHTML};
|
||||||
|
|
||||||
class VideoFileHandlerTheme extends Themelet
|
class VideoFileHandlerTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_image(Image $image)
|
public function display_image(Image $image): void
|
||||||
{
|
{
|
||||||
global $config, $page;
|
global $config, $page;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class HelpPagesTheme extends Themelet
|
class HelpPagesTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_list_page(array $pages)
|
public function display_list_page(array $pages): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ class HelpPagesTheme extends Themelet
|
||||||
$page->add_block(new Block("Help Pages", "See list of pages to left"));
|
$page->add_block(new Block("Help Pages", "See list of pages to left"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_help_page(string $title)
|
public function display_help_page(string $title): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class HolidayTheme extends Themelet
|
class HolidayTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_holiday(?string $holiday)
|
public function display_holiday(?string $holiday): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
if ($holiday) {
|
if ($holiday) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ class IndexTheme extends Themelet
|
||||||
$this->search_terms = $search_terms;
|
$this->search_terms = $search_terms;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_intro(Page $page)
|
public function display_intro(Page $page): void
|
||||||
{
|
{
|
||||||
$text = "
|
$text = "
|
||||||
<div style='text-align: left;'>
|
<div style='text-align: left;'>
|
||||||
|
@ -44,7 +44,7 @@ and of course start organising your images :-)
|
||||||
/**
|
/**
|
||||||
* @param Image[] $images
|
* @param Image[] $images
|
||||||
*/
|
*/
|
||||||
public function display_page(Page $page, array $images)
|
public function display_page(Page $page, array $images): void
|
||||||
{
|
{
|
||||||
$this->display_shortwiki($page);
|
$this->display_shortwiki($page);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ and of course start organising your images :-)
|
||||||
/**
|
/**
|
||||||
* @param string[] $parts
|
* @param string[] $parts
|
||||||
*/
|
*/
|
||||||
public function display_admin_block(array $parts)
|
public function display_admin_block(array $parts): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->add_block(new Block("List Controls", join("<br>", $parts), "left", 50));
|
$page->add_block(new Block("List Controls", join("<br>", $parts), "left", 50));
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class IPBanTheme extends Themelet
|
class IPBanTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_bans(Page $page, $table, $paginator)
|
public function display_bans(Page $page, $table, $paginator): void
|
||||||
{
|
{
|
||||||
$html = "
|
$html = "
|
||||||
<a href='".make_link("ip_ban/list", "r__size=1000000")."'>Show All Active</a> /
|
<a href='".make_link("ip_ban/list", "r__size=1000000")."'>Show All Active</a> /
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class LogDatabaseTheme extends Themelet
|
class LogDatabaseTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_events($table, $paginator)
|
public function display_events($table, $paginator): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->set_title("Event Log");
|
$page->set_title("Event Log");
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class NotATagTheme extends Themelet
|
class NotATagTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_untags(Page $page, $table, $paginator)
|
public function display_untags(Page $page, $table, $paginator): void
|
||||||
{
|
{
|
||||||
$page->set_title("UnTags");
|
$page->set_title("UnTags");
|
||||||
$page->set_heading("UnTags");
|
$page->set_heading("UnTags");
|
||||||
|
|
|
@ -74,7 +74,7 @@ class NotesTheme extends Themelet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function display_note_list($images, $pageNumber, $totalPages)
|
public function display_note_list($images, $pageNumber, $totalPages): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$pool_images = '';
|
$pool_images = '';
|
||||||
|
@ -94,7 +94,7 @@ class NotesTheme extends Themelet
|
||||||
$page->add_block(new Block("Notes", $pool_images, "main", 20));
|
$page->add_block(new Block("Notes", $pool_images, "main", 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_note_requests($images, $pageNumber, $totalPages)
|
public function display_note_requests($images, $pageNumber, $totalPages): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ class NotesTheme extends Themelet
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_histories($histories, $pageNumber, $totalPages)
|
public function display_histories($histories, $pageNumber, $totalPages): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ class NotesTheme extends Themelet
|
||||||
$this->display_paginator($page, "note/updated", null, $pageNumber, $totalPages);
|
$this->display_paginator($page, "note/updated", null, $pageNumber, $totalPages);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_history($histories, $pageNumber, $totalPages)
|
public function display_history($histories, $pageNumber, $totalPages): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class PrivMsgTheme extends Themelet
|
class PrivMsgTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_pms(Page $page, $pms)
|
public function display_pms(Page $page, $pms): void
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class PrivMsgTheme extends Themelet
|
||||||
$page->add_block(new Block("Private Messages", $html, "main", 40, "private-messages"));
|
$page->add_block(new Block("Private Messages", $html, "main", 40, "private-messages"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_composer(Page $page, User $from, User $to, $subject = "")
|
public function display_composer(Page $page, User $from, User $to, $subject = ""): void
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
$post_url = make_link("pm/send");
|
$post_url = make_link("pm/send");
|
||||||
|
@ -79,7 +79,7 @@ EOD;
|
||||||
$page->add_block(new Block("Write a PM", $html, "main", 50));
|
$page->add_block(new Block("Write a PM", $html, "main", 50));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_message(Page $page, User $from, User $to, PM $pm)
|
public function display_message(Page $page, User $from, User $to, PM $pm): void
|
||||||
{
|
{
|
||||||
$page->set_title("Private Message");
|
$page->set_title("Private Message");
|
||||||
$page->set_heading(html_escape($pm->subject));
|
$page->set_heading(html_escape($pm->subject));
|
||||||
|
|
|
@ -10,7 +10,7 @@ use function MicroHTML\IMG;
|
||||||
|
|
||||||
class RandomImageTheme extends Themelet
|
class RandomImageTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_random(Page $page, Image $image)
|
public function display_random(Page $page, Image $image): void
|
||||||
{
|
{
|
||||||
$page->add_block(new Block("Random Post", $this->build_random_html($image), "left", 8));
|
$page->add_block(new Block("Random Post", $this->build_random_html($image), "left", 8));
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ class RandomListTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* @param Image[] $images
|
* @param Image[] $images
|
||||||
*/
|
*/
|
||||||
public function display_page(Page $page, array $images)
|
public function display_page(Page $page, array $images): void
|
||||||
{
|
{
|
||||||
$page->title = "Random Posts";
|
$page->title = "Random Posts";
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class RatingsTheme extends Themelet
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_form(array $current_ratings)
|
public function display_form(array $current_ratings): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class RegenThumbTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* Show a link to the new thumbnail.
|
* Show a link to the new thumbnail.
|
||||||
*/
|
*/
|
||||||
public function display_results(Page $page, Image $image)
|
public function display_results(Page $page, Image $image): void
|
||||||
{
|
{
|
||||||
$page->set_title("Thumbnail Regenerated");
|
$page->set_title("Thumbnail Regenerated");
|
||||||
$page->set_heading("Thumbnail Regenerated");
|
$page->set_heading("Thumbnail Regenerated");
|
||||||
|
|
|
@ -16,7 +16,7 @@ class ReplaceFileTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* Only allows 1 file to be uploaded - for replacing another image file.
|
* Only allows 1 file to be uploaded - for replacing another image file.
|
||||||
*/
|
*/
|
||||||
public function display_replace_page(Page $page, int $image_id)
|
public function display_replace_page(Page $page, int $image_id): void
|
||||||
{
|
{
|
||||||
global $config, $page;
|
global $config, $page;
|
||||||
$tl_enabled = ($config->get_string(UploadConfig::TRANSLOAD_ENGINE, "none") != "none");
|
$tl_enabled = ($config->get_string(UploadConfig::TRANSLOAD_ENGINE, "none") != "none");
|
||||||
|
|
|
@ -8,7 +8,7 @@ use function MicroHTML\INPUT;
|
||||||
|
|
||||||
class ReportImageTheme extends Themelet
|
class ReportImageTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_reported_images(Page $page, array $reports)
|
public function display_reported_images(Page $page, array $reports): void
|
||||||
{
|
{
|
||||||
global $config, $user;
|
global $config, $user;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class ReportImageTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* @param ImageReport[] $reports
|
* @param ImageReport[] $reports
|
||||||
*/
|
*/
|
||||||
public function display_image_banner(Image $image, array $reports)
|
public function display_image_banner(Image $image, array $reports): void
|
||||||
{
|
{
|
||||||
global $config, $page;
|
global $config, $page;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ class ResizeImageTheme extends Themelet
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_resize_error(Page $page, string $title, string $message)
|
public function display_resize_error(Page $page, string $title, string $message): void
|
||||||
{
|
{
|
||||||
$page->set_title("Resize Image");
|
$page->set_title("Resize Image");
|
||||||
$page->set_heading("Resize Image");
|
$page->set_heading("Resize Image");
|
||||||
|
|
|
@ -24,7 +24,7 @@ class RotateImageTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* Display the error.
|
* Display the error.
|
||||||
*/
|
*/
|
||||||
public function display_rotate_error(Page $page, string $title, string $message)
|
public function display_rotate_error(Page $page, string $title, string $message): void
|
||||||
{
|
{
|
||||||
$page->set_title("Rotate Image");
|
$page->set_title("Rotate Image");
|
||||||
$page->set_heading("Rotate Image");
|
$page->set_heading("Rotate Image");
|
||||||
|
|
|
@ -17,7 +17,7 @@ class SetupTheme extends Themelet
|
||||||
*
|
*
|
||||||
* The page should wrap all the options in a form which links to setup_save
|
* The page should wrap all the options in a form which links to setup_save
|
||||||
*/
|
*/
|
||||||
public function display_page(Page $page, SetupPanel $panel)
|
public function display_page(Page $page, SetupPanel $panel): void
|
||||||
{
|
{
|
||||||
usort($panel->blocks, "Shimmie2\blockcmp");
|
usort($panel->blocks, "Shimmie2\blockcmp");
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class SetupTheme extends Themelet
|
||||||
$page->add_block(new Block("Setup", $table));
|
$page->add_block(new Block("Setup", $table));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_advanced(Page $page, $options)
|
public function display_advanced(Page $page, $options): void
|
||||||
{
|
{
|
||||||
$h_rows = "";
|
$h_rows = "";
|
||||||
ksort($options);
|
ksort($options);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class SourceHistoryTheme extends Themelet
|
||||||
{
|
{
|
||||||
private array $messages = [];
|
private array $messages = [];
|
||||||
|
|
||||||
public function display_history_page(Page $page, int $image_id, array $history)
|
public function display_history_page(Page $page, int $image_id, array $history): void
|
||||||
{
|
{
|
||||||
$history_html = $this->history_list($history, true);
|
$history_html = $this->history_list($history, true);
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class SourceHistoryTheme extends Themelet
|
||||||
$page->add_block(new Block("Source History", $history_html, "main", 10));
|
$page->add_block(new Block("Source History", $history_html, "main", 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_global_page(Page $page, array $history, int $page_number)
|
public function display_global_page(Page $page, array $history, int $page_number): void
|
||||||
{
|
{
|
||||||
$history_html = $this->history_list($history, false);
|
$history_html = $this->history_list($history, false);
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class SourceHistoryTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* Add a section to the admin page.
|
* Add a section to the admin page.
|
||||||
*/
|
*/
|
||||||
public function display_admin_block(string $validation_msg = '')
|
public function display_admin_block(string $validation_msg = ''): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class SourceHistoryTheme extends Themelet
|
||||||
/*
|
/*
|
||||||
* Show a standard page for results to be put into
|
* Show a standard page for results to be put into
|
||||||
*/
|
*/
|
||||||
public function display_revert_ip_results()
|
public function display_revert_ip_results(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$html = implode("\n", $this->messages);
|
$html = implode("\n", $this->messages);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class TagEditTheme extends Themelet
|
||||||
* Display a form which links to tag_edit/replace with POST[search]
|
* Display a form which links to tag_edit/replace with POST[search]
|
||||||
* and POST[replace] set appropriately
|
* and POST[replace] set appropriately
|
||||||
*/
|
*/
|
||||||
public function display_mass_editor()
|
public function display_mass_editor(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$html = "
|
$html = "
|
||||||
|
|
|
@ -15,7 +15,7 @@ class TagHistoryTheme extends Themelet
|
||||||
{
|
{
|
||||||
private array $messages = [];
|
private array $messages = [];
|
||||||
|
|
||||||
public function display_history_page(Page $page, int $image_id, array $history)
|
public function display_history_page(Page $page, int $image_id, array $history): void
|
||||||
{
|
{
|
||||||
$history_html = $this->history_list($history, true);
|
$history_html = $this->history_list($history, true);
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class TagHistoryTheme extends Themelet
|
||||||
$page->add_block(new Block("Tag History", $history_html, "main", 10));
|
$page->add_block(new Block("Tag History", $history_html, "main", 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_global_page(Page $page, array $history, int $page_number)
|
public function display_global_page(Page $page, array $history, int $page_number): void
|
||||||
{
|
{
|
||||||
$history_html = $this->history_list($history, false);
|
$history_html = $this->history_list($history, false);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class TagHistoryTheme extends Themelet
|
||||||
/**
|
/**
|
||||||
* Add a section to the admin page.
|
* Add a section to the admin page.
|
||||||
*/
|
*/
|
||||||
public function display_admin_block(string $validation_msg = '')
|
public function display_admin_block(string $validation_msg = ''): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class TagHistoryTheme extends Themelet
|
||||||
/*
|
/*
|
||||||
* Show a standard page for results to be put into
|
* Show a standard page for results to be put into
|
||||||
*/
|
*/
|
||||||
public function display_revert_ip_results()
|
public function display_revert_ip_results(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$html = implode("\n", $this->messages);
|
$html = implode("\n", $this->messages);
|
||||||
|
|
|
@ -26,7 +26,7 @@ class TagListTheme extends Themelet
|
||||||
$this->navigation = $nav;
|
$this->navigation = $nav;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_page(Page $page)
|
public function display_page(Page $page): void
|
||||||
{
|
{
|
||||||
$page->set_title("Tag List");
|
$page->set_title("Tag List");
|
||||||
$page->set_heading($this->heading);
|
$page->set_heading($this->heading);
|
||||||
|
@ -66,7 +66,7 @@ class TagListTheme extends Themelet
|
||||||
* ...
|
* ...
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function display_split_related_block(Page $page, $tag_infos)
|
public function display_split_related_block(Page $page, $tag_infos): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ class TagListTheme extends Themelet
|
||||||
* ...
|
* ...
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function display_related_block(Page $page, $tag_infos, $block_name)
|
public function display_related_block(Page $page, $tag_infos, $block_name): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ class TagListTheme extends Themelet
|
||||||
* ...
|
* ...
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function display_popular_block(Page $page, $tag_infos)
|
public function display_popular_block(Page $page, $tag_infos): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ class TagListTheme extends Themelet
|
||||||
* )
|
* )
|
||||||
* $search = the current array of tags being searched for
|
* $search = the current array of tags being searched for
|
||||||
*/
|
*/
|
||||||
public function display_refine_block(Page $page, $tag_infos, $search)
|
public function display_refine_block(Page $page, $tag_infos, $search): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class TagToolsTheme extends Themelet
|
||||||
* 'recount tag use'
|
* 'recount tag use'
|
||||||
* etc
|
* etc
|
||||||
*/
|
*/
|
||||||
public function display_form()
|
public function display_form(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class UpdateTheme extends Themelet
|
class UpdateTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_admin_block()
|
public function display_admin_block(): void
|
||||||
{
|
{
|
||||||
global $page, $config;
|
global $page, $config;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ use function MicroHTML\OPTION;
|
||||||
|
|
||||||
class UserPageTheme extends Themelet
|
class UserPageTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_login_page(Page $page)
|
public function display_login_page(Page $page): void
|
||||||
{
|
{
|
||||||
$page->set_title("Login");
|
$page->set_title("Login");
|
||||||
$page->set_heading("Login");
|
$page->set_heading("Login");
|
||||||
|
@ -36,7 +36,7 @@ class UserPageTheme extends Themelet
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_list(Page $page, $table, $paginator)
|
public function display_user_list(Page $page, $table, $paginator): void
|
||||||
{
|
{
|
||||||
$page->set_title("User List");
|
$page->set_title("User List");
|
||||||
$page->set_heading("User List");
|
$page->set_heading("User List");
|
||||||
|
@ -44,12 +44,12 @@ class UserPageTheme extends Themelet
|
||||||
$page->add_block(new Block("Users", $table . $paginator));
|
$page->add_block(new Block("Users", $table . $paginator));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_links(Page $page, User $user, $parts)
|
public function display_user_links(Page $page, User $user, $parts): void
|
||||||
{
|
{
|
||||||
# $page->add_block(new Block("User Links", join(", ", $parts), "main", 10));
|
# $page->add_block(new Block("User Links", join(", ", $parts), "main", 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_block(Page $page, User $user, $parts)
|
public function display_user_block(Page $page, User $user, $parts): void
|
||||||
{
|
{
|
||||||
$html = emptyHTML('Logged in as ', $user->name);
|
$html = emptyHTML('Logged in as ', $user->name);
|
||||||
foreach ($parts as $part) {
|
foreach ($parts as $part) {
|
||||||
|
@ -61,7 +61,7 @@ class UserPageTheme extends Themelet
|
||||||
$page->add_block($b);
|
$page->add_block($b);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_signup_page(Page $page)
|
public function display_signup_page(Page $page): void
|
||||||
{
|
{
|
||||||
global $config, $user;
|
global $config, $user;
|
||||||
$tac = $config->get_string("login_tac", "");
|
$tac = $config->get_string("login_tac", "");
|
||||||
|
@ -117,7 +117,7 @@ class UserPageTheme extends Themelet
|
||||||
$page->add_block(new Block("Signup", $html));
|
$page->add_block(new Block("Signup", $html));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_creator()
|
public function display_user_creator(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ class UserPageTheme extends Themelet
|
||||||
$page->add_block(new Block("Create User", (string)$form, "main", 75));
|
$page->add_block(new Block("Create User", (string)$form, "main", 75));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_signups_disabled(Page $page)
|
public function display_signups_disabled(Page $page): void
|
||||||
{
|
{
|
||||||
$page->set_title("Signups Disabled");
|
$page->set_title("Signups Disabled");
|
||||||
$page->set_heading("Signups Disabled");
|
$page->set_heading("Signups Disabled");
|
||||||
|
@ -165,7 +165,7 @@ class UserPageTheme extends Themelet
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_login_block(Page $page)
|
public function display_login_block(Page $page): void
|
||||||
{
|
{
|
||||||
$page->add_block(new Block("Login", $this->create_login_block(), "left", 90));
|
$page->add_block(new Block("Login", $this->create_login_block(), "left", 90));
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ class UserPageTheme extends Themelet
|
||||||
return $td;
|
return $td;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_ip_list(Page $page, array $uploads, array $comments, array $events)
|
public function display_ip_list(Page $page, array $uploads, array $comments, array $events): void
|
||||||
{
|
{
|
||||||
$html = TABLE(
|
$html = TABLE(
|
||||||
["id" => "ip-history"],
|
["id" => "ip-history"],
|
||||||
|
@ -235,7 +235,7 @@ class UserPageTheme extends Themelet
|
||||||
$page->add_block(new Block("IPs", $html, "main", 70));
|
$page->add_block(new Block("IPs", $html, "main", 70));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_page(User $duser, $stats)
|
public function display_user_page(User $duser, $stats): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
assert(is_array($stats));
|
assert(is_array($stats));
|
||||||
|
|
|
@ -39,7 +39,7 @@ class UserConfigTheme extends Themelet
|
||||||
*
|
*
|
||||||
* The page should wrap all the options in a form which links to setup_save
|
* The page should wrap all the options in a form which links to setup_save
|
||||||
*/
|
*/
|
||||||
public function display_user_config_page(Page $page, User $user, SetupPanel $panel)
|
public function display_user_config_page(Page $page, User $user, SetupPanel $panel): void
|
||||||
{
|
{
|
||||||
usort($panel->blocks, "Shimmie2\blockcmp");
|
usort($panel->blocks, "Shimmie2\blockcmp");
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ use function MicroHTML\{A, joinHTML, TABLE, TR, TD, INPUT, emptyHTML};
|
||||||
|
|
||||||
class ViewPostTheme extends Themelet
|
class ViewPostTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function display_meta_headers(Image $image)
|
public function display_meta_headers(Image $image): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class ViewPostTheme extends Themelet
|
||||||
/*
|
/*
|
||||||
* Build a page showing $image and some info about it
|
* Build a page showing $image and some info about it
|
||||||
*/
|
*/
|
||||||
public function display_page(Image $image, $editor_parts)
|
public function display_page(Image $image, $editor_parts): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->set_title("Post {$image->id}: ".$image->get_tag_list());
|
$page->set_title("Post {$image->id}: ".$image->get_tag_list());
|
||||||
|
@ -41,7 +41,7 @@ class ViewPostTheme extends Themelet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_admin_block(Page $page, $parts)
|
public function display_admin_block(Page $page, $parts): void
|
||||||
{
|
{
|
||||||
if (count($parts) > 0) {
|
if (count($parts) > 0) {
|
||||||
$page->add_block(new Block("Post Controls", join("<br>", $parts), "left", 50));
|
$page->add_block(new Block("Post Controls", join("<br>", $parts), "left", 50));
|
||||||
|
|
|
@ -12,7 +12,7 @@ class WikiTheme extends Themelet
|
||||||
* $wiki_page The wiki page, has ->title and ->body
|
* $wiki_page The wiki page, has ->title and ->body
|
||||||
* $nav_page A wiki page object with navigation, has ->body
|
* $nav_page A wiki page object with navigation, has ->body
|
||||||
*/
|
*/
|
||||||
public function display_page(Page $page, WikiPage $wiki_page, ?WikiPage $nav_page = null)
|
public function display_page(Page $page, WikiPage $wiki_page, ?WikiPage $nav_page = null): void
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class WikiTheme extends Themelet
|
||||||
$page->add_block(new Block($title_html, $this->create_display_html($wiki_page)));
|
$page->add_block(new Block($title_html, $this->create_display_html($wiki_page)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_page_history(Page $page, string $title, array $history)
|
public function display_page_history(Page $page, string $title, array $history): void
|
||||||
{
|
{
|
||||||
$html = "<table class='zebra'>";
|
$html = "<table class='zebra'>";
|
||||||
foreach ($history as $row) {
|
foreach ($history as $row) {
|
||||||
|
@ -61,7 +61,7 @@ class WikiTheme extends Themelet
|
||||||
$page->add_block(new Block(html_escape($title), $html));
|
$page->add_block(new Block(html_escape($title), $html));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_page_editor(Page $page, WikiPage $wiki_page)
|
public function display_page_editor(Page $page, WikiPage $wiki_page): void
|
||||||
{
|
{
|
||||||
$page->set_title(html_escape($wiki_page->title));
|
$page->set_title(html_escape($wiki_page->title));
|
||||||
$page->set_heading(html_escape($wiki_page->title));
|
$page->set_heading(html_escape($wiki_page->title));
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomCommentListTheme extends CommentListTheme
|
class CustomCommentListTheme extends CommentListTheme
|
||||||
{
|
{
|
||||||
public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post)
|
public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post): void
|
||||||
{
|
{
|
||||||
global $config, $page, $user;
|
global $config, $page, $user;
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class CustomCommentListTheme extends CommentListTheme
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_recent_comments(array $comments)
|
public function display_recent_comments(array $comments): void
|
||||||
{
|
{
|
||||||
// no recent comments in this theme
|
// no recent comments in this theme
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ class CustomIndexTheme extends IndexTheme
|
||||||
/**
|
/**
|
||||||
* @param Image[] $images
|
* @param Image[] $images
|
||||||
*/
|
*/
|
||||||
public function display_page(Page $page, array $images)
|
public function display_page(Page $page, array $images): void
|
||||||
{
|
{
|
||||||
$this->display_shortwiki($page);
|
$this->display_shortwiki($page);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomTagListTheme extends TagListTheme
|
class CustomTagListTheme extends TagListTheme
|
||||||
{
|
{
|
||||||
public function display_page(Page $page)
|
public function display_page(Page $page): void
|
||||||
{
|
{
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
parent::display_page($page);
|
parent::display_page($page);
|
||||||
|
|
|
@ -10,7 +10,7 @@ use function MicroHTML\{A, B, DIV, joinHTML};
|
||||||
|
|
||||||
class Themelet extends BaseThemelet
|
class Themelet extends BaseThemelet
|
||||||
{
|
{
|
||||||
public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false)
|
public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false): void
|
||||||
{
|
{
|
||||||
if ($total_pages == 0) {
|
if ($total_pages == 0) {
|
||||||
$total_pages = 1;
|
$total_pages = 1;
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomUserPageTheme extends UserPageTheme
|
class CustomUserPageTheme extends UserPageTheme
|
||||||
{
|
{
|
||||||
public function display_login_page(Page $page)
|
public function display_login_page(Page $page): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$page->set_title("Login");
|
$page->set_title("Login");
|
||||||
|
@ -33,16 +33,16 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("Login", $html, "main", 90));
|
$page->add_block(new Block("Login", $html, "main", 90));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_links(Page $page, User $user, $parts)
|
public function display_user_links(Page $page, User $user, $parts): void
|
||||||
{
|
{
|
||||||
// no block in this theme
|
// no block in this theme
|
||||||
}
|
}
|
||||||
public function display_login_block(Page $page)
|
public function display_login_block(Page $page): void
|
||||||
{
|
{
|
||||||
// no block in this theme
|
// no block in this theme
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_block(Page $page, User $user, $parts)
|
public function display_user_block(Page $page, User $user, $parts): void
|
||||||
{
|
{
|
||||||
$html = "";
|
$html = "";
|
||||||
$blocked = ["Pools", "Pool Changes", "Alias Editor", "My Profile"];
|
$blocked = ["Pools", "Pool Changes", "Alias Editor", "My Profile"];
|
||||||
|
@ -57,7 +57,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block($b);
|
$page->add_block($b);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_signup_page(Page $page)
|
public function display_signup_page(Page $page): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$tac = $config->get_string("login_tac", "");
|
$tac = $config->get_string("login_tac", "");
|
||||||
|
@ -91,7 +91,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("Signup", $html));
|
$page->add_block(new Block("Signup", $html));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_ip_list(Page $page, array $uploads, array $comments, array $events)
|
public function display_ip_list(Page $page, array $uploads, array $comments, array $events): void
|
||||||
{
|
{
|
||||||
$html = "<table id='ip-history' style='width: 400px;'>";
|
$html = "<table id='ip-history' style='width: 400px;'>";
|
||||||
$html .= "<tr><td>Uploaded from: ";
|
$html .= "<tr><td>Uploaded from: ";
|
||||||
|
@ -108,7 +108,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("IPs", $html));
|
$page->add_block(new Block("IPs", $html));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_page(User $duser, $stats)
|
public function display_user_page(User $duser, $stats): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomViewPostTheme extends ViewPostTheme
|
class CustomViewPostTheme extends ViewPostTheme
|
||||||
{
|
{
|
||||||
public function display_page(Image $image, $editor_parts)
|
public function display_page(Image $image, $editor_parts): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->set_heading(html_escape($image->get_tag_list()));
|
$page->set_heading(html_escape($image->get_tag_list()));
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomAdminPageTheme extends AdminPageTheme
|
class CustomAdminPageTheme extends AdminPageTheme
|
||||||
{
|
{
|
||||||
public function display_page()
|
public function display_page(): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomCommentListTheme extends CommentListTheme
|
class CustomCommentListTheme extends CommentListTheme
|
||||||
{
|
{
|
||||||
public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post)
|
public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post): void
|
||||||
{
|
{
|
||||||
global $config, $page, $user;
|
global $config, $page, $user;
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class CustomCommentListTheme extends CommentListTheme
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_recent_comments(array $comments)
|
public function display_recent_comments(array $comments): void
|
||||||
{
|
{
|
||||||
// no recent comments in this theme
|
// no recent comments in this theme
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,13 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomExtManagerTheme extends ExtManagerTheme
|
class CustomExtManagerTheme extends ExtManagerTheme
|
||||||
{
|
{
|
||||||
public function display_table(Page $page, array $extensions, bool $editable)
|
public function display_table(Page $page, array $extensions, bool $editable): void
|
||||||
{
|
{
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
parent::display_table($page, $extensions, $editable);
|
parent::display_table($page, $extensions, $editable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_doc(Page $page, ExtensionInfo $info)
|
public function display_doc(Page $page, ExtensionInfo $info): void
|
||||||
{
|
{
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
parent::display_doc($page, $info);
|
parent::display_doc($page, $info);
|
||||||
|
|
|
@ -9,7 +9,7 @@ class CustomIndexTheme extends IndexTheme
|
||||||
/**
|
/**
|
||||||
* @param Image[] $images
|
* @param Image[] $images
|
||||||
*/
|
*/
|
||||||
public function display_page(Page $page, array $images)
|
public function display_page(Page $page, array $images): void
|
||||||
{
|
{
|
||||||
$this->display_shortwiki($page);
|
$this->display_shortwiki($page);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomTagListTheme extends TagListTheme
|
class CustomTagListTheme extends TagListTheme
|
||||||
{
|
{
|
||||||
public function display_page(Page $page)
|
public function display_page(Page $page): void
|
||||||
{
|
{
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
parent::display_page($page);
|
parent::display_page($page);
|
||||||
|
|
|
@ -10,7 +10,7 @@ use function MicroHTML\{A,B,DIV,joinHTML};
|
||||||
|
|
||||||
class Themelet extends BaseThemelet
|
class Themelet extends BaseThemelet
|
||||||
{
|
{
|
||||||
public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false)
|
public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false): void
|
||||||
{
|
{
|
||||||
if ($total_pages == 0) {
|
if ($total_pages == 0) {
|
||||||
$total_pages = 1;
|
$total_pages = 1;
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomUserPageTheme extends UserPageTheme
|
class CustomUserPageTheme extends UserPageTheme
|
||||||
{
|
{
|
||||||
public function display_login_page(Page $page)
|
public function display_login_page(Page $page): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$page->set_title("Login");
|
$page->set_title("Login");
|
||||||
|
@ -33,16 +33,16 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("Login", $html, "main", 90));
|
$page->add_block(new Block("Login", $html, "main", 90));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_links(Page $page, User $user, $parts)
|
public function display_user_links(Page $page, User $user, $parts): void
|
||||||
{
|
{
|
||||||
// no block in this theme
|
// no block in this theme
|
||||||
}
|
}
|
||||||
public function display_login_block(Page $page)
|
public function display_login_block(Page $page): void
|
||||||
{
|
{
|
||||||
// no block in this theme
|
// no block in this theme
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_block(Page $page, User $user, $parts)
|
public function display_user_block(Page $page, User $user, $parts): void
|
||||||
{
|
{
|
||||||
$html = "";
|
$html = "";
|
||||||
$blocked = ["Pools", "Pool Changes", "Alias Editor", "My Profile"];
|
$blocked = ["Pools", "Pool Changes", "Alias Editor", "My Profile"];
|
||||||
|
@ -57,7 +57,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block($b);
|
$page->add_block($b);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_signup_page(Page $page)
|
public function display_signup_page(Page $page): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$tac = $config->get_string("login_tac", "");
|
$tac = $config->get_string("login_tac", "");
|
||||||
|
@ -91,7 +91,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("Signup", $html));
|
$page->add_block(new Block("Signup", $html));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_ip_list(Page $page, array $uploads, array $comments, array $events)
|
public function display_ip_list(Page $page, array $uploads, array $comments, array $events): void
|
||||||
{
|
{
|
||||||
$html = "<table id='ip-history' style='width: 400px;'>";
|
$html = "<table id='ip-history' style='width: 400px;'>";
|
||||||
$html .= "<tr><td>Uploaded from: ";
|
$html .= "<tr><td>Uploaded from: ";
|
||||||
|
@ -108,7 +108,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("IPs", $html));
|
$page->add_block(new Block("IPs", $html));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_page(User $duser, $stats)
|
public function display_user_page(User $duser, $stats): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomViewPostTheme extends ViewPostTheme
|
class CustomViewPostTheme extends ViewPostTheme
|
||||||
{
|
{
|
||||||
public function display_page(Image $image, $editor_parts)
|
public function display_page(Image $image, $editor_parts): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->set_heading(html_escape($image->get_tag_list()));
|
$page->set_heading(html_escape($image->get_tag_list()));
|
||||||
|
|
|
@ -9,7 +9,7 @@ class Themelet extends BaseThemelet
|
||||||
/**
|
/**
|
||||||
* Add a generic paginator.
|
* Add a generic paginator.
|
||||||
*/
|
*/
|
||||||
public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false)
|
public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false): void
|
||||||
{
|
{
|
||||||
if ($total_pages == 0) {
|
if ($total_pages == 0) {
|
||||||
$total_pages = 1;
|
$total_pages = 1;
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomViewPostTheme extends ViewPostTheme
|
class CustomViewPostTheme extends ViewPostTheme
|
||||||
{
|
{
|
||||||
public function display_page(Image $image, $editor_parts)
|
public function display_page(Image $image, $editor_parts): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->set_heading(html_escape($image->get_tag_list()));
|
$page->set_heading(html_escape($image->get_tag_list()));
|
||||||
|
|
|
@ -10,7 +10,7 @@ use function MicroHTML\{A,DIV,SPAN,joinHTML};
|
||||||
|
|
||||||
class Themelet extends BaseThemelet
|
class Themelet extends BaseThemelet
|
||||||
{
|
{
|
||||||
public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false)
|
public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false): void
|
||||||
{
|
{
|
||||||
if ($total_pages == 0) {
|
if ($total_pages == 0) {
|
||||||
$total_pages = 1;
|
$total_pages = 1;
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomUserPageTheme extends UserPageTheme
|
class CustomUserPageTheme extends UserPageTheme
|
||||||
{
|
{
|
||||||
public function display_login_page(Page $page)
|
public function display_login_page(Page $page): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$page->set_title("Login");
|
$page->set_title("Login");
|
||||||
|
@ -33,16 +33,16 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("Login", $html, "main", 90));
|
$page->add_block(new Block("Login", $html, "main", 90));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_links(Page $page, User $user, $parts)
|
public function display_user_links(Page $page, User $user, $parts): void
|
||||||
{
|
{
|
||||||
// no block in this theme
|
// no block in this theme
|
||||||
}
|
}
|
||||||
public function display_login_block(Page $page)
|
public function display_login_block(Page $page): void
|
||||||
{
|
{
|
||||||
// no block in this theme
|
// no block in this theme
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_block(Page $page, User $user, $parts)
|
public function display_user_block(Page $page, User $user, $parts): void
|
||||||
{
|
{
|
||||||
$html = "";
|
$html = "";
|
||||||
$blocked = ["Pools", "Pool Changes", "Alias Editor", "My Profile"];
|
$blocked = ["Pools", "Pool Changes", "Alias Editor", "My Profile"];
|
||||||
|
@ -57,13 +57,13 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block($b);
|
$page->add_block($b);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_signup_page(Page $page)
|
public function display_signup_page(Page $page): void
|
||||||
{
|
{
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
parent::display_signup_page($page);
|
parent::display_signup_page($page);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_ip_list(Page $page, array $uploads, array $comments, array $events)
|
public function display_ip_list(Page $page, array $uploads, array $comments, array $events): void
|
||||||
{
|
{
|
||||||
$html = "<table id='ip-history' style='width: 400px;'>";
|
$html = "<table id='ip-history' style='width: 400px;'>";
|
||||||
$html .= "<tr><td>Uploaded from: ";
|
$html .= "<tr><td>Uploaded from: ";
|
||||||
|
@ -80,7 +80,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("IPs", $html));
|
$page->add_block(new Block("IPs", $html));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_page(User $duser, $stats)
|
public function display_user_page(User $duser, $stats): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomViewPostTheme extends ViewPostTheme
|
class CustomViewPostTheme extends ViewPostTheme
|
||||||
{
|
{
|
||||||
public function display_page(Image $image, $editor_parts)
|
public function display_page(Image $image, $editor_parts): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$page->set_title("Post {$image->id}: ".$image->get_tag_list());
|
$page->set_title("Post {$image->id}: ".$image->get_tag_list());
|
||||||
|
|
|
@ -26,7 +26,7 @@ class CustomIndexTheme extends IndexTheme
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override to add a custom error message
|
// Override to add a custom error message
|
||||||
public function display_page(Page $page, $images)
|
public function display_page(Page $page, $images): void
|
||||||
{
|
{
|
||||||
$this->display_page_header($page, $images);
|
$this->display_page_header($page, $images);
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
// (with css media queries deciding which one is visible), and also
|
// (with css media queries deciding which one is visible), and also
|
||||||
// to switch between new-line and inline display depending on the
|
// to switch between new-line and inline display depending on the
|
||||||
// number of links.
|
// number of links.
|
||||||
public function display_user_block(Page $page, User $user, $parts)
|
public function display_user_block(Page $page, User $user, $parts): void
|
||||||
{
|
{
|
||||||
$h_name = html_escape($user->name);
|
$h_name = html_escape($user->name);
|
||||||
$lines = [];
|
$lines = [];
|
||||||
|
@ -48,7 +48,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
|
|
||||||
// Override to display login block in the head and in the left column
|
// Override to display login block in the head and in the left column
|
||||||
// (with css media queries deciding which one is visible)
|
// (with css media queries deciding which one is visible)
|
||||||
public function display_login_block(Page $page)
|
public function display_login_block(Page $page): void
|
||||||
{
|
{
|
||||||
$page->add_block(new Block("Login", $this->create_login_block(), "head", 90));
|
$page->add_block(new Block("Login", $this->create_login_block(), "head", 90));
|
||||||
$page->add_block(new Block("Login", $this->create_login_block(), "left", 15));
|
$page->add_block(new Block("Login", $this->create_login_block(), "left", 15));
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
class CustomUserPageTheme extends UserPageTheme
|
class CustomUserPageTheme extends UserPageTheme
|
||||||
{
|
{
|
||||||
public function display_user_block(Page $page, User $user, $parts)
|
public function display_user_block(Page $page, User $user, $parts): void
|
||||||
{
|
{
|
||||||
$h_name = html_escape($user->name);
|
$h_name = html_escape($user->name);
|
||||||
$html = " | ";
|
$html = " | ";
|
||||||
|
@ -16,7 +16,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("Logged in as $h_name", $html, "head", 90));
|
$page->add_block(new Block("Logged in as $h_name", $html, "head", 90));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_login_block(Page $page)
|
public function display_login_block(Page $page): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$html = "
|
$html = "
|
||||||
|
|
Reference in a new issue