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 12-05-2014, 06:56 PM
XYZ500 XYZ500 is offline
 
Join Date: Aug 2014
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default What templates are used on the forum's front end?

Sorry, I know my thread title is very vague and probably doesn't make any sense. Let me explain.

I installed CometChat. It requires me to put a HTML code under <head> of every template I want the chat bar to be displayed. I put the code in 'forumhome' template and it is displaying the chat bar on mysite.com/forum.php. That's great. I put the code in 'forumdisplay' template and it is displaying the chat bar in on pages where threads are listed.

So I want the names of all the templates where I can put this code as I want the chat bar to be displayed on every page of my forum (inside threads page, private messages page, user cp page, writing a post page etc.). So I want someone to tell me the names of all these templates. These templates must include <head> tag as the code is placed under it.
Reply With Quote
  #2  
Old 12-05-2014, 07:00 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're supposed to put it in the header template, which is included in every template.
Reply With Quote
  #3  
Old 12-06-2014, 02:35 AM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep what Dave said. There is a header template & a headerinclude template. The header template should have the <head> tag that you need. Then it will show the chat bar on the entire forum everywhere.
Reply With Quote
  #4  
Old 12-06-2014, 08:25 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HM666 View Post
Yep what Dave said. There is a header template & a headerinclude template. The header template should have the <head> tag that you need.
No, you're wrong. No offense, but have you ever looked at the basic structure how vB puts together the html page frame, before adivsing others?

This is the basic structure of a html page
HTML Code:
<HTML>
   <HEAD>
      <TITLE>My first HTML document</TITLE>
   </HEAD>
   <BODY>
      <P>Hello world!
   </BODY>
</HTML>

The header template is part of the normal page body (i.e. inside <body></body>), just like the footer or anything else vB renders on the screen.

What you wrongly call the headerinclude template really is called headinclude, because it is the stuff that goes between the <head></head>-tags. So: The code needs to go into the headinclude template. And there are no <head>-tags in the headinclude template, because they are in the main page templates, like SHOWTHREAD.
Reply With Quote
Благодарность от:
Lynne
  #5  
Old 12-06-2014, 06:38 PM
XYZ500 XYZ500 is offline
 
Join Date: Aug 2014
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cellarius View Post
No, you're wrong. No offense, but have you ever looked at the basic structure how vB puts together the html page frame, before adivsing others?

This is the basic structure of a html page
HTML Code:
<HTML>
   <HEAD>
      <TITLE>My first HTML document</TITLE>
   </HEAD>
   <BODY>
      <P>Hello world!
   </BODY>
</HTML>

The header template is part of the normal page body (i.e. inside <body></body>), just like the footer or anything else vB renders on the screen.

What you wrongly call the headerinclude template really is called headinclude, because it is the stuff that goes between the <head></head>-tags. So: The code needs to go into the headinclude template. And there are no <head>-tags in the headinclude template, because they are in the main page templates, like SHOWTHREAD.
I don't understand a lot of technical language but you seem to me to be right as I couldn't found <head> in many of the templates. Only in forumhome and forumdisplay template.

Where can I put the chat code so it is displayed on every page of the site?
Reply With Quote
  #6  
Old 12-06-2014, 06:44 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have to include JavaScript right? Put it in the headinclude template like most of us said.
Reply With Quote
  #7  
Old 12-06-2014, 11:41 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cellarius View Post
No, you're wrong. No offense, but have you ever looked at the basic structure how vB puts together the html page frame, before adivsing others?

This is the basic structure of a html page
HTML Code:
<HTML>
   <HEAD>
      <TITLE>My first HTML document</TITLE>
   </HEAD>
   <BODY>
      <P>Hello world!
   </BODY>
</HTML>

The header template is part of the normal page body (i.e. inside <body></body>), just like the footer or anything else vB renders on the screen.

What you wrongly call the headerinclude template really is called headinclude, because it is the stuff that goes between the <head></head>-tags. So: The code needs to go into the headinclude template. And there are no <head>-tags in the headinclude template, because they are in the main page templates, like SHOWTHREAD.
Geez chill out dude. Everyone makes mistakes I was really tired and did not have the template opened up in front of me at the time. And yes thanks I've looked at them, I do all the time and edit them just fine thank you very much. What you never made a mistake before??
Reply With Quote
  #8  
Old 12-07-2014, 02:51 PM
XYZ500 XYZ500 is offline
 
Join Date: Aug 2014
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave View Post
You have to include JavaScript right? Put it in the headinclude template like most of us said.
Yes its a script.

Cometchat says to put it under <head> tag. There is no <head> tag in headinclude. What should I do?

This is my headinclude template.

Code:
<meta http-equiv="Content-Type" content="text/html; charset={vb:stylevar charset}" />
<meta id="e_vb_meta_bburl" name="vb_meta_bburl" content="{vb:raw vboptions.bburl}" />
<base href="{vb:raw basepath}" /><!--[if IE]></base><![endif]-->
<meta name="generator" content="vBulletin {vb:raw vboptions.templateversion}" />
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<vb:if condition="$stylevar['favicon']">
	<link rel="Shortcut Icon" href="{vb:stylevar favicon}" type="image/x-icon" />
</vb:if>
<vb:if condition="$show['threadinfo']">
<
<vb:elseif condition="$show['foruminfo']" />
		<meta name="keywords" content="{vb:raw foruminfo.title_clean}, {vb:raw vboptions.keywords}" />
		<meta name="description" content="<vb:if condition="$pagenumber > 1">{vb:rawphrase page_x, {vb:raw pagenumber}}-</vb:if>{vb:raw foruminfo.description_clean}" />
