Forum Moderators: coopster
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/oghq/public_html/plugins/site/themes/21/game.php on line 131
Below is the relevant code.
<tr>
<td width='100%' colspan='2' valign='top'>
<div class='ocontentsection'>
<div class='ocontenthead'>Similar Games</div>
<div class='contenttext'> <?php echo "<table width='97%' class='contenttable'><tr>";echo "<td width='50%' valign='top' align='left'>"; echo "<div style='padding-bottom: 4px;'><b>If you liked
".$game['name'].", you may also enjoy...</b></div>"; $q = "SELECT * FROM games WHERE cat='".$game['cat']."' AND
id!='".$game['id']."' ORDER BY RAND() DESC LIMIT 0, ".$themecfg['similargamesnumber'].""; $games2 =
get_games("shortdesc=".$themecfg['maxdesclength']."&htmlize=true&diffquery=".$q); foreach ($games2 as $game2) {
$link = get_game_link("id="._sp($game2['id']));
echo "<table class='gltable' cellpadding='0' cellspacing='0'><tr><td><a href='".$link."'
class='gamelink'><img src='[imgdir]".$game2['nameid'].".png' alt='".$game2['name']."' width='[twidth]'
height='[theight]' class='gamethumb' align='left' /></a>
<a href='".$link."' class='gamelink'>".$game2['name']."</a><br />
".$game2['desc']."</td></tr></table>";
}
echo '</td>
<td width=50% valign=top align=right>
<script language='JavaScript' type='text/javascript' src='http://www.example.com/adserver/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.example.com/adserver/adjs.php?n=" + phpAds_random);
document.write ("&what=zone:1");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://www.example.com/adserver/adclick.php?n=a4022dc3' target='_blank'><img src='http://www.example.com/adserver/adview.php?what=zone:1&n=a4022dc3' border='0' alt=''></a></noscript></td>
</tr></table>';?>
</div>
</div>
</div>
</td> </tr>
If anyone has any advice on how to address this situation I would greatly appreciate it.
[edited by: coopster at 2:48 pm (utc) on Jan. 30, 2006]
[edit reason] generalized url per TOS [webmasterworld.com] [/edit]
echo '</td>
<td width=50% valign=top align=right>
<script language='JavaScript' type='text/javascript' src='http://www.example.com/adserver/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.example.com/adserver/adjs.php?n=" + phpAds_random);
document.write ("&what=zone:1");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://www.example.com/adserver/adclick.php?n=a4022dc3' target='_blank'><img src='http://www.example.com/adserver/adview.php?what=zone:1&n=a4022dc3' border='0' alt=''></a></noscript></td>
</tr></table>';
Would be better as:
print <<<block
</td>
<td width=50% valign=top align=right>
<script language='JavaScript' type='text/javascript' src='http://www.example.com/adserver/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.example.com/adserver/adjs.php?n=" + phpAds_random);
document.write ("&what=zone:1");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://www.example.com/adserver/adclick.php?n=a4022dc3' target='_blank'><img src='http://www.example.com/adserver/adview.php?what=zone:1&n=a4022dc3' border='0' alt=''></a></noscript></td>
</tr></table>
block;
If that doesn't work there could be other errors.
(This post should have been moved to php not javascript)
<right you are -- it's now moved>
[edited by: tedster at 8:47 am (utc) on Jan. 30, 2006]
[edited by: coopster at 2:50 pm (utc) on Jan. 30, 2006]
[edit reason] generalized url [/edit]