List Users Blog Posts in MyTiki
What I´m trying to do is, instead of displaying only the blog for a user, I want his posts to be shown.
Sounds easy at first glance, but somehow I´m stuck.
I started with the template.
For "user blogs" there´s a loop through "$user_blogs"
So I traced this var and put a "$user_blog_posts" where i found "$user_blogs"
tiki-my_tiki:
$user_blog_posts = $bloglib->list_blog_posts(1,0,-1,'created_desc','','',$userwatch);
for getting the posts.
"list_blog_posts" in "bloglib" has been modified with a "where user=?" clause if $user was set.
Furthermore there where a lot of entries in tiki-user_preferences.php, like
$smarty->assign('mytiki_blogs', $tikilib->get_user_preference($userwatch, 'mytiki_blogs'), 'y');
$smarty->assign('mytiki_blog_posts', $tikilib->get_user_preference($userwatch, 'mytiki_blog_posts'), 'y');
beneath it.
What is it I forgot ?
When I now try to loop through "user_blog_posts" in my_tiki.tpl with:
{section name=ix loop=$user_blog_posts}
and put the links together with:
a href="tiki-view_blog_post.php?blogId=1&postId={$user_blog_posts[ix].postId}">Open {$user_blog_posts[ix].title}
All I get is 2(??) blank links without postId.
Help ! ❓