XF 1.5 Template Search Problems


Are there certain types of search strings the template search function is unable to perform?

I purchased a theme I thought had color palette-defined colors throughout, but it actually has a ton of hard-coded colors in the CSS (dohtheme I'm looking at you), but when I run a template search for an RGB value like "48, 101, 152", it returns no results. When I paste the CSS into a text editor and search, or look manually, I can find it.

Thank you.


XenForo moderator
Staff member
It's likely not present in the template in that exact string from.

As it relates to a third party style, you should post in the style thread so the author can help.


I do think there may still be an issue with the search function, however. I found a template I suspected had the following color in it: rgb(44, 93, 140)

Copying and pasting the code from that template into a text editor (EditPlus), I found the color by searching on the term "background" in the text editor and looking through all the color callouts it returned.

I then copied that exact color definition I found (the one listed above) and went back to the XenForo search templates function and searched on that string, expecting to have that template returned, but it returned no results.


lol - I swear I'm not trying to pull your leg, Brogan. And I'm sometimes a moron, but I don't think it's the case this time.

Ok, attached are screen caps of me about to make the search using that exact string in both the default theme and the one I purchased, called Minty. The other screen cap is the results - same for each search, no results.

So if this is working for you and not for me, could this be an issue with corrupted files on my install, or possibly my server not running a current version of something? If so, what do you recommend as a next step for me?




  • minty_theme_search.jpg
    47 KB · Views: 11
  • theme_search_results.jpg
    39.2 KB · Views: 9
  • default_theme_search.jpg
    56.2 KB · Views: 8
Last edited:

Chris D

XenForo developer
Staff member
If it's in the templates, it should turn up.

It does a very simple MySQL query based search.

How can you be sure that value is in the style's templates and actually not referenced via a Style Property?


That's a great question and I'm not exactly sure how to answer.
On this page: http://groundtradesxchange.com/xf/index.php?forums/main-forum.2/ - I'm trying to find the source of the blue background and change it to brown.

The sectionFooter div class is partially defined in the template "xenforo_sections.css" with this code:

   overflow: hidden; zoom: 1;
   @property "sectionFooter";
   font-size: 13px;
   color: @textCtrlBackground;
   background-color: rgb(48, 101, 152);
   padding: 4px 10px;
   line-height: 16px;
   @property "/sectionFooter";

So I found the color definition by first searching for all templates containing ".sectionFooter", then manually looking through each of those CSS templates to find where a background color might be defined as part of .sectionFooter.

However, now that I have the color definition (having found it manually), if I go back to Search Templates and search for
rgb(48, 101, 152)
, no results are returned.

If I'm understanding your question correctly, are you saying that because the rgb(48, 101, 152) falls inside of @property tags, it can't be found in a search?
Last edited:

Tracy Perry

Well-known member
If I'm understanding your question correctly, are you saying that because the rgb(48, 101, 152) falls inside of @property tags, it can't be found in a search?
Your using a custom style... so, does it use a framework also?
Check in your ACP for any custom footer settings.

UI.X (which is a different style with it's own framework) has it's own custom footer settings.

Screen Shot 2016-03-13 at 7.28.30 PM.png

and I think (but not sure) that the @ indicates that it's a style property setting typically.
A search of templates will not normally turn those settings up (since they are done via the ACP style properties).


XenForo developer
Staff member
If I'm understanding your question correctly, are you saying that because the rgb(48, 101, 152) falls inside of @property tags, it can't be found in a search?
Correct. That value is not actually present in the template. It is expanded at display time for ease of editing.


It does have a framework, but the "sectionFooter" I believe is different from the actual footer template. Searching through the two Style Property Groups for this custom theme that are named "footer", there's nothing related to this background color.

So if I assume that anything between @property tags doesn't show in a template search, is there some other way to run a search to find things like this? Or was I already using the most expedient method?