t("Random image")); } static function get($block_id, $theme) { $block = ""; switch ($block_id) { case "random_image": $block = new Block(); $block->css_id = "g-image-block"; $block->title = t("Random image"); $block->content = new View("image_block_block.html"); $block->content->items = item::random_query(array(array("type", "!=", "album")))->find_all(1); if ($block->content->items->count() == 0) { $block = ""; } break; } return $block; } }