Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 04 May 2019, 00:56
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
Where to add code to <head> and <body> sections of a Page?

I have a project where I'm supposed to add some code within the <head> section of a page...and a 2nd bit of code in the <body> section of the same page.

Let's say we're talking about the Home Page of my site...where do I find the <head> and <body> sections of the home page?

Is it a specific template or templates I need to edit...or something else?

Thanks
Reply With Quote
  #2  
Old 04 May 2019, 04:55
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Real name: Kris
The <head> section is hidden. It contains the doctype and meta charset and css rel links and such. The <body> is the entire visible document. What part of the body are you supposed to edit? vBulletin 4 is not coded in HTML5 so the <div> tags are used in places where HTML5 uses different tags like <article> and <section>.
Reply With Quote
  #3  
Old 04 May 2019, 12:34
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
Hello In Omnibus...thanks for replying.

Basically the code I need to insert in the <head> and <body> area's of a page is advertising code from a different advertising supplier I'm trying out. I kind of figured what you mentioned...that vBulletin doesn't work exactly like websites/webpages written in HTML5...but thought since I'm no expert...I should ask for clarification/help.

The instructions I was sent say:

- "Add this code in the head section"
- "Add this code in the body section"

Normally when I add advertising code for vBulletin I simply edit each "ad template" with a single section of code...and most of the time everything works fine. In this case I'm being told to add two sections of code (one in the <head> area & one in the <body> area).

Any other suggestions? Would seeing any of the code help?

Thanks
Reply With Quote
  #4  
Old 04 May 2019, 13:20
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Real name: Anthony
The head & body tags are in your templates, search for the tags in the templates, they arent to hard to find.

If you dont want to redesign your header template, just use the ad manager as it already has 2 places for header ads
Reply With Quote
  #5  
Old 04 May 2019, 15:47
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Real name: Kris
Originally Posted by alfuzzy View Post
Hello In Omnibus...thanks for replying.

Basically the code I need to insert in the <head> and <body> area's of a page is advertising code from a different advertising supplier I'm trying out. I kind of figured what you mentioned...that vBulletin doesn't work exactly like websites/webpages written in HTML5...but thought since I'm no expert...I should ask for clarification/help.

The instructions I was sent say:

- "Add this code in the head section"
- "Add this code in the body section"

Normally when I add advertising code for vBulletin I simply edit each "ad template" with a single section of code...and most of the time everything works fine. In this case I'm being told to add two sections of code (one in the <head> area & one in the <body> area).

Any other suggestions? Would seeing any of the code help?

Thanks
If it were me I would add anything that is supposed to go in the <head> to the headinclude template instead. That way you are not editing the head template.

Anything that is supposed to go in the body as far as ads are concerned I would take Snakes advice and use the existing ad manager.
Reply With Quote
  #6  
Old 04 May 2019, 18:13
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
I'm pretty familiar with the Ad Manager....and I usually modify the ad templates directly (maybe it's the same process...2 ways of doing the same thing). I've had some issues using the Ad Manager on my site in the past...and find modifying the Ad templates directly pretty much just as easy...and more reliable.

My understanding is both sections of the ad code I've been given need to be inserted in the proper places for the ads to work.

- If adding the "<head> code" to the head_include template will work...then I can do that.
- If adding the "<body> code" to the Ad Manager/Ad templates area...then I can try this too.

I will give this a try...and post results.

Thanks
Reply With Quote
  #7  
Old 06 May 2019, 17:44
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
Update:

I added the "<head> code" to the headinclude template...and added the "<body> code" to the individual Ad templates...and everything seems to be working!

Thanks VERY much for the help!
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 08:24.

Layout Options | Width: Wide Color: