Here's the complete code snippet.
{MAIN_SECTION: header forum page header}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{DIR}" lang="{LANG}" xml:lang="{LANG}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<title>{GVAR: FORUM_TITLE}{VAR: TITLE_EXTRA}</title>
<meta name="description" content="{GVAR: FORUM_DESCR}" />
<base href="{FULL_ROOT}" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="lib.js"></script>
<link rel="stylesheet" href="{THEME_ROOT}/forum.css" type="text/css" media="screen" title="Default FUDforum Theme" />
<link rel="search" type="application/opensearchdescription+xml" title="{GVAR: FORUM_TITLE} Search" href="{FULL_ROOT}open_search.php" />
{VAR: RSS}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
This gets:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/atampjq/public_html/fudforum/theme/default/thread.php on line 586
OK, so I search & replace and put \ in front of all the ' in the Google Analytics code, even though the documentation says nothing about doing this. Like so:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \'UA-19456515-1\']);
_gaq.push([\'_trackPageview\']);
(function() {
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
This gets:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/atampjq/public_html/fudforum/theme/default/thread.php on line 585
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/atampjq/public_html/fudforum/theme/default/thread.php on line 594
[Updated on: Wed, 03 November 2010 02:15]
Report message to a moderator