Loading...
 
Skip to main content

Development


Need help with simple module

What I want is a module that will show the titles of the last N blog posts of a particular blog as hyperlinks that will take you to that blog entry. So if I make the following posts to my "daydreams" blog: "I won the lottery", "I cured cancer", "I married a supermodel", "I was elected Pope" - then the module would show the last 3 entries in reverse chronological order as hyperlinks - "I was elected Pope", "I married a supermodel" then "I cured cancer". If the user clicks on "I married a supermodel", the user is taken to that blog entry.

I would think this would be very similar to the mod-last_blog_posts module. That shows the following for the latest blog posts: name of blog posted to, post name, date of post. That entry is a hyperlink that takes the user to the blog posted to. Here is the code for mod-last_blog_post.php:
Copy to clipboard
$ranking = $tikilib->list_posts(0, $module_rows, 'created_desc', ''); $smarty->assign('modLastBlogPosts', $ranking["data"]); $smarty->assign('modLastBlogPostsTitle',(isset($module_params["title"])?$module_params["title"]:"")); $smarty->assign('nonums', isset($module_params["nonums"]) ? $module_params["nonums"] : 'n');
Any help would be greatly appreciated, as this smarty stuff makes no sense to me.