Duplicate Identify the OP of a thread

This suggestion has been closed. Votes are no longer accepted.
I use this in template message_macros
Code:
<xf:if is="{$__globals.thread} AND {$__globals.thread.user_id} == {$user.user_id}">
<div class="userBanner userBanner--accent message-userBanner">
{{ phrase('thread_starter') }}
</div>
</xf:if>
It works in 2.1 haven't tested in 2.2 yet.
It would be nice to have a check if the TS is a deleted user and not show it then.
 
I did some thinking and testing :) to solve the minor problem with deleted users.

You can put the code below:
Code:
<xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="jobTitle" />
in message_macros

The new code, it might be improved:
Code:
<xf:if is="{$__globals.thread} AND {$__globals.thread.user_id} !== 0 AND {$__globals.thread.user_id} == {$user.user_id}">
<div class="userBanner userBanner--accent message-userBanner" >
{{ phrase('thread_starter') }}
</div>
</xf:if>
 
Any code should eliminate it from the first post, not only because of the redundancy, but the annoyance of seeing OP OP OP in all the first posts. ;)
 
I guess you could wrap it in:
Code:
<xf:if is="$post.position % $xf.options.messagesPerPage !== 0">
    Don't show content...
</xf:if>
Haven't tested it.
 
I have enough banners and would prefer to have small flash on the avatar. We got used to this, it was good https://xenforo.com/community/resources/al-original-poster-highlight.6134/
With the size of avatars, mini-avatars, and small devices, I don't think the "OP" would be legible, and it would not occur to me that a dot would be for thread starter. Add to that, OP is a legacy term that oldschoolers use.

Even FB does a banner, when you're on a verified page and they reply. Banner is better imo.

It could look nice next to the date (timestamp).
 
Last edited:
It's easily done with a simple edit of the thread_view template using <xf:if is="$post.user_id == $thread.user_id"> and some CSS.

If you have guest posting enabled then you likely want to introduce additional code to account for that.
 
If you are doing an avatar overlay will "OP" be in phrases, and if so will it look okay if adding words? Just curious. I'd perhaps use the word "Author" as to not get too lengthy. Thx.
 
Top Bottom