Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 02 Jul 2017, 20:39
sea_blue sea_blue is offline
 
Join Date: Jul 2017
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #2  
Old 02 Jul 2017, 20:57
In Omnibus's Avatar
In Omnibus In Omnibus is online now
 
Join Date: Apr 2010
Real name: Kris
Why would you edit that template?

What is it you are trying to add?
Reply With Quote
  #3  
Old 02 Jul 2017, 21:50
sea_blue sea_blue is offline
 
Join Date: Jul 2017
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #4  
Old 03 Jul 2017, 14:17
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
Do you want to include those css and js files on every page or in a particular page only?
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #5  
Old 03 Jul 2017, 14:26
sea_blue sea_blue is offline
 
Join Date: Jul 2017
every page.
Reply With Quote
  #6  
Old 03 Jul 2017, 16:18
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #7  
Old 03 Jul 2017, 17:17
sea_blue sea_blue is offline
 
Join Date: Jul 2017
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.
Reply With Quote
  #8  
Old 03 Jul 2017, 19:55
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Go to Styles > find your style > Edit Templates > find the "header" template and add the code there.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #9  
Old 03 Jul 2017, 20:04
sea_blue sea_blue is offline
 
Join Date: Jul 2017
Originally Posted by Lynne View Post
Go to Styles > find your style > Edit Templates > find the "header" template and add the code there.
I asked if there was an easy way to do this for all styles in one place.

and also what does the form I mentioned? Not for that exactly?
Reply With Quote
  #10  
Old 03 Jul 2017, 23:51
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
Can you post a link to your forum?
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #11  
Old 04 Jul 2017, 03:30
sea_blue sea_blue is offline
 
Join Date: Jul 2017
no. i cant.
Reply With Quote
  #12  
Old 04 Jul 2017, 20:42
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by sea_blue View Post
I asked if there was an easy way to do this for all styles in one place.

and also what does the form I mentioned? Not for that exactly?
Typically, your 'top' style is the one where you edit templates, and the child forums is where you just change colors. So, editing the top style would be the only thing you need to do. If you don't have it set up this way, then you will need to edit every style.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #13  
Old 05 Jul 2017, 10:29
sea_blue sea_blue is offline
 
Join Date: Jul 2017
ok, thank.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 18:19.

Layout Options | Width: Wide Color: