The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How use Common Template editor
i want include a script and style in each page, for all styles.
After searching for the easy way, I found style manager > common templates. It looks exactly my need! but anything I write in the header ("123" or a script\style tags) causes the page to go wrong with the error in the browser console: Code:
footer-rollup-531.js:352 Uncaught ReferenceError: pageData is not defined at footer-rollup-531.js:352 at footer-rollup-531.js:352 at footer-rollup-531.js:352 footer-rollup-531.js:262 Uncaught TypeError: F.reverse is not a function at Array.E (footer-rollup-531.js:262) at Object.runCallbacks (footer-rollup-531.js:262) at Object.init (footer-rollup-531.js:262) at HTMLDocument.<anonymous> (footer-rollup-531.js:262) at j (jquery.min.js:sourcemap:2) at Object.fireWith [as resolveWith] (jquery.min.js:sourcemap:2) at Function.ready (jquery.min.js:sourcemap:2) at HTMLDocument.I (jquery.min.js:sourcemap:2) |
#2
|
||||
|
||||
Why would you edit that template?
What is it you are trying to add? |
#3
|
|||
|
|||
i want add the https://highlightjs.org/ library.
I've already created a BBC tag, and all I have to do is add the script and style: Code:
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script> <script>hljs.initHighlightingOnLoad();</script> |
#4
|
||||
|
||||
Do you want to include those css and js files on every page or in a particular page only?
|
#5
|
|||
|
|||
every page.
|
#6
|
||||
|
||||
Where in the header template did you add those lines? I added them to just above the </head> tag and I am getting no errors on my test site.
|
#7
|
|||
|
|||
a. I did not add them directly to the template, but I used this form: admincp > style manager > thems > go to "common template". https://www.vbulletin.com/docs/html/...mmon_templates.
i add there in "header" field. if the right way it edit directly the template, I would love to know what and how, for apply globaly all styles at onc. b. not only if I write the code I brought brings an error. But even if I just write "123". This is indeed written on the page, but the whole page goes wrong as if it lacks a critical closing tag. |
#8
|
||||
|
||||
Go to Styles > find your style > Edit Templates > find the "header" template and add the code there.
|
#9
|
|||
|
|||
Quote:
and also what does the form I mentioned? Not for that exactly? |
#10
|
||||
|
||||
Can you post a link to your forum?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|