Updated for the new blocks API.
This commit is contained in:
parent
0cb6b9e58f
commit
ace00a891d
@ -16,8 +16,14 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
class dynamic_theme {
|
||||
static function sidebar_blocks($theme) {
|
||||
class dynamic_block_Core {
|
||||
static function get_site_list() {
|
||||
return array("dynamic" => t("Dynamic Albums"));
|
||||
}
|
||||
|
||||
static function get($block_id) {
|
||||
switch ($block_id) {
|
||||
case "dynamic":
|
||||
$albums = array();
|
||||
foreach (array("updates", "popular") as $album) {
|
||||
$album_defn = unserialize(module::get_var("dynamic", $album));
|
||||
@ -25,6 +31,7 @@ class dynamic_theme {
|
||||
$albums[$album] = $album_defn->title;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($albums)) {
|
||||
$block = new Block();
|
||||
$block->css_id = "g-dynamic";
|
||||
@ -33,6 +40,7 @@ class dynamic_theme {
|
||||
$block->content->albums = $albums;
|
||||
return $block;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user