1
0

More changes to standardize with the new sidebar api

This commit is contained in:
Tim Almdal 2009-10-01 06:17:10 -07:00
parent c625e416b2
commit 6941aa8fa7
2 changed files with 38 additions and 49 deletions

View File

@ -20,7 +20,17 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class <?= $module ?>_block {
static function get($block_id) {
static function get_site_list() {
return array(
"<?= "{$module}_site" ?>" => t("<?= $name ?> Sidebar Block"));
}
static function get_admin_list() {
return array(
"<?= "{$module}_admin" ?>" => t("<?= $name ?> Dashboard Block"));
}
static function get($block_id, $theme) {
$block = new Block();
switch ($block_id) {
case "<?= "{$module}_admin" ?>":
@ -40,14 +50,4 @@ class <?= $module ?>_block {
}
return $block;
}
static function get_site_list() {
return array(
"<?= "{$module}_site" ?>" => t("<?= $name ?> Sidebar Block"));
}
static function get_admin_list() {
return array(
"<?= "{$module}_admin" ?>" => t("<?= $name ?> Dashboard Block"));
}
}

View File

@ -19,150 +19,139 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class <?= $module ?>_theme {
static function sidebar_blocks($theme) {
$block = new Block();
$block->css_id = "g<?= $css_id ?>";
$block->title = t("<?= $name ?>");
$block->content = new View("<?= $module ?>_block.html");
$block->content->item = ORM::factory("item", 1);
return $block;
}
<? if (!empty($callbacks["album_blocks"])): ?>
static function album_blocks($theme) {
}
<? endif ?>
<? if (!empty($callbacks["album_bottom"])): ?>
static function album_bottom($theme) {
}
<? endif ?>
<? if (!empty($callbacks["album_top"])): ?>
static function album_top($theme) {
}
<? endif ?>
<? if (!empty($callbacks["admin_credits"])): ?>
static function admin_credits($theme) {
}
<? endif ?>
<? if (!empty($callbacks["photo"])): ?>
static function admin_footer($theme) {
}
<? endif ?>
<? if (!empty($callbacks["admin_header_top"])): ?>
static function admin_header_top($theme) {
}
<? endif ?>
<? if (!empty($callbacks["admin_header_bottom"])): ?>
static function admin_header_bottom($theme) {
}
<? endif ?>
<? if (!empty($callbacks["admin_page_bottom"])): ?>
static function admin_page_bottom($theme) {
}
<? endif ?>
<? if (!empty($callbacks["admin_page_top"])): ?>
static function admin_page_top($theme) {
}
<? endif ?>
<? if (!empty($callbacks["admin_head"])): ?>
static function admin_head($theme) {
}
<? endif ?>
<? if (!empty($callbacks["credits"])): ?>
static function credits($theme) {
}
<? endif ?>
<? if (!empty($callbacks["dynamic_bottom"])): ?>
static function dynamic_bottom($theme) {
}
<? endif ?>
<? if (!empty($callbacks["dynamic_top"])): ?>
static function dynamic_top($theme) {
}
<? endif ?>
<? if (!empty($callbacks["footer"])): ?>
static function footer($theme) {
}
<? endif ?>
<? if (!empty($callbacks["head"])): ?>
static function head($theme) {
}
<? endif ?>
<? if (!empty($callbacks["header_bottom"])): ?>
static function header_bottom($theme) {
}
<? endif ?>
<? if (!empty($callbacks["header_top"])): ?>
static function header_top($theme) {
}
<? endif ?>
<? if (!empty($callbacks["page_bottom"])): ?>
static function page_bottom($theme) {
}
<? endif ?>
<? if (!empty($callbacks["pae_top"])): ?>
static function page_top($theme) {
}
<? endif ?>
<? if (!empty($callbacks["photo_blocks"])): ?>
static function photo_blocks($theme) {
}
<? endif ?>
<? if (!empty($callbacks["photo_bottom"])): ?>
static function photo_bottom($theme) {
}
<? endif ?>
<? if (!empty($callbacks["photo_top"])): ?>
static function photo_top($theme) {
}
<? endif ?>
<? if (!empty($callbacks["sidebar_bottom"])): ?>
static function sidebar_bottom($theme) {
}
<? endif ?>
<? if (!empty($callbacks["sidebar_top"])): ?>
static function sidebar_top($theme) {
}
<? endif ?>
<? if (!empty($callbacks["thumb_bottom"])): ?>
static function thumb_bottom($theme, $child) {
}
<? endif ?>
<? if (!empty($callbacks["thumb_info"])): ?>
static function thumb_info($theme, $child) {
}
<? endif ?>
<? if (!empty($callbacks["thumb_top"])): ?>
static function thumb_top($theme, $child) {
}
<? endif ?>
}