The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
You're supposed to put it in the header template, which is included in every template.
|
#3
|
||||
|
||||
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.
|
#4
|
||||
|
||||
Quote:
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. |
Благодарность от: | ||
Lynne |
#5
|
|||
|
|||
Quote:
Where can I put the chat code so it is displayed on every page of the site? |
#6
|
|||
|
|||
You have to include JavaScript right? Put it in the headinclude template like most of us said.
|
#7
|
||||
|
||||
Quote:
|
#8
|
|||
|
|||
Quote:
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&{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&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} |
#9
|
|||
|
|||
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.
|
#10
|
|||
|
|||
Edited my above post and added the code from the headintemplate. Can you suggest where to put the script code there?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|