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

How to add wowhead tooltips?

#1
http://www.wowhead.com/tooltips I've added these on other sites before, I can't figure out where to add the code in xenforo though. I'd like to have a button in the editor that would add the bb code link, but doing it manually is fine.

I need to add
Code:
<script type="text/javascript" src="http://static.wowhead.com/widgets/power.js"></script>
into my page, the themes don't seem to have a header file though.
 

EQnoble

Well-known member
#2
You would need to add it by editing the "page_container_js_head" template

and adding it as a new line right before
<!--XenForo_Require:JS-->
like this
Code:
<script type="text/javascript" src="http://static.wowhead.com/widgets/power.js"></script>
<!--XenForo_Require:JS-->
______that is essentially what you are trying to do.

However...what I have recently learned is that the best practice is to try to not edit the original templates and use template hooks rather to call in your code. Granted that is just one line but if you have 10 things like that and you have to upgrade you are going to have to revert templates.

I myself had no problem doing the edits for out of date templates but now that I understand how to use template hooks, I am going to redo everything I have customized in the same manner when possible.