diff options
| author | spiderr <spider@viovio.com> | 2013-04-11 12:38:28 -0400 |
|---|---|---|
| committer | spiderr <spider@viovio.com> | 2013-04-11 12:38:28 -0400 |
| commit | a4b371306f79dcbb5fa56cd26a0dfd1f95b07a81 (patch) | |
| tree | 3b47beaa528228e75f99a59b9bedb942519282a6 /modules | |
| parent | 6b621fe34691bfac5508cef369bf944e1f9e1fcd (diff) | |
| download | blogs-a4b371306f79dcbb5fa56cd26a0dfd1f95b07a81.tar.gz blogs-a4b371306f79dcbb5fa56cd26a0dfd1f95b07a81.tar.bz2 blogs-a4b371306f79dcbb5fa56cd26a0dfd1f95b07a81.zip | |
update modules for smarty 3 template centric variables, and assign modules to the _template
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/mod_blog_roll.php | 4 | ||||
| -rw-r--r-- | modules/mod_last_blog_posts.php | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/mod_blog_roll.php b/modules/mod_blog_roll.php index 60b68b1..38bfda4 100644 --- a/modules/mod_blog_roll.php +++ b/modules/mod_blog_roll.php @@ -22,9 +22,9 @@ if( $modBlogs = $blog->getList( $listHash ) ) { foreach( array_keys( $modBlogs ) as $b ) { $modBlogs[$b]['post'] = $blog->getPost( array( 'blog_id' => $modBlogs[$b]['blog_id'] ) ); } - $gBitSmarty->assign( 'modBlogs', $modBlogs ); + $_template->tpl_vars['modBlogs'] = new Smarty_variable( $modBlogs ); } $moduleTitle = (!empty( $moduleParams['title'] ) ? $moduleParams['title'] : 'Blog Roll'); -$gBitSmarty->assign( 'moduleTitle', $moduleTitle ); +$_template->tpl_vars['moduleTitle'] = new Smarty_variable( $moduleTitle ); ?> diff --git a/modules/mod_last_blog_posts.php b/modules/mod_last_blog_posts.php index d5824fa..06c0a2d 100644 --- a/modules/mod_last_blog_posts.php +++ b/modules/mod_last_blog_posts.php @@ -63,9 +63,9 @@ $blogPosts = $blogPost->getList( $listHash ); $descriptionLength = ( !empty( $module_params['max_preview_length'] ) ? $module_params['max_preview_length'] : 500 ); -$gBitSmarty->assign( 'blogPostsFormat', (empty($module_params['format']) ? 'list' : $module_params['format']) ); -$gBitSmarty->assign( 'descriptionLength', $descriptionLength ); +$_template->tpl_vars['blogPostsFormat'] = new Smarty_variable( (empty($module_params['format']); +$_template->tpl_vars['descriptionLength'] = new Smarty_variable( $descriptionLength ); $gBitSmarty->assign_by_ref( 'modLastBlogPosts', $blogPosts["data"] ); // not sure what this is, but using title doesn't work cos that will rename the moduleTitle -//$gBitSmarty->assign( 'modLastBlogPostsTitle', ( isset( $module_params["title"] ) ? $module_params["title"]:"" )); +//$_template->tpl_vars['modLastBlogPostsTitle'] = new Smarty_variable( ( isset( $module_params["title"] ); ?> |
