Displaying topics instead of posts on profile page
-
I made a change on profile page, so now instead of posts it displays topics that user created. Like this http://screencast.com/t/8OjPbPkwP1u . But the problem is that if user make another post in his topic or in someone else's, it will show it again and again. Like this http://screencast.com/t/rucvj4rjHo .
What i need is to show it only once and only when a user create the topic. How to achieve this?
-
@Jelena I think I've done something like what you're asking for.
What I've done is simply editing home.tpl. This is the bit of code that may help you :
<!-- BEGIN posts --> <div class="post-preview clearfix {categories.unread-class}"> <a class="user-picture" style="color: {categories.color};" href="<!-- IF categories.posts.user.userslug -->{relative_path}/user/{categories.posts.user.userslug}<!-- ELSE -->#<!-- ENDIF categories.posts.user.userslug-->"> <span class="user-picture small pull-left"><img src="{categories.posts.user.picture}" title="{categories.posts.user.username}" class="user-img"></span> </a> <div class="post-info pull-left"> <h5><a href="{relative_path}/topic/{categories.posts.topic.slug}">{categories.posts.topic.title}</a></h5> <a href="{relative_path}/user/{categories.posts.user.username}" class="user">{categories.posts.user.username}</a> <span class="timeago" title="{categories.posts.relativeTime}"></span> </div> <a class="readmore-link pull-right" href="{relative_path}/topic/{categories.posts.topic.slug}<!-- IF categories.posts.index -->/{categories.posts.index}<!-- ENDIF categories.posts.index -->" title="[[global:read_more]]"><i class="fa fa-fw fa-link fa-gradient"></i></a> </div> <!-- END posts -->
I've limited at one topic only but I guess it works with more.
-
-
-
Copyright © 2024 NodeBB | Contributors