Previous Thread
Next Thread
Print Thread
Rate Thread
Revlis #246996 05/18/2003 9:55 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I did exactly that a few days ago, made all forums in one given category not show up on the main index, unless that category was specifically specified in the Cat variable.

This works only for UBB.threads 6.1.x, since there has been some changes in 6.2.x, but I don't think it would be too hard to update it.
Find the following in ubbthreads.php:
Code
<br />// ------------------------------------<br />// Are we just looking at one category?<br />   $catsonly = $user['U_FrontPage'];<br />   $main     = "ubbthreads";<br />   if ($config['catsonly']) {<br />      $main = "categories";<br />   }<br />   if (!$catsonly) {<br />      $catsonly = $main;<br />   }<br />   if ( ($C) && ($catsonly == "categories") ) {<br />      $catonly = "WHERE Cat_Number = '$C'";<br />   }<br />


ADD the following below:
Code
<br />// -------------------------------------------------------<br />// Hack: Don't show category unless specifically asked for<br />   $catarr = split(",", $Cat);<br />   if ( !in_array(5, $catarr) ) {<br />       if ( !$catonly ) {<br />           $catonly = "WHERE";<br />       } else {<br />           $catonly .= " AND";<br />       }<br />       $catonly .= " Cat_Number <> 5";<br />   }<br />


Just change the "5" to the category number you don't want displayed on the main index.

Sponsored Links
Entire Thread
Subject Posted By Posted
Hiding a category biketrip 05/19/2003 4:04 AM
Re: Hiding a category JoshPet 05/19/2003 4:34 AM
Re: Hiding a category biketrip 05/19/2003 4:42 AM
Re: Hiding a category ericgtr 05/19/2003 4:49 AM
Re: Hiding a category JoshPet 05/19/2003 4:50 AM
Re: Hiding a category Gardener 05/19/2003 5:55 AM
Re: Hiding a category JoshPet 05/19/2003 6:12 AM
Re: Hiding a category Ian_W 05/19/2003 10:10 AM
Re: Hiding a category biketrip 05/19/2003 3:28 PM
Re: Hiding a category Ian_W 05/19/2003 8:23 PM
Re: Hiding a category biketrip 05/19/2003 10:10 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
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 253
Joined: January 2000
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2265
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 27
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)
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)