forked from Cavemanon/cavepaintings
a load more tests
This commit is contained in:
@@ -4,7 +4,7 @@ class Themelet {
|
||||
/**
|
||||
* Generic error message display
|
||||
*/
|
||||
public function display_error($page, $title, $message) {
|
||||
public function display_error(Page $page, $title, $message) {
|
||||
$page->set_title($title);
|
||||
$page->set_heading($title);
|
||||
$page->add_block(new NavBlock());
|
||||
@@ -15,7 +15,7 @@ class Themelet {
|
||||
/**
|
||||
* A specific, common error message
|
||||
*/
|
||||
public function display_permission_denied($page) {
|
||||
public function display_permission_denied(Page $page) {
|
||||
header("HTTP/1.0 403 Permission Denied");
|
||||
$this->display_error($page, "Permission Denied", "You do not have permission to access this page");
|
||||
}
|
||||
@@ -25,22 +25,20 @@ class Themelet {
|
||||
* Generic thumbnail code; returns HTML rather than adding
|
||||
* a block since thumbs tend to go inside blocks...
|
||||
*/
|
||||
public function build_thumb_html($image, $query=null) {
|
||||
public function build_thumb_html(Image $image, $query=null) {
|
||||
global $config;
|
||||
$i_id = int_escape($image->id);
|
||||
$h_view_link = make_link("post/view/$i_id", $query);
|
||||
$h_tip = html_escape($image->get_tooltip());
|
||||
$h_thumb_link = $image->get_thumb_link();
|
||||
$tsize = get_thumbnail_size($image->width, $image->height);
|
||||
$hm8 = $tsize[1]-8;
|
||||
$wm8 = $tsize[0]-8;
|
||||
return "
|
||||
<div class='thumbblock'>
|
||||
<div class='rr thumb'>
|
||||
<div class='rrtop'><div></div></div>
|
||||
<div class='rrcontent'>
|
||||
<a href='$h_view_link' style='position: relative; display: block; height: {$tsize[1]}px; width: {$tsize[0]}px;'>
|
||||
<img id='$i_id' title='$h_tip' alt='$h_tip' style='height: {$tsize[1]}px; width: {$tsize[0]}px;' src='$h_thumb_link'>
|
||||
<img id='thumb_$i_id' title='$h_tip' alt='$h_tip' style='height: {$tsize[1]}px; width: {$tsize[0]}px;' src='$h_thumb_link'>
|
||||
</a>
|
||||
</div>
|
||||
<div class='rrbot'><div></div></div>
|
||||
@@ -53,7 +51,7 @@ class Themelet {
|
||||
/**
|
||||
* Add a generic paginator
|
||||
*/
|
||||
public function display_paginator($page, $base, $query, $page_number, $total_pages) {
|
||||
public function display_paginator(Page $page, $base, $query, $page_number, $total_pages) {
|
||||
if($total_pages == 0) $total_pages = 1;
|
||||
$body = $this->build_paginator($page_number, $total_pages, $base, $query);
|
||||
$page->add_block(new Block(null, $body, "main", 90));
|
||||
|
Reference in New Issue
Block a user