t("Latest Updates")); } static function get($block_id, $theme) { $block = ""; switch ($block_id) { case "latestupdates": // Make a new sidebar block. $block = new Block(); $block->css_id = "g-latest-updates"; $block->title = t("Latest Updates"); $block->content = new View("latestupdates_block.html"); if (!$theme->item()) { $block->content->update_links = array( "Entire Gallery" => url::site("latestupdates/updates")); } else { // Determine the ID# of the current album. $albumID = $theme->item->is_album() ? $theme->item->id : $theme->item->parent_id; $block->content->update_links = array( "Entire Gallery" => url::site("latestupdates/updates"), "This Album" => url::site("latestupdates/albums/$albumID") ); } break; } return $block; } }