<vb:else />
		<meta name="keywords" content="{vb:raw vboptions.keywords}" />
		<meta name="description" content="{vb:raw vboptions.description}" />
</vb:if>

<vb:if condition="$show['fb_opengraph']">
	{vb:raw facebook_opengraph}
</vb:if>

<vb:if condition="$show['remoteyui']">
	<vb:if condition="$show['remoteyuicombo']">
		<script type="text/javascript" src="{vb:stylevar yuicombopath}?{vb:stylevar yuiversion}/build/yuiloader-dom-event/yuiloader-dom-event.js&amp;{vb:stylevar yuiversion}/build/connection/connection-min.js"></script>
	<vb:else />
		<script type="text/javascript" src="{vb:stylevar yuipath}/yuiloader-dom-event/yuiloader-dom-event.js"></script>
	</vb:if>
</vb:if>
<script type="text/javascript">
<!--
	if (typeof YAHOO === 'undefined') // Load ALL YUI Local
	{
		document.write('<script type="text/javascript" src="clientscript/yui/yuiloader-dom-event/yuiloader-dom-event.js?v={vb:raw vboptions.simpleversion}"><\/script>');
		document.write('<script type="text/javascript" src="clientscript/yui/connection/connection-min.js?v={vb:raw vboptions.simpleversion}"><\/script>');
		var yuipath = 'clientscript/yui';
		var yuicombopath = '';
		var remoteyui = false;
	}
	else	// Load Rest of YUI remotely (where possible)
	{
		var yuipath = '{vb:stylevar yuipath}';
		var yuicombopath = '{vb:stylevar yuicombopath}';
		var remoteyui = true;
		if (!yuicombopath)
		{
			document.write('<script type="text/javascript" src="{vb:stylevar yuipath}/connection/connection-min.js?v={vb:raw vboptions.simpleversion}"><\/script>');
		}
	}
	var SESSIONURL = "{vb:raw session.sessionurl_js}";
	var SECURITYTOKEN = "{vb:raw bbuserinfo.securitytoken}";
	var IMGDIR_MISC = "{vb:stylevar imgdir_misc}";
	var IMGDIR_BUTTON = "{vb:stylevar imgdir_button}";
	var vb_disable_ajax = parseInt("{vb:raw vboptions.disable_ajax}", 10);
	var SIMPLEVERSION = "{vb:raw vboptions.simpleversion}";
	var BBURL = "{vb:raw vboptions.bburl}";
	var LOGGEDIN = {vb:raw bbuserinfo.userid} > 0 ? true : false;
	var THIS_SCRIPT = "{vb:raw this_script}";
	var RELPATH = "{vb:raw relpath}";
	var PATHS = {
		forum : "{vb:raw vboptions.vbforum_url}",
		cms   : "{vb:raw vboptions.vbcms_url}",
		blog  : "{vb:raw vboptions.vbblog_url}"
	};
	var AJAXBASEURL = "{vb:raw ajaxbaseurl}";
// -->
</script>
<script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-core.js?v={vb:raw vboptions.simpleversion}"></script>
{vb:raw template_hook.headinclude_javascript}

<vb:if condition="$vboptions['externalrss']">
	<link rel="alternate" type="application/rss+xml" title="{vb:raw vboptions.bbtitle} {vb:rawphrase rss_feed}" href="{vb:raw vboptions.bburl}/external.php?type=RSS2" />
	<vb:if condition="$show['foruminfo'] OR $show['threadinfo']">
		<link rel="alternate" type="application/rss+xml" title="{vb:raw vboptions.bbtitle} - {vb:raw foruminfo.title_clean} - {vb:rawphrase rss_feed}" href="{vb:raw vboptions.bburl}/external.php?type=RSS2&amp;forumids={vb:raw foruminfo.forumid}" />
	</vb:if>
</vb:if>

<vb:if condition="$vboptions['storecssasfile']">
	{vb:cssfile main-rollup.css}
        {vb:raw template_hook.custom_css_links}
<vb:else />
	{vb:cssfile bbcode.css,editor.css,popupmenu.css,reset-fonts.css,vbulletin.css,vbulletin-chrome.css,vbulletin-formcontrols.css{vb:raw template_hook.custom_css_list}}
</vb:if>
	<!--[if lt IE 8]>
	{vb:cssfile popupmenu-ie.css,vbulletin-ie.css,vbulletin-chrome-ie.css,vbulletin-formcontrols-ie.css,editor-ie.css}
	<![endif]-->
{vb:raw template_hook.headinclude_css}
Reply With Quote
  #9  
Old 12-07-2014, 02:52 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ECZ View Post
Yes its a script.

Cometchat says to put it under <head> tag. There is no <head> tag in headinclude. What should I do?
headinclude is a template which includes itself within the head tags, there's no need for us to mess around with those tags. Just put it in it and you'll see that it works.
Reply With Quote
  #10  
Old 12-07-2014, 02:57 PM
XYZ500 XYZ500 is offline
 
Join Date: Aug 2014
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave View Post
headinclude is a template which includes itself within the head tags, there's no need for us to mess around with those tags. Just put it in it and you'll see that it works.
Edited my above post and added the code from the headintemplate. Can you suggest where to put the script code there?
Reply With Quote
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 08:32 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.04574 seconds
  • Memory Usage 2,279KB
  • Queries Executed 11 (?)
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_code
  • (3)bbcode_html
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete