Previous Thread
Next Thread
Print Thread
Rate Thread
domain123 #277548 08/05/2004 2:49 PM
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Well, here's what I did, but I don't want to doc it fully as I don't want to support it - if you catch my drift. Just making them list is easy (and I'll describe), making them show new posts and post counts is a bit more involved...

1) First, you just create the forum - making sure it appears below the forum you plan to make it a sub of.

2) In ubbthreads.php, you place this line just above where the $forum variable gets assigned.

if ( $Keyword == "yoursubforumkeyword" ) continue;

This will prevent the subforum from being displayed on the Main Index.

3) In the description field for the Parent, you insert a link to the sub-forum:

Description text<br /><b>Sub-Forums:</b> <a href="/postlist.php...">Sub-Forum Name</a>

So, you actually create a hard link in the description to the sub forum.

That's it! You have a sub-forum now.

That's how I did the Main Index. I also added some code to explicitly add a "Sub-Forum:" and "Parent:" link when viewing those two forums to the postlist.php script. (blank is in other forums).

Also, on the ubbthreads.php script I modified the $forum[$x][$y]['Description'] variable for the parent to append a NEW tag if there are new messages (which we already know because its been checked for).

if ( $Keyword == "subforumname" ) {
$olddesc = $forum[$otx][$oty]['Description'];
$newdesc = str_replace( "</a>", "</a> <img border="0" height="12" width="16" src="/images/newposts.gif">", $olddesc);
$forum[$otx][$oty]['Description'] = $newdesc;
}

And, finally, the trickiest part, I added code to check for new messages in the postlist.php script *if* I was viewing the parent.

Thanks about it. Like I said, this was specific to my forum and your milage may vary.

Sponsored Links
Entire Thread
Subject Posted By Posted
Subforums PhotoPost 08/03/2004 6:05 PM
Re: Subforums shortbus 08/03/2004 7:00 PM
Re: Subforums scroungr 08/03/2004 10:18 PM
Re: Subforums shortbus 08/03/2004 11:04 PM
Re: Subforums PhotoPost 08/04/2004 9:14 PM
Re: Subforums scroungr 08/04/2004 9:50 PM
Re: Subforums Anno 08/05/2004 7:37 PM
Re: Subforums PhotoPost 08/05/2004 9:49 PM
Re: Subforums Anno 08/08/2004 1:53 PM
Re: Subforums Anno 11/02/2004 1:21 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
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,824
Most Online6,139
Sep 21st, 2024
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,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
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-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)