• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Show thread starter title in their post

chrisj

Active member
This is a very simple modification, thanks to Jake Bunce for template. I just wanted to help those that needed to know exactly what to do.

In message_user_info

After
HTML:
<xen:username user="$user" itemprop="name" rich="true" />
Enter
HTML:
<xen:if is="{$post.user_id} == {$thread.user_id} && {$post.position} != 0">
    <b><em class="userTitle">Thread Starter</em></b>
</xen:if>

I use em class "userTitle" so I don't have to add any more css files. This code also does not add it to the first post so remove && {$post.position} != 0 if you do want it with the first post.

You can place this code in different locations depending on where you want to see the text, such as after the user title.

Screen shot 2011-03-20 at 3.54.58 PM.webp
 
Is there a way to do this in the extra.css? I like it and am using it, but it's something else I have to remember when the templates change.

(Great work, though!)
 
EXTRA.css can only be used to change styling, not affect how the code functions.
 
I'm going to update the first post soon, bogus mentioned about putting the thread starter as a ribbon. I was able to get it to work with minimal extra css however I think it looks a little crowded with multiple ribbons however. If I moved it to a different location, I could try and make an addon. I don't know if a small template modification should be an entire addon.
 
I was testing the Mod in my testboard and recognized one, more or less, problem.
I have a bot who posts different messages from an IRC Channel. Its the only poster in the Forum which means u see the Threadstarter in every post after the first one..... Is there any way not to add the Threadstarter if someone starts a post after his own? btw, i was testing the Ribbon too ;)
Unbenannt.webp
 
I was testing the Mod in my testboard and recognized one, more or less, problem.
I have a bot who posts different messages from an IRC Channel. Its the only poster in the Forum which means u see the Threadstarter in every post after the first one..... Is there any way not to add the Threadstarter if someone starts a post after his own? btw, i was testing the Ribbon too ;)
View attachment 12950
Sorry for not getting back to you quickly. I need to look up more variable names. What I should be able to do is check if the user that posted in the post above is the same user, then do not show the thread starter. This way, it will only show thread starter title if someone else posted in between. I think that is a desirable result. Hopefully it is possible.
 
I have do as you said but no thing appear under their name. My code is follow your advise
Code:
<xen:username user="$user" itemprop="name" rich="true" />
<xen:if is="{$post.user_id} == {$thread.user_id} && {$post.position} != 0">
    <b><em class="userTitle">Thread Starter</em></b>
</xen:if>
</xen:if>
 
Top Bottom