1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. 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

Discussion in 'Template Modifications [Archive]' started by chrisj, Mar 20, 2011.

  1. chrisj

    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

    <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>
    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.png
    viper357, DRE, high1976 and 5 others like this.
  2. Edrondol

    Edrondol Well-Known Member

    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!)
  3. Brogan

    Brogan XenForo Moderator Staff Member

    EXTRA.css can only be used to change styling, not affect how the code functions.
  4. Edrondol

    Edrondol Well-Known Member

    That's what I thought. Worth a shot, though.
  5. Garamond

    Garamond Well-Known Member

    This should be in the default forum package, as an optional function. It's very useful.
    chrisj likes this.
  6. chrisj

    chrisj Active Member

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

    bogus Guest

    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 ;)
  8. chrisj

    chrisj Active Member

    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.
    bogus likes this.
  9. Gultog

    Gultog Member

    I have do as you said but no thing appear under their name. My code is follow your advise
    <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>

Share This Page