Jump to content

Latest topics


Hunter Lyons

Recommended Posts

Posted

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.

  • 3 weeks later...
Posted

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.

Posted

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>

 

Posted

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

Posted

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>

 

Posted
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.

Posted
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.

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

Posted

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?

Posted
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.

Posted

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.

Posted

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}}

 

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...