Previous Thread
Next Thread
Print Thread
Rating: 8
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
In your ubbttopthreads.php addon find this:

code:

// -----------------------------
// End of the variables section
require("$path/main.inc.php");



and change it to this:

code:

// -----------------------------
// End of the variables section
require_once("/ubbthreads/main.inc.php");

$userob = new user;
$user = $userob -> authenticate("U_Groups");
if ($user['U_Username']) {
$Grouparray = split("-",$user['U_Groups']);
$gsize = sizeof($Grouparray);
$groupquery = "(";
$g = 0;
for ($i=0; $i<$gsize;$i++) {
if (!preg_match("/[0-9]/",$Grouparray[$i])) { continue; };
$g++;
if ($g > 1) {
$groupquery .= " OR ";
}
$groupquery .= "Bo_Read_Perm LIKE '%-$Grouparray[$i]-%'";
}
$groupquery .= ")";
}
else {
$groupquery = "Bo_Read_Perm LIKE '%-4-%'";
}
$query = "
SELECT Bo_Keyword
FROM w3t_Boards
WHERE $groupquery
";
$sth = $dbh -> do_query($query);
$boardquery = "AND (";
$g = 0;
while (list ($BKeyword) = $dbh -> fetch_array($sth)) {
$g++;
if ($g > 1) {
$boardquery .= " OR ";
}
$boardquery .= "B_Board = '$BKeyword'";
}
$dbh -> finish_sth($sth);
$boardquery .= ")";
if (!$g) {
$boardquery = "";
}




Then find this:

code:

$query = "
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board
FROM w3t_Posts
WHERE B_Number = B_Main
AND B_Last_Post > '$date'
ORDER BY $sort DESC
LIMIT $totalthreads
";



and change it to this:

code:

$query = "
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board
FROM w3t_Posts
WHERE B_Number = B_Main
AND B_Last_Post > '$date'
$boardquery
ORDER BY $sort DESC
LIMIT $totalthreads
";




Ok, I just tested this on my local webserver and it worked fine. Hope it does for everyone else

Sponsored Links
Entire Thread
Subject Posted By Posted
Questions for the Addons Grummel_dup1 09/26/2002 5:04 PM
Re: Questions for the Addons JustDave 09/26/2002 5:14 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 5:21 PM
Re: Questions for the Addons JustDave 09/26/2002 5:29 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 5:40 PM
Re: Questions for the Addons JustDave 09/26/2002 5:43 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 7:22 PM
Re: Questions for the Addons JustDave 09/26/2002 7:25 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 7:34 PM
Re: Questions for the Addons JustDave 09/26/2002 7:51 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 9:19 PM
Re: Questions for the Addons JustDave 09/26/2002 9:29 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 9:39 PM
Re: Questions for the Addons JustDave 09/26/2002 9:50 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 9:59 PM
Re: Questions for the Addons JustDave 09/26/2002 10:11 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 10:41 PM
Re: Questions for the Addons JustDave 09/26/2002 10:59 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 11:04 PM
Re: Questions for the Addons JustDave 09/26/2002 11:07 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 11:10 PM
Re: Questions for the Addons JustDave 09/26/2002 11:20 PM
Re: Questions for the Addons Dave_L_dup1 09/26/2002 11:20 PM
Re: Questions for the Addons JustDave 09/26/2002 11:21 PM
Re: Questions for the Addons Grummel_dup1 09/26/2002 11:24 PM
Re: Questions for the Addons JustDave 09/26/2002 11:36 PM
Re: Questions for the Addons Grummel_dup1 09/27/2002 2:48 PM
Re: Questions for the Addons Grummel_dup1 09/27/2002 4:52 PM
Re: Questions for the Addons JustDave 09/27/2002 5:04 PM
Re: Questions for the Addons Grummel_dup1 09/27/2002 5:22 PM
Re: Questions for the Addons JustDave 09/27/2002 5:41 PM
Re: Questions for the Addons Grummel_dup1 09/27/2002 5:51 PM
Re: Questions for the Addons JustDave 09/27/2002 6:20 PM
Re: Questions for the Addons Grummel_dup1 09/27/2002 7:49 PM
Re: Questions for the Addons JustDave 09/27/2002 7:55 PM
Re: Questions for the Addons Grummel_dup1 09/27/2002 8:12 PM
Re: Questions for the Addons JustDave 09/27/2002 8:16 PM
Re: Questions for the Addons Grummel_dup1 09/27/2002 8:23 PM
Re: Questions for the Addons JustDave 09/27/2002 8:30 PM
Re: Questions for the Addons Grummel_dup1 09/27/2002 8:42 PM
Re: Questions for the Addons JustDave 09/27/2002 8:49 PM
Re: Questions for the Addons Grummel_dup1 09/27/2002 9:21 PM
Re: Questions for the Addons JustDave 09/27/2002 10:07 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:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 4025
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 29
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
isaac 2
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261026)