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

Determine template location by code?

Discussion in 'XenForo Questions and Support' started by Ryan Kent, Mar 18, 2011.

  1. Ryan Kent

    Ryan Kent Well-Known Member

    Is there any way you can figure out what template a piece of code is in? If a piece of code controlling a block is hidden in an obscure template, is there any way of finding it other then checking all of them?

    The issue I am having concerns a facebook widget on the sidebar of the members page. I installed Flexile Dark today, the text from that widget is in black, my background is dark so it can't be seen very well.

    Using Firebug I located the color property was controlled by .metadata. I began by looking through xenforo_facebook.css and sidebar.css thinking it might be there, but no luck. I expanded my search through the various xenforo_xxx.css and public.css, no luck. Then I remembered an issue I experienced with this same widget, I looked up the thread and realized it was controlled by member_list template. I found the code that causes the widget to appear at the bottom of member list. So I opened member_list.css thinking for sure I would locate the css code there but...no luck. I also checked EXTRA.css just in case, but not there either

    So I am thinking there has to be an easier way to find a piece of code. Some sort of index somewhere?

  2. ExpertPixels.com

    ExpertPixels.com Well-Known Member

    try adding this to your EXTRA.CSS file:

    .connect_widget {
        color: #FFF !important;
    .metadata {
        color: #FFF !important;
    Just an idea, i am still sussing out the xf templates / system, promising signs i mus say but it's only my second day looking into xf.

    EDIT:... I had a similar problem with a dark vbulletin 4 style.. the facebook block text was dark also (just about unreadable) but in this case it was controlled via facebooks .css and was nothing more i could do about it.
  3. Russ

    Russ Well-Known Member

    There is also a setting for the facebook plug-in to set it for a light or dark color style ;)

    Appearance -> Style Properties -> General
  4. James

    James Well-Known Member

    I'd like an easier method to find templates too... at the minute I just start at the content template and check all associated templates.
  5. Ryan Kent

    Ryan Kent Well-Known Member

    @CMSTemplatez, thanks for the suggestion. I had tried that and it didn't work.

    @Russ, I saw that too and tried it, it doesn't work for this particular plug-in apparently. The plug-in remains black on either setting. Besides the other plug-ins change from a black to a grey color. At the moment neither would help much since my background is dark grey. I was hoping for a white type of text.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    The FAQ explains how to identify the main template.

    For additional included templates, they also have a class name.

    What you're trying to do though is change the contents of an iframe which is controlled by Facebook.

Share This Page