Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-03-2019, 09:56 PM
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 05-04-2019, 01:55 AM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 05-04-2019, 09:34 AM
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 05-04-2019, 10:20 AM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 05-04-2019, 12:47 PM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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 05-04-2019, 03:13 PM
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 05-06-2019, 02:44 PM
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Благодарность от:
In Omnibus
Reply


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

Forum Jump


All times are GMT. The time now is 05:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03825 seconds
  • Memory Usage 2,230KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (1)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete