diff options
| author | Daniel Sutcliffe <dansut@users.sourceforge.net> | 2010-02-01 17:45:22 +0000 |
|---|---|---|
| committer | Daniel Sutcliffe <dansut@users.sourceforge.net> | 2010-02-01 17:45:22 +0000 |
| commit | 698ccf5f40fe4e2f99ae502f3e9da761ab8470ee (patch) | |
| tree | 9dddd9049d88cc2c6a0c2f076f30af073a6184e0 /modules | |
| parent | b1e248200b057082b5cd52bad6933e188a959e5b (diff) | |
| download | articles-698ccf5f40fe4e2f99ae502f3e9da761ab8470ee.tar.gz articles-698ccf5f40fe4e2f99ae502f3e9da761ab8470ee.tar.bz2 articles-698ccf5f40fe4e2f99ae502f3e9da761ab8470ee.zip | |
Make articles module work better when none, plus allow list type to be changed by param and provide htmlid for list
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/mod_articles.php | 4 | ||||
| -rw-r--r-- | modules/mod_articles.tpl | 18 |
2 files changed, 13 insertions, 9 deletions
diff --git a/modules/mod_articles.php b/modules/mod_articles.php index 7d5c023..bd487ae 100644 --- a/modules/mod_articles.php +++ b/modules/mod_articles.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_articles/modules/mod_articles.php,v 1.16 2008/06/19 09:29:08 lsces Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_articles/modules/mod_articles.php,v 1.17 2010/02/01 17:45:22 dansut Exp $ * @package articles * @subpackage modules */ @@ -52,5 +52,7 @@ if( ( !empty( $module_params['topic_id'] ) || !empty( $module_params['topic_name } $gBitSmarty->assign( 'params', !empty( $moduleParams['params'] ) ? $moduleParams['params'] : ''); +$gBitSmarty->assign( 'listtype', + ( isset($module_params['list_type']) && (strncasecmp($module_params['list_type'], 'u', 1) == 0) ) ? 'ul' : 'ol' ); $gBitSmarty->assign( 'modArticles', $articles ); ?> diff --git a/modules/mod_articles.tpl b/modules/mod_articles.tpl index 96ca945..69b3d03 100644 --- a/modules/mod_articles.tpl +++ b/modules/mod_articles.tpl @@ -1,19 +1,21 @@ -{* $Header: /cvsroot/bitweaver/_bit_articles/modules/mod_articles.tpl,v 1.8 2007/05/27 21:34:22 laetzer Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_articles/modules/mod_articles.tpl,v 1.9 2010/02/01 17:45:22 dansut Exp $ *} {strip} {if $gBitSystem->isPackageActive( 'articles' )} {bitmodule title="$moduleTitle" name=$smarty.const.ARTICLES_PKG_NAME} - <ol> + <{$listtype} id="modarticles-{$moduleParams.layout_area}{$moduleParams.pos}"> {foreach item=modArt from=$modArticles} <li><a href="{$modArt.display_url}">{$modArt.title|escape}</a></li> {foreachelse} - <li></li> + <li><em>{tr}No records found{/tr}</em></li> {/foreach} - {if $params neq ''} - <li><a href="{$smarty.const.ARTICLES_PKG_URL}list.php?{$params}">{tr}more{/tr}: {$moduleTitle}</a></li> - {else} - <li><a href="{$smarty.const.ARTICLES_PKG_URL}list.php">{tr}more{/tr}</a></li> + {if !empty( $modArticles )} + {if $params neq ''} + <li><a href="{$smarty.const.ARTICLES_PKG_URL}list.php?{$params}">{tr}more{/tr}: {$moduleTitle}</a></li> + {else} + <li><a href="{$smarty.const.ARTICLES_PKG_URL}list.php">{tr}more{/tr}</a></li> + {/if} {/if} - </ol> + </{$listtype}> {/bitmodule} {/if} {/strip} |
