Jump to content

Latest topics


Hunter Lyons

Recommended Posts

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.

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

Here's a tutorial on how to switch that:

  1. Go to ACP > Customization > Themes and choose 'Edit' on the theme you want to change
  2. 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>

 

Link to comment
Share on other sites

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"? 
 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 months later...
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".

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...