Hunter Lyons Posted March 17, 2016 Posted March 17, 2016 Alright, so I've noticed latest topics functions a little weird. I have a topics block above my forums configured to pull from my news forums. This works as I'd like. When a user makes a reply to any of them, it says the time / date that they posted and their username / avatar in the topics feed. However I have a 2nd topics feed on my sidebar, and it acts differently. When a new user makes a reply, it instead shows the original poster's time / date and username / avatar. I've had a few users complain to me about this and honestly it doesn't make sense. Why does the full-width latest topics function differently than the sidebar latest topics? It's the same block. I think they should all function as I described 1st: the replying user's time / date of posting and username / profile should show in the topics feed, not the original poster. This thread I previously made also explained this phenomenon and there was some support for it there.
MADMAN32395 Posted April 5, 2016 Posted April 5, 2016 Yea I was wondering the same thing, it would make sense to show replier instead of OP. Maybe, if it was a different block maybe showing latest replies (displaying replier)? then latest topics (showing OP)? That may be a good solution. But I do agree that it would be nice to see replier.
Tom Irons Posted April 5, 2016 Posted April 5, 2016 Here's a tutorial on how to switch that: Go to ACP > Customization > Themes and choose 'Edit' on the theme you want to change Go to forums > front > widgets > topicFeed and replace the following lines: {template="userPhoto" group="global" app="core" params="$topic->author(), 'tiny'"} with {template="userPhoto" group="global" app="core" params="$topic->lastCommenter(), 'tiny'"} and <span>{lang="byline_nodate" htmlsprintf="$topic->author()->link()"}</span><br> with <span>{lang="byline_nodate" htmlsprintf="$topic->lastCommenter()->link()"}</span><br>
emsonline Posted April 6, 2016 Posted April 6, 2016 That helped me a lot. How can I change it from showing the start date to showing the date of the last entry?
emsonline Posted April 6, 2016 Posted April 6, 2016 OK.. I changed this: <span class='ipsType_light'>{lang="topic_started_date" htmlsprintf="\IPS\DateTime::ts( $topic->mapped('date') )->html()"}</span> To this: <span class='ipsType_light'>{lang="topic_started_date" htmlsprintf="\IPS\DateTime::ts( $topic->mapped('updated') )->html()"}</span> But how do I change the text from "Started" to "Updated"?
Tom Irons Posted April 6, 2016 Posted April 6, 2016 There isn't a language string that has Updated... but if your site is English only you can do this: <span class='ipsType_light'>Updated {datetime="$topic->mapped('updated')"}</span>
chilihead Posted April 6, 2016 Posted April 6, 2016 On 3/17/2016 at 2:05 PM, Lyonharted said: I have a topics block above my forums configured to pull from my news forums. This works as I'd like. When a user makes a reply to any of them, it says the time / date that they posted and their username / avatar in the topics feed. However I have a 2nd topics feed on my sidebar, and it acts differently. When a new user makes a reply, it instead shows the original poster's time / date and username / avatar. I've had a few users complain to me about this and honestly it doesn't make sense. Why does the full-width latest topics function differently than the sidebar latest topics? It's the same block. Honestly that sounds like a bug. They should be consistent.
Hunter Lyons Posted April 6, 2016 Author Posted April 6, 2016 38 minutes ago, chilihead said: Honestly that sounds like a bug. They should be consistent. Not sure. Hulu's template edit fixed it, but it should probably be addressed in the suite itself.
pequeno Posted July 8, 2016 Posted July 8, 2016 On 6/4/2016 at 3:21 AM, Tom Irons said: There isn't a language string that has Updated... but if your site is English only you can do this: <span class='ipsType_light'>Updated {datetime="$topic->mapped('updated')"}</span> Thanks, one question. How do to show "Started" in the first message (when the topic is created) and "Updated" from the first comment? With your solution allways show "Updated".
Tom Irons Posted July 11, 2016 Posted July 11, 2016 Try this, it should work... if not let me know. <span class='ipsType_light'>Started {datetime="$topic->start_date"}</span>
pequeno Posted July 11, 2016 Posted July 11, 2016 Hello Tom Irons, works fine but if I put <span class='ipsType_light'>Started {datetime="$topic->start_date"}</span> <span class='ipsType_light'>Updated {datetime="$topic->mapped('updated')"}</span> shows Started and Update at the same time. How to display one or the other as appropriate?
pequeno Posted July 17, 2016 Posted July 17, 2016 On 11 de julio de 2016 at 5:23 PM, pequeno said: Hello Tom Irons, works fine but if I put <span class='ipsType_light'>Started {datetime="$topic->start_date"}</span> <span class='ipsType_light'>Updated {datetime="$topic->mapped('updated')"}</span> shows Started and Update at the same time. How to display one or the other as appropriate? Hello, any help about? Thanks.
Tom Irons Posted July 18, 2016 Posted July 18, 2016 Take out the line you don't want... it's not that hard to figure out.
pequeno Posted July 18, 2016 Posted July 18, 2016 Hello Tom, and thanks for your support. I do not speak English very well and I think I have not explained. If I remove a line, for example "Updated" line, only will the creation date (Started), and I do not want that. I want to put "Started" in messages without answers, and "Updated" in messages with answers. I need to combine both lines as appropriate. Thanks.
Tom Irons Posted July 18, 2016 Posted July 18, 2016 This should fulfill your needs: {{if ( $topic->posts - 1 ) === 0}} <span class='ipsType_light'>Started {datetime="$topic->start_date"}</span> {{else}} <span class='ipsType_light'>Updated {datetime="$topic->mapped('updated')"}</span> {{endif}}
Recommended Posts
Archived
This topic is now archived and is closed to further replies.