1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Follow me (postbit) [Deleted]

Discussion in 'Template Modifications' started by Adam Howard, Apr 14, 2013.

  1. Adam Howard

    Adam Howard Well-Known Member

    Adam Howard submitted a new resource:

    Follow me (postbit) - add a follow me button above avatar

    Read more about this resource...
     
    Shelley likes this.
  2. erich37

    erich37 Well-Known Member

    super (y)

    how to do this without having an image ?


    Many thanks!
     
  3. kankan

    kankan Active Member

    Thank you
    I tried on my Flexile theme, but nothing is displayed.

    Code:
    <xen:require css="message_user_info.css" />
     
    <div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">
    <div class="messageUserBlock">
        <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
            <div class="avatarHolder">
                <span class="helper"></span>
                <xen:avatar user="$user" size="m" />
                <!-- slot: message_user_info_avatar -->
            </div>
        </xen:hook>
     
    <xen:follow user="$user" class="Tooltip" style="background: url('styles/followme.png') no-repeat 8px center; padding:5px; text-align:center; display:block; font-weight:bold;" />
    <xen:if is="{xen:helper isIgnored, $user.user_id}"><a href="{xen:link members/unignore, $user}" class="FollowLink">{xen:phrase unignore}</a><xen:elseif is="{$canIgnore}" /><a href="{xen:link members/ignore, $user}" class="FollowLink">{xen:phrase ignore}</a></xen:if>
     
    <xen:if is="!{$isQuickReply}">
        <xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
            <h3 class="userText">
                <xen:username user="$user" itemprop="name" rich="true" />
                <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if>
                <!-- slot: message_user_info_text -->
            </h3>
        </xen:hook>
    index.png
     
  4. Adam Howard

    Adam Howard Well-Known Member

    I've not tested this, but I think removing this

    PHP:
    style="background: url('styles/followme.png')
    You want everything else to keep the spacing for the wording (for browser compatibility).
     
  5. Adam Howard

    Adam Howard Well-Known Member

    That's because you added it below it.... The instructions said, above.
     
  6. kankan

    kankan Active Member

    OOps
    Well even after adding above, still no display.
    I removed the
    style="background: url('styles/followme.png')
    But system returns a Syntax error on saving
     
  7. Adam Howard

    Adam Howard Well-Known Member

    If you're doing this in TMS... Do you have any other add-ons which seem to change message_user_info and involve this code

    PHP:
        <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
            <
    div class="avatarHolder">
                <
    span class="helper"></span>
                <
    xen:avatar user="$usersize="m" />
                <!-- 
    slotmessage_user_info_avatar -->
            </
    div>
        </
    xen:hook>
    If so, that could be a conflict
     
  8. Shelley

    Shelley Well-Known Member

    I must say an excellent resource Adam. Excellent work with it. (y)

    I personally prefer it at the bottom (rather than the top) but I'm going to play with it some more and add an icon into the spritesheet and see what I can come up with. Nice submission indeed.

    follow-adammod.png
     
    erich37 and Adam Howard like this.
  9. erich37

    erich37 Well-Known Member

    what would be the code to put it at the bottom ?

    Thanks!
    :)
     
  10. Shelley

    Shelley Well-Known Member

    All of the code Adam posted. :)

    This is how mine is looking. I inserted it before the spans

    Code:
    <xen:follow user="$user" class="Tooltip" style="background: url('styles/followme.png') no-repeat 8px center; padding:5px; text-align:center; display:block; font-weight:bold;" />
    <xen:if is="{xen:helper isIgnored, $user.user_id}"><a href="{xen:link members/unignore, $user}" class="FollowLink">{xen:phrase unignore}</a><xen:elseif is="{$canIgnore}" /><a href="{xen:link members/ignore, $user}" class="FollowLink">{xen:phrase ignore}</a></xen:if>
       
     
    <span class="arrow"><span></span></span>
    
     
    erich37 and Adam Howard like this.
  11. Adam Howard

    Adam Howard Well-Known Member

    Shelley likes this.
  12. Shelley

    Shelley Well-Known Member

    I think either if it's top or at the bottom the modification as it's uses for each location. I agree with you that when someone has alot of info at the bottom it could get crowded and the top location would suit better but my messageuserinfo is less crowded and suits perfectly imo at the bottom.

    Eitherway I'm liking the resource so I'll say again, nice job. :)
     
    Adam Howard likes this.
  13. Adam Howard

    Adam Howard Well-Known Member

    Lycaon and Shelley like this.
  14. kankan

    kankan Active Member

    Adam,

    My fault, i was applying code to my Master theme instead of Flexile....
     
    Adam Howard likes this.
  15. Adam Howard

    Adam Howard Well-Known Member

    No worries. :)
    Glad you got it working.

    Some free advise.....

    I always tell people never to add anything to the master theme.

    Of course I always use xenforo's default theme as a parent theme for everything else (when possible). This makes editing easier and recovery more possible.

    Although Flexile I don't think works well as a child theme for xenforo default.
     
    Kaynil and Shelley like this.
  16. Adam Howard

    Adam Howard Well-Known Member

    Question:

    Do you mind if I add this to another add-on or share it?

    Answer:

    The code used to make this template is code commonly found within XenForo its self. It is also uses some code from css universal standards (again commonly used). In short there is no exclusive code within this template except for the code which is exclusive only to XenForo, which is open for personal usage to XenForo customer.

    As such I claim no ownership to the code used. And you're welcome to freely add it to any add-on or share it among any customer of XenForo Ltd.

    Note: Please do not send me PM's for support. Thanks.
     
  17. zooki

    zooki Active Member

    lol so the message space will grow above !

    I was thinking of putting "start a conversation" there too.. although, i think call to action should be one word, like "message".
     
  18. Adam Howard

    Adam Howard Well-Known Member

    Results will vary depending on your layout and what you have already.... Like with any template modification it is customizable to fit your needs and is optional in that if you don't need it or want it, you don't have to add it :)
     
    zooki and Shelley like this.
  19. zooki

    zooki Active Member

    Yes of course, I wasn't bashing your modification ;)
     
    Adam Howard likes this.
  20. zooki

    zooki Active Member

    Ok I am thinking to update my site to 1.2

    Is there anything i need to do? with regards this modification working?
     

Share This Page