Hello
i'm trying to edit this code
unset($recentforumposts);
$recentforumget = 5; // Number of posts to get
$recentforumlength = 30; // Length of title to display before cutting off
$forumexclude = ""; // Add forum id's to exclude from get (eg private ones) sepetate by a comma
$getposts = query("SELECT threadid,title FROM thread WHERE (visible <> 0)".iif($forumexclude," AND (forumid NOT IN ($forumexclude))")." AND (open <> '10') ORDER BY lastpost DESC LIMIT $recentforumget");
while ($post = fetch_array($getposts)) {
$post[short_title] = iif(strlen($post[title]) > $recentforumlength,substr($post[title],0,$recentforumlength)."...",$post[title]);
$post[full_title] = $post[title];
$recentforumposts .= "<a href=\"$forumpath/showthread.php?threadid=$post[threadid]\" title=\"$post[full_title]\">$post[short_title]</a><br />\n";
}
I need to make anther one the same but for Ads and i like to use java script i try this code
unset($ads);
$ads .= " <<<JSBLOCK
<script language='JavaScript' type='text/javascript' src='/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 ("/adserver/adjs.php?n=" + phpAds_random);
document.write ("&clientid=2");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='/adserver/adclick.php?n=adc1d369' target='_blank'><img
src='/adserver/adview.php?clientid=2&n=adc1d369' border='0' alt=''></a></noscript>
JSBLOCK;
}
but i'm getting error could anyone help me to fix this code and make it work like the first one ?
Thanks 🙂