/** * @param PICTURE $obj */ protected function _draw_box($obj) { $url = $obj->thumbnail_location(Force_root_on); $is_local = $url->has_local_domain(); $metrics = $obj->thumbnail_metrics($is_local); if ($is_local) { $metrics->resize_to_fit($this->max_width, $this->max_height); } else { $metrics->resize($this->max_width, $this->max_height); } ?> <a href="<?php echo $obj->home_page(); ?> "><?php echo $metrics->as_html_without_link($obj->title_as_plain_text()); ?> </a><?php }
/** * @param PICTURE $obj * @access private */ protected function _echo_header($obj) { ?> <p> <a href="<?php echo $obj->home_page(); ?> "><img class="frame" src="<?php echo $obj->full_thumbnail_name(); ?> " alt="Picture"></a> </p> <?php parent::_echo_header($obj); }
/** * Format the picture as HTML for printing or display. * @param PICTURE $entry * @access private */ protected function _echo_picture_as_html($entry) { /** @var ALBUM $folder */ $folder = $entry->parent_folder(); $metrics = $entry->metrics(); if ($metrics->loaded()) { ?> <div style="width: <?php echo $metrics->width(); ?> px"> <p> <?php echo $folder->format_date($entry->date); ?> </p> <div class="text-flow"> <?php $this->_echo_html_description($entry); ?> </div> <div> <?php if ($this->_options->show_interactive) { echo $metrics->as_html($entry->title_as_plain_text(), ''); } else { echo $metrics->as_html_without_link($entry->title_as_plain_text()); } ?> </div> <?php if ($this->_options->show_interactive && $metrics->was_resized) { ?> <div class="subdued"> Displayed at <?php echo $metrics->constrained_width; ?> x <?php echo $metrics->constrained_height; ?> ; click to show full-size (<?php echo $metrics->original_width; ?> x <?php echo $metrics->original_height; ?> ). </div> <?php } $this->_echo_html_user_information($entry, 'info-box-bottom'); ?> </div> <?php } else { ?> <p> <?php echo $folder->format_date($entry->date); ?> </p> <div class="text-flow"> <?php $this->_echo_html_description($entry); ?> </div> <?php $this->context->show_message('[' . $metrics->url . '] could not be displayed.'); $this->_echo_html_user_information($entry, 'info-box-bottom'); } }