Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
Joined: Jun 2001
Posts: 356
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
[/]

Sponsored Links
Entire Thread
Subject Posted By Posted
display/not-display adverts according to groups? monkeyra 03/30/2005 11:18 AM
Re: display/not-display adverts according to groups? JoshPet 04/04/2005 8:36 AM
Re: display/not-display adverts according to groups? monkeyra 04/04/2005 10:16 AM
Re: display/not-display adverts according to groups? monkeyra 04/04/2005 11:19 PM
Re: display/not-display adverts according to groups? monkeyra 04/15/2005 8:04 PM
Re: display/not-display adverts according to groups? monkeyra 04/18/2005 2:20 PM
Re: display/not-display adverts according to groups? monkeyra 04/18/2005 7:41 PM
Re: display/not-display adverts according to groups? monkeyra 04/18/2005 8:27 PM
Re: display/not-display adverts according to groups? scroungr 04/19/2005 5:23 AM
Re: display/not-display adverts according to groups? monkeyra 04/19/2005 9:15 AM
Re: display/not-display adverts according to groups? Dalantech 04/21/2005 7:40 AM
Re: display/not-display adverts according to groups? minto 04/22/2005 1:04 AM
Re: display/not-display adverts according to groups? monkeyra 05/14/2005 2:21 PM
Re: display/not-display adverts according to groups? scroungr 05/14/2005 4:38 PM
Re: display/not-display adverts according to groups? monkeyra 05/15/2005 11:06 AM
Re: display/not-display adverts according to groups? scroungr 05/16/2005 10:03 PM
Re: display/not-display adverts according to groups? monkeyra 05/16/2005 11:18 PM
Re: display/not-display adverts according to groups? scroungr 05/16/2005 11:48 PM
Re: display/not-display adverts according to groups? monkeyra 05/17/2005 8:00 AM
Re: display/not-display adverts according to groups? scroungr 05/17/2005 2:45 PM
Re: display/not-display adverts according to groups? monkeyra 05/17/2005 11:37 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)