Last post not show when only New Topic

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
new777
Registered User
Posts: 94
Joined: Thu Oct 03, 2013 6:51 am

Last post not show when only New Topic

Post by new777 »

Hi,

I moved the Last Post to the Topics Column on the viewforum_body.html. See image.

Is it possible to have the Last Post line not show if there is only 1 post (the original New Topic Post), so no reply has been made yet.

Image
new777
Registered User
Posts: 94
Joined: Thu Oct 03, 2013 6:51 am

Re: Last post not show when only New Topic

Post by new777 »

Anyone or should this be asked in the regular support forum, since I don't need a MOD for it. :D
User avatar
AmigoJack
Registered User
Posts: 5840
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Last post not show when only New Topic

Post by AmigoJack »

Enclose it in the most obvious condition:

Code: Select all

<!-- IF topicrow.REPLIES -->...<!-- ENDIF -->
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
new777
Registered User
Posts: 94
Joined: Thu Oct 03, 2013 6:51 am

Re: Last post not show when only New Topic

Post by new777 »

Thanks, that works great.

I would have never thought of the IF REPLIES statement, tried other stuff.

Is there a list some where with all IF statement options/possibilities, because this one seems so obvious now that I know that one exists, it makes me feel stupid
User avatar
AmigoJack
Registered User
Posts: 5840
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Last post not show when only New Topic

Post by AmigoJack »

/docs/coding-guidelines.html also came with your installation - the chapter "Conditionals/Control structures" lists all operators, along with examples. Using no operator is the same as omitting operators in other popular languages: it evaluates to FALSE when being empty or 0 and vice versa. Therefore (shortcut evaluation and multiple operators doing the same) all these codes do the very same:

Code: Select all

<!-- IF topicrow.REPLIES -->...<!-- ENDIF -->
<!-- IF topicrow.REPLIES > 0 -->...<!-- ENDIF -->
<!-- IF topicrow.REPLIES gt 0 -->...<!-- ENDIF -->
<!-- IF topicrow.REPLIES != 0 -->...<!-- ENDIF -->
<!-- IF topicrow.REPLIES neq 0 -->...<!-- ENDIF -->
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
Locked

Return to “[3.0.x] MOD Requests”