compatible declrations for danbooru theme
This commit is contained in:
parent
9ef73748de
commit
35a3986c35
5 changed files with 11 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
class CustomIndexTheme extends IndexTheme {
|
||||
public function display_page($page, $images) {
|
||||
public function display_page(Page $page, $images) {
|
||||
global $config;
|
||||
|
||||
if(count($this->search_terms) == 0) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
class CustomTagListTheme extends TagListTheme {
|
||||
public function display_page($page) {
|
||||
public function display_page(Page $page) {
|
||||
$page->disable_left();
|
||||
parent::display_page($page);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
class CustomUploadTheme extends UploadTheme {
|
||||
public function display_block($page) {
|
||||
public function display_block(Page $page) {
|
||||
// this theme links to /upload
|
||||
// $page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
|
||||
}
|
||||
|
||||
public function display_page($page) {
|
||||
public function display_page(Page $page) {
|
||||
$page->disable_left();
|
||||
parent::display_page($page);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
class CustomUserPageTheme extends UserPageTheme {
|
||||
public function display_login_page($page) {
|
||||
public function display_login_page(Page $page) {
|
||||
global $config;
|
||||
$page->set_title("Login");
|
||||
$page->set_heading("Login");
|
||||
|
@ -27,14 +27,14 @@ class CustomUserPageTheme extends UserPageTheme {
|
|||
$page->add_block(new Block("Login", $html, "main", 90));
|
||||
}
|
||||
|
||||
public function display_user_links($page, $user, $parts) {
|
||||
public function display_user_links(Page $page, User $user, $parts) {
|
||||
// no block in this theme
|
||||
}
|
||||
public function display_login_block(Page $page) {
|
||||
// no block in this theme
|
||||
}
|
||||
|
||||
public function display_user_block($page, $user, $parts) {
|
||||
public function display_user_block(Page $page, User $user, $parts) {
|
||||
$h_name = html_escape($user->name);
|
||||
$html = "";
|
||||
$blocked = array("Pools", "Pool Changes", "Alias Editor", "My Profile");
|
||||
|
@ -45,7 +45,7 @@ class CustomUserPageTheme extends UserPageTheme {
|
|||
$page->add_block(new Block("User Links", $html, "user", 90));
|
||||
}
|
||||
|
||||
public function display_signup_page($page) {
|
||||
public function display_signup_page(Page $page) {
|
||||
global $config;
|
||||
$tac = $config->get_string("login_tac", "");
|
||||
|
||||
|
@ -77,7 +77,7 @@ class CustomUserPageTheme extends UserPageTheme {
|
|||
$page->add_block(new Block("Signup", $html));
|
||||
}
|
||||
|
||||
public function display_ip_list($page, $uploads, $comments) {
|
||||
public function display_ip_list(Page $page, $uploads, $comments) {
|
||||
$html = "<table id='ip-history' style='width: 400px;'>";
|
||||
$html .= "<tr><td>Uploaded from: ";
|
||||
foreach($uploads as $ip => $count) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
class CustomViewImageTheme extends ViewImageTheme {
|
||||
public function display_page($image, $editor_parts) {
|
||||
public function display_page(Image $image, $editor_parts) {
|
||||
global $page;
|
||||
$page->set_title("Image {$image->id}: ".html_escape($image->get_tag_list()));
|
||||
$page->set_heading(html_escape($image->get_tag_list()));
|
||||
|
@ -11,7 +11,7 @@ class CustomViewImageTheme extends ViewImageTheme {
|
|||
$page->add_block(new Block(null, $this->build_pin($image), "main", 11));
|
||||
}
|
||||
|
||||
private function build_stats($image) {
|
||||
private function build_stats(Image $image) {
|
||||
$h_owner = html_escape($image->get_owner()->name);
|
||||
$h_ownerlink = "<a href='".make_link("user/$h_owner")."'>$h_owner</a>";
|
||||
$h_ip = html_escape($image->owner_ip);
|
||||
|
|
Reference in a new issue