The appearance of the message in the first post?

For support and discussion related to templates and themes in phpBB 3.3.
User avatar
yusufdj
Registered User
Posts: 112
Joined: Sun Feb 18, 2018 5:35 pm

The appearance of the message in the first post?

Post by yusufdj »

Hello, how can I change the appearance of the first post in the topic? Let the first post have a different view, excluding comments. For example, different avatar appearance etc....
User avatar
cabot
Registered User
Posts: 799
Joined: Sat Jan 07, 2012 4:16 pm

Re: The appearance of the message in the first post?

Post by cabot »

Hello,

You can add a class to this post.

Open viewtopic_body.html
Find:

Code: Select all

<div id="p{postrow.POST_ID}" class="post has-profile <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_POST_DELETED --> deleted<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ENDIF --><!-- IF postrow.POSTER_WARNINGS --> warned<!-- ENDIF -->">
Add <!-- IF postrow.S_FIRST_ROW and CURRENT_PAGE eq 1 --> mycustomclass<!-- ENDIF --> to the class attribute.

Code: Select all

<div id="p{postrow.POST_ID}" class="post has-profile <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_POST_DELETED --> deleted<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ENDIF --><!-- IF postrow.POSTER_WARNINGS --> warned<!-- ENDIF --><!-- IF postrow.S_FIRST_ROW and CURRENT_PAGE eq 1 --> mycustomclass<!-- ENDIF -->">
You now have the mycustomclass class to add style to the elements contained in this div.
e.g. .mycustomclass .avatar {}

Return to “[3.3.x] Styles Support & Discussion”