• 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?

Ryan Kent

Well-known member
#1
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?

Facebook-metadata.PNG
 

ExpertPixels.com

Well-known member
#2
try adding this to your EXTRA.CSS file:

Code:
.connect_widget {
    color: #FFF !important;
}
or
Code:
.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.
 

Russ

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

Appearance -> Style Properties -> General
 

James

Well-known member
#4
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.
 

Ryan Kent

Well-known member
#5
try adding this to your EXTRA.CSS file:
There is also a setting for the facebook plug-in to set it for a light or dark color style ;)

Appearance -> Style Properties -> General
@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.
 

Brogan

XenForo moderator
Staff member
#6
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.