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

XF 1.5 Notice criteria

#1
Is it possible to create a notice that displays ONLY while viewing any thread in any forum? I'd like to post a notice that users MUST return to the forum display to post a new thread. But I don't want it to clutter things up if they're already viewing the thread list. Our users can't seem to figure out how to create a new thread if something in the thread they're viewing inspires them to create a new thread that would be off topic in that thread.
 
#3
THANKS! That's got it. I don't know enough about the inner workings to figure that out. It's obvious now that I've seen it, but I had no idea what to search for to find that information.
Is there some tutorial that will give me more ideas about the inner workings? Maybe a list of useful things?
 
Last edited:

Mr Lucky

Well-known member
#4
To find out the current template, go to page source in your browser and look for id=content. The class is the template you need in page criteria FirefoxScreenshot068.png

It's quicker with xf2 as it's almost right at the top.

FirefoxScreenshot069.png
 

Sunka

Well-known member
#5
Or just create new bookmark with this content for url and when you want to know what template is in what you are looking at, just click on bookmark and it will show you name of template.

For XenForo 1
Code:
javascript:(function(){alert(document.querySelector('#content').getAttribute('class'))}())
For Xenforo 2
Code:
javascript:(function(){XF.flashMessage($('html').data('template'), 12000)}())