Ok, I've sorted out the parse error.
In the bold part of the code below you'll see I missed off the } after the adsense finished.
Only problem now is that it's not removing the adverts for group 9.
Is this because the U_groups code is below the adsense code?
[]
<?
/*
# UBB.threads, Version 6
# Official Release Date for UBB.threads Version6: 06/05/2002
# First version of UBB.threads created July 30, 1996 (by Rick Baker).
# This entire program is copyright Infopop Corporation, 2002.
# For more info on the UBB.threads and other Infopop
# Products/Services, visit:
http://www.infopop.com# Program Author: Rick Baker.
# File Version 6.5b6
# You may not distribute this program in any manner, modified or otherwise,
# without the express, written written consent from Infopop Corporation.
# Note: if you modify ANY code within UBB.threads, we at Infopop Corporation
# cannot offer you support-- thus modify at your own peril

# ---------------------------------------------------------------------------
*/
// Require the library
require ("./includes/main.inc.php");
require ("languages/{$myprefs['language']}/addpost.php");
require ("imagesizes.php");
// Define the default language varialbe, required for PHP3
$Language = $myprefs['language'];
// -------------
// Get the input
$Board = get_input("Board","post");
$Cat = get_input("Cat","post");
$Reged = get_input("Reged","post");
$page = get_input("page","post");
$what = get_input("what","post");
$vc = get_input("vc","post");
$Subject = get_input("Subject","post");
$Body = get_input("Body","post");
$preview = get_input("preview","post");
$textcont = get_input("textcont","post");
$Icon = get_input("Icon","post");
$convert = get_input("convert","post");
$postername = get_input("postername","post");
$Main = get_input("Main","post");
$Parent = get_input("Parent","post");
$ParentUser = get_input("ParentUser","post");
$oldnumber = get_input("oldnumber","post");
$fpart = get_input("fpart","post");
$replyto = get_input("replyto","post");
$IP = get_input("IP","post");
$frompreview = get_input("frompreview","post");
$PStatus = get_input("PStatus","post");
$dofav = get_input("dofav","post");
$questions = get_input("questions","post");
$day = get_input("day","post");
$month = get_input("month","post");
$year = get_input("year","post");
$hour = get_input("hour","post");
$min = get_input("min","post");
$ampm = get_input("ampm","post");
$stopday = get_input("stopday","post");
$stopmonth = get_input("stopmonth","post");
$stopyear = get_input("stopyear","post");
$stophour = get_input("stophour","post");
$stopmin = get_input("stopmin","post");
$stopampm = get_input("stopampm","post");
$enablestart = get_input("enablestart","post");
$enablestop = get_input("enablestop","post");
$noview = get_input("noview","post");
$mustvote = get_input("mustvote","post");
$addpoll = get_input("addpoll","post");
$addevent = get_input("addevent","post");
$calmonth = get_input("calmonth","post");
$calday = get_input("calday","post");
$calyear = get_input("calyear","post");
$Sticky = get_input("Sticky","post");
$announcement = get_input("announcement","post");
$addsig = get_input("addsig","post");
$quickreply = get_input("quickreply","post");
if (!$addpoll) { $questions = 0; }
// -------------------------
// Predefine a few variables
$parentboard = "";
$RealSubject = "";
$attachfile = "";
$fileinput = "";
$Pselected = "";
$canattach = "";
$PollId = "";
$extra = "";
$okay = "";
$previewpoll = "";
$Main = addslashes($Main);
$html = new html;
include("checkimages.php");
// Censor the input?
if ($config['docensor']) {
$Body = $html->do_censor($Body);
$Subject = $html->do_censor($Subject);
}
// ---------------------
// Grab the tablewrapper
list($tbopen,$tbclose) = $html -> table_wrapper();
if (!strstr($user['U_Groups'],"-9-")) {
// Adsense hack start
$adsense = "";
if ( stristr(",{$config['adsense']},", ",$Board,") ) {
include("$thispath/templates/$tempstyle/adsense.tmpl");
}
// Adsense hack finish
}
// Add a space to the end of $Body, for auto-url encoding
$Body .= " ";
$userob = new user;
$user = $userob -> authenticate("U_Username, U_Password,U_Signature,U_Picture,U_Groups,U_Display,U_Language,U_Totalposts,U_Title,U_Color,U_TextCols,U_TextRows,U_EReplies,U_Preview,U_Number,U_Groups");
if ($Reged == "y") {
$Username = $user['U_Username'];
$Username_q = addslashes($Username);
$posterid = $user['U_Number'];
$postername = $Username;
}
else {
if (!$postername) {
$postername = $ubbt_lang['ANON_TEXT'];
}
$Username_q = addslashes($postername);
$posterid = "1";
$user['U_Number'] = 1;
}
// -----------------
// Get the user info
$IP = find_environmental('REMOTE_ADDR');
// See if they are banned
$userob -> check_ban();
// Flood control settings
if (!empty($user['U_FloodControl'])) {
if ($user['U_FloodControl'] == "-1") {
$floodcontrol = $config['floodcontrol'];
}
else {
$floodcontrol = $user['U_FLoodControl'];
}
}
// ----------------------------------------------
// Let's get the groups and default flood control
if (!$user['U_Groups']) {
$user['U_Groups'] = "-4-";
$floodcontrol = $config['floodcontrol'];
$lastposttime = get_input("lastposttime","cookie");
} else {
$floodcontrol = $user['U_FloodControl'];
$lastposttime = $user['U_LastPostTime'];
}
// ---------------------------------
// Check if they can make a post yet
if ($user['U_Status'] != "Administrator" && $user['U_Status'] != "Moderator") {
if (($html->get_date() - $lastposttime) < $floodcontrol) {
$ubbt_lang['FLOODCONTROL'] = sprintf($ubbt_lang['FLOODCONTROL'],$floodcontrol);
$html->not_right($ubbt_lang['FLOODCONTROL']);
}
}
// ------------------
// Check the referer
if (!$config['disablerefer']) {
$html -> check_refer($Cat);
}
//
<----snip
[/]