0byt3m1n1
Path:
/
data
/
0
/
0
/
6
/
46
/
6861
/
user
/
7034
/
cgi-bin
/
php
/
lib
/
[
Home
]
File: block.MTBlogs.php
<?php function smarty_block_MTBlogs($args, $content, &$ctx, &$repeat) { // status: complete // parameters: none // notes: is it sorting in the right order??? if (!isset($content)) { $ctx->localize(array('_blogs', '_blogs_counter', 'blog', 'blog_id')); $blogs = $ctx->mt->db->load('blog'); $ctx->stash('_blogs', $blogs); $counter = 0; } else { $blogs = $ctx->stash('_blogs'); $counter = $ctx->stash('_blogs_counter'); } if ($counter < count($blogs)) { $blog = $blogs[$counter]; $ctx->stash('blog', $blog); $ctx->stash('blog_id', $blog['blog_id']); $ctx->stash('_blogs_counter', $counter + 1); $repeat = true; } else { $ctx->restore(array('_blogs', '_blogs_counter', 'blog', 'blog_id')); $repeat = false; } return $content; } ?>