PDA

View Full Version : What templates are used on the forum's front end?


XYZ500
12-05-2014, 06:56 PM
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.

Dave
12-05-2014, 07:00 PM
You're supposed to put it in the header template, which is included in every template.

HM666
12-06-2014, 02:35 AM
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.

cellarius
12-06-2014, 08:25 AM
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>
<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.

XYZ500
12-06-2014, 06:38 PM
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>
<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?

Dave
12-06-2014, 06:44 PM
You have to include JavaScript right? Put it in the headinclude template like most of us said.

HM666
12-06-2014, 11:41 PM
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>
<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??

XYZ500
12-07-2014, 02:51 PM
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.

<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}

Dave
12-07-2014, 02:52 PM
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.

XYZ500
12-07-2014, 02:57 PM
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?

Dave
12-07-2014, 03:00 PM
At the bottom.