MyBB Community Forums

Full Version: I am trying to get a scrpit to work but I am loosing the battle !!!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying a counter script that i can not get to work right I keep getting

Web page error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.4; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)
Timestamp: Tue, 15 Jun 2010 18:07:48 UTC


Message: 'swfobject' is undefined
Line: 227
Char: 1
Code: 0
URI: http://localhost/TestScript/MyBB/

Could this be cause i am trying on localhost
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--********************-->
<head>
<!--********************-->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!--********************-->
<title>hit_counter_unique</title>
<!--********************-->
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">

	var flashvars = {
		config_file: "hit_counter_9_0_config.xml"
	};

	var params = {
		bgcolor: "E6E6E6",
		menu: "false",
		quality: "high",
		scale: "scale"
	};

	var attributes = {
		id: "swf_content",
		name: "swf_content"
	};

	swfobject.embedSWF("hit_counter_9_0.swf", "flashcontent", "270", "54", "8.0.0", false, flashvars, params, attributes);

</script>
<!--********************-->
<link rel="stylesheet" type="text/css" href="_styles/main.css" />
<!--********************-->
</head>
<!--********************-->
<body>
<!--********************-->
<div id="outer">
	<div id="container">
		<!--**********-->
		<div id="flashcontent">
			<div id="altcontent">
				<h3 class="border">Wrong version or	no version of Flash detected</h3>
				<p>You might also have <strong>JavaScript</strong> disabled. If so, please
					enable scripting in your browser's preferences or Internet options or download
					the latest <a href="http://www.microsoft.com/windows/internet-explorer/download-ie.aspx">Internet Explorer</a> or <a href="http://www.mozilla.com/firefox/">Firefox</a> browser.</p>
				<p>If you'd like to download the latest <strong>Flash</strong> plug-in, <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">click
					here</a>.</p>
			</div>
		</div>
		<!--**********-->
		<div class="text_copyright_wrap">
		<div class="text_copyright">&copy; biteMedia</div>

	             </div>
		<!--**********-->
	</div>
</div>
<!--********************-->
</body>
</html>
I put this in the headerinclude
<link rel="stylesheet" type="text/css" href="/counter/_styles/main.css" /> 
<script type="text/javascript" src="/counter/swfobject.js"></script>
<script type="text/javascript">

	var flashvars = {
		config_file: "counter/hit_counter_7_0_config.xml"
	};

	var params = {
		bgcolor: "E6E6E6",
		menu: "false",
		quality: "high",
		scale: "scale"
	};

	var attributes = {
		id: "swf_content",
		name: "swf_content"
	};

	swfobject.embedSWF("counter/hit_counter_7_0.swf", "flashcontent", "270", "54", "8.0.0", false, flashvars, params, attributes);

</script>
And this in the index template
<div id="outer">
	<div id="container">
		<!--**********-->
		<div id="flashcontent">
			<div id="altcontent">
				<h3 class="border">Wrong version or	no version of Flash detected</h3>
				<p>You might also have <strong>JavaScript</strong> disabled. If so, please
					enable scripting in your browser's preferences or internet options or download
					the latest <a href="http://www.microsoft.com/windows/internet-explorer/download-ie.aspx">Internet Explorer</a> or <a href="http://www.mozilla.com/firefox/">Firefox</a> browser.</p>
				<p>If you'd like to download the latest <strong>Flash</strong> plug-in, <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">click
					here</a>.</p>
			</div>
		</div>
		<!--**********-->
		<div class="text_copyright_wrap">
			<div class="text_copyright">&copy; biteMedia</div>
		</div>
		<!--**********-->
	</div>
</div>
<!--********************-->

I tried lots of different stuff and nothing working going to try on a live site
just posted to see if there are mistakes i am doing and missing. Maybe some could help me save time its all ways something small that i miss
O.K
Got it to work sort of now the style sheet that came with the counter is making the forum look differnt

can i just add it to mybb's css and make it work right

this is the live site www(.)howmanstest.co.cc