Commit e498b3de authored by chealer's avatar chealer

[ENH] change last_created_blogs module to new module style (modules-doc).

[FIX] HTML special chars encoding
parent 9013803b
......@@ -2727,6 +2727,7 @@ modules/mod-func-freetags_morelikethis.php -text
modules/mod-func-freetags_most_popular.php -text
modules/mod-func-freetags_prefered.php -text
modules/mod-func-google.php -text
modules/mod-func-last_created_blogs.php -text
modules/mod-func-last_created_faqs.php -text
modules/mod-func-live_support.php -text
modules/mod-func-menupage.php -text
......@@ -2757,7 +2758,6 @@ modules/mod-last_actions.php -text
modules/mod-last_articles.php -text
modules/mod-last_blog_posts.php -text
modules/mod-last_category_objects.php -text
modules/mod-last_created_blogs.php -text
modules/mod-last_created_quizzes.php -text
modules/mod-last_file_galleries.php -text
modules/mod-last_files.php -text
......
<?php
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
header("location: index.php");
exit;
}
function module_last_created_blogs_info() {
return array(
'name' => tra('Last Created blogs'),
'description' => tra('Displays the specified number of blogs from newest to oldest.'),
'prefs' => array("feature_blogs"),
'params' => array(),
'common_params' => array('nonums', 'rows')
);
}
function module_last_created_blogs( $mod_reference, $module_params ) {
global $tikilib, $smarty;
$ranking = $tikilib->list_blogs(0, $mod_reference["rows"], 'created_desc', '');
$smarty->assign('modLastCreatedBlogs', $ranking["data"]);
}
<?php
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
header("location: index.php");
exit;
}
global $tikilib, $smarty;
$ranking = $tikilib->list_blogs(0, $module_rows, 'created_desc', '');
$smarty->assign('modLastCreatedBlogs', $ranking["data"]);
$smarty->assign('nonums', isset($module_params["nonums"]) ? $module_params["nonums"] : 'n');
{* $Id$ *}
{if $prefs.feature_blogs eq 'y'}
{if !isset($tpl_module_title)}
{if $nonums eq 'y'}
{eval var="{tr}Last `$module_rows` Created blogs{/tr}" assign="tpl_module_title"}
{else}
{eval var="{tr}Last Created blogs{/tr}" assign="tpl_module_title"}
{/if}
{/if}
{tikimodule error=$module_params.error title=$tpl_module_title name="last_created_blogs" flip=$module_params.flip decorations=$module_params.decorations nobox=$module_params.nobox notitle=$module_params.notitle}
{if $nonums != 'y'}<ol>{else}<ul>{/if}
{section name=ix loop=$modLastCreatedBlogs}
<li>
<a class="linkmodule" href="tiki-view_blog.php?blogId={$modLastCreatedBlogs[ix].blogId}" title="{$modLastCreatedBlogs[ix].created|tiki_short_datetime}, {tr}by{/tr} {if $modLastCreatedBlogs[ix].user ne ''}{$modLastCreatedBlogs[ix].user}{else}{tr}Anonymous{/tr}{/if}">
{$modLastCreatedBlogs[ix].title}
<li>
<a class="linkmodule" href="tiki-view_blog.php?blogId={$modLastCreatedBlogs[ix].blogId}" title="{$modLastCreatedBlogs[ix].created|tiki_short_datetime}, {tr}by{/tr} {if $modLastCreatedBlogs[ix].user ne ''}{$modLastCreatedBlogs[ix].user|escape}{else}{tr}Anonymous{/tr}{/if}">
{$modLastCreatedBlogs[ix].title|escape}
</a>
</li>
</li>
{/section}
{if $nonums != 'y'}</ol>{else}</ul>{/if}
{if $nonums != 'y'}</ol>{else}</ul>{/if}
{/tikimodule}
{/if}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment