vBulletin

Thank you for visiting. This is our website archive. Please visit our main website by clicking the banner above.
vBulletin FAQ is dedicated to helping the forum owner build, manage and profit from his vBulletin Forum
vBulletin Web Hosting - Free skins and styles for your vBulletin - Search Engine Optimization




Question on GENERIC_SHELL template

mhdhallak
09-13-2006, 08:16 AM
I'm using v3.6 of vB. I signed up for a StatCounter account and was given a script code to include in my forum pages. After some research, I figured the proper place to put such code (which should ideally be on every page in the forum) is in GENERIC_SHELL template which contains the skeleton HTML tags for all pages.

My GENERIC_SHELL now looks something like:

$stylevar[htmldoctype]
<html id="moooo" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle]</title>
</head>
<body>
$header
$navbar

$HTML

$footer
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=1819955;
var sc_invisible=1;
var sc_partition=13;
var sc_security="1540f2be";
var sc_remove_link=1;
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><img src="http://c14.statcounter.com/counter.php?sc_project=1819955&java=0&security=1540f2be&invisible=1" alt="free web site hit counter" border="0"> </noscript>
<!-- End of StatCounter Code -->
</body>
</html>

However, when I load any page in the forum, i don't see the code being injected in the resulting HTML at all.

What am I doing wrong?

ps., link to my forum (http://www.alwaysaround.net/vb/index.php)

Gadabout
09-14-2006, 05:34 PM
The variables need to be in the <header> tags. Open your headinclude template and add the following code at the very bottom of the template


<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=1819955;
var sc_invisible=1;
var sc_partition=13;
var sc_security="1540f2be";
var sc_remove_link=1;
</script>


This will now execute in the head tag with every page load. Now all you need to do is add the following code where ever you'd like the counter to be displayed. Looking at your page layout, I'd opt for putting it near the seach engine logos in your footer template.


<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><img src="http://c14.statcounter.com/counter.php?sc_project=1819955&java=0&security=1540f2be&invisible=1" alt="free web site hit counter" border="0"> </noscript>

Good luck

mhdhallak
09-15-2006, 01:35 AM
Alright! That worked .. thanks alot Gadabout!

vjw757
02-14-2007, 01:24 PM
can you tell me exzackly where the file is where you inserted the code. what folder is it in?

Peggy
02-14-2007, 01:31 PM
I believe this was the answer -
The variables need to be in the <header> tags. Open your headinclude template and add the following code at the very bottom of the template

vjw757
02-14-2007, 01:49 PM
so the name of the file im looking for is headinclude template? im using the default forum template

Peggy
02-14-2007, 02:28 PM
the headinclude template is a stock, default, vBulletin template. EVERY vB forum has one.

vjw757
02-14-2007, 03:47 PM
i have searched every folder in my public_html folder and have not found this file

Peggy
02-14-2007, 03:49 PM
no no... it's a vBulletin template. Go into your admin CP, Styles and Templates, Style Manager, click on the dropdown menu beside your style and select edit templates, then scroll to the headerinclude template.

waalaa!

vjw757
02-14-2007, 04:04 PM
just kidding ... just kidding. i knew that lol

Peggy
02-14-2007, 04:14 PM
yeah yeah yeah - lol

vjw757
02-14-2007, 10:25 PM
i have another question. im trying to back up my forum database so i can do an upgrade. but when i go to phpmyadmin the database is not there. so where does vb save the database and how can i back it up?

vjw757
02-14-2007, 10:33 PM
ok the thing is when i installed vbulletin i had that account set for 1 allowed mysql database and it was already being used. so then i installed vbulletin .. so umm wheres the database for it. im completely lost.


vBulletin

seo book

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum