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

Replace Sidebar Visitor Panel Image?

Discussion in 'Styling and Customization Questions' started by DRE, Sep 10, 2012.

  1. DRE

    DRE Well-Known Member

    How do you replace the sidebar_visitor_panel image? I keep getting a broken image link.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The avatar in the visitor panel?
     
  3. DRE

    DRE Well-Known Member

    Yes sir!
     
  4. DRE

    DRE Well-Known Member

    When I was messing around with it I tried using this code

    Code:
    <a href="{xen:link account/personal-details}"><img src="{$user.customFields.customsidebarimage}" height="190" width="190" /></a>
    something like that but it kept coming up with a broken image.
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Presumably you want to use $visitor instead of $user.
     
  6. DRE

    DRE Well-Known Member

    Didn't work.

    didntwork.jpg
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I assume "customsidebarimage" is a field_id of a custom user field? And I assume your user has something entered into that field in his profile?

    Try debugging the output of {$visitor.customFields.customsidebarimage} by adding that variable to the top of the template. That should allow you to see the output directly on the page.
     
  8. DRE

    DRE Well-Known Member

    It's a custom userfield and no that didn't work either.
     
  9. DRE

    DRE Well-Known Member

    Wait how do you debug whatever you just said? I did remove the custom userfield though and just used the direct link of the picture instead.
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Look at the source code of the page. Find the img tag where you used that custom field. Confirm that the value is showing correctly in the source.
     
    8thos likes this.
  11. DRE

    DRE Well-Known Member

    Thanks I had written the url wrong. I even have the CSS lined up for this perfect now!!!
     

Share This Page