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

Won't Fix HTML markup wrong in sidebar visitor panel template?

Discussion in 'Resolved Bug Reports' started by Freelancer, Dec 10, 2015.

  1. Freelancer

    Freelancer Well-Known Member

    I was trying to insert more stats from other add-ons into the sidebar visitor panel but it seems that I can not find the correct way to do it because the replacement can not be inserted into the right place.

    Looking at the template I think I found a bug. </xen:hook> and </div> tags are not in correct order. I compared it with the "member_view" template and there the </xen:hook> comes before the </div> which makes great sense because otherwise you would not be able to insert tags if they will always be placed outside the <div>.

    Am I wrong?

    Code:
    <div class="visitorText">
                <h2>{xen:phrase signed_in_as_x_sidebar, 'name={xen:helper username, $visitor, 'NoOverlay'}'}</h2>   
                <div class="stats">
                <xen:hook name="sidebar_visitor_panel_stats">
                    <dl class="pairsJustified"><dt>{xen:phrase messages}:</dt> <dd>{xen:number $visitor.message_count}</dd></dl>
                    <dl class="pairsJustified"><dt>{xen:phrase likes}:</dt> <dd>{xen:number $visitor.like_count}</dd></dl>
                    <xen:if is="{$xenOptions.enableTrophies}">
                        <dl class="pairsJustified"><dt>{xen:phrase points}:</dt> <dd>{xen:number $visitor.trophy_points}</dd></dl>
                    </xen:if>
                </div>
                </xen:hook>
            </div>
    ALSO: I am looking to make a template mod and changed the template for my style but the template mod created always draws the code from the master template? Is this intentional?
     
    Last edited: Dec 10, 2015
  2. Mike

    Mike XenForo Developer Staff Member

    This does appear to be bugged, but changing it would essentially break backwards compatibility for no reason. (Note that hooks themselves are deprecated.) Template modifications can still match that area to get the location they like. (If we change that, then different template modifications would be needed for different versions.)

    If you have any further questions about this, it's best to ask elsewhere, but template modifications apply to all styles.
     
  3. Freelancer

    Freelancer Well-Known Member

    Check. Thanx for the confirmation. Can you direct me to where I can find more documentation on template mods or tutorial to a workaround.
     
  4. Mike

    Mike XenForo Developer Staff Member

    I'm not sure what you're after exactly, so you will probably want to post a thread. If you just want an edit in a particular style, we recommend editing the template directly.
     
  5. Freelancer

    Freelancer Well-Known Member

    I will post a thread in the according forum.
     

Share This Page