Previous Thread
Next Thread
Print Thread
Rate Thread
jay-zi #281884 11/10/2004 8:52 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
[]Rose said:
I've just recently bought UBBthreads, and I'm still setting it up. I've used a threaded forum previously (WebBBS) and I'm trying to get UBBthreads to display as closely as possible to my previous forum. I've noticed two things on the PostList page, and if somebody knows (1) what I'm doing wrong, or; (2) of a mod to fix it, I'd greatly appreciate it. (By the way, I'm using Expanded View).

1. When posting to a main topic, replies to it are in reverse chronological order. So the last person to reply shows immediately underneath the main topic, while the first person to reply shows last. I'd like it to be the reverse of that. [/]

Ok, it requires 2 small changes...one in postlist.php and the other in showthreaded.php. I'll show how it's done in v6.3 (6.5 should be somewhat similar but probably won't be the exact same query, although you should still be able to find the relevant section though by matching the comments).

[1-A] In postlist.php find this...

Code
   // --------------------------------------------------------------- <br />   // If we are not doing flat posts and the view is expanded then we <br />   // will list all the replies out in a threaded format <br />      $tree = array(); <br />      if ($view == "expanded") { <br />         $query = " <br />           SELECT t1.B_Number,t1.B_Parent,t1.B_Posted,t2.U_Username,t1.B_Subject,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t2.U_Color,t2.U_Status,t2.U_Number,t1.B_AnonName,t1.B_File <br />           FROM  {$config['tbprefix']}Posts AS t1, <br />			  		  {$config['tbprefix']}Users AS t2 <br />           WHERE t1.B_Main = $Number <br />           AND   t1.B_Number <> $Number <br />			  AND   t1.B_PosterId = t2.U_Number <br />           $Viewable <br />           ORDER BY t1.B_Number DESC <br />         "; <br />         $stj = $dbh -> do_query($query); <br />         $results = 0;  


Now toward the end just change the DESC to ASC as follows...

Code
    // --------------------------------------------------------------- <br />   // If we are not doing flat posts and the view is expanded then we <br />   // will list all the replies out in a threaded format <br />      $tree = array(); <br />      if ($view == "expanded") { <br />         $query = " <br />           SELECT t1.B_Number,t1.B_Parent,t1.B_Posted,t2.U_Username,t1.B_Subject,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t2.U_Color,t2.U_Status,t2.U_Number,t1.B_AnonName,t1.B_File <br />           FROM  {$config['tbprefix']}Posts AS t1, <br />			  		  {$config['tbprefix']}Users AS t2 <br />           WHERE t1.B_Main = $Number <br />           AND   t1.B_Number <> $Number <br />			  AND   t1.B_PosterId = t2.U_Number <br />           $Viewable <br />           ORDER BY t1.B_Number ASC <br />         "; <br />         $stj = $dbh -> do_query($query); <br />         $results = 0; 



[1-B] In showthreaded.php find this...

Code
    // -------------------------------------- <br />   // Grab all of the replies in this thread <br />      $query = " <br />        SELECT t1.B_Number,t1.B_Parent,t1.B_Posted,t2.U_Username,t1.B_Subject,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t2.U_Color,t2.U_Status,t2.U_Number,t1.B_AnonName,t1.B_File <br />        FROM  {$config['tbprefix']}Posts AS t1, <br />		  		  {$config['tbprefix']}Users AS t2 <br />        WHERE t1.B_Main=$current <br />		  AND   t1.B_Posterid = t2.U_Number <br />        $Viewable <br />        ORDER BY t1.B_Number DESC <br />      "; <br />      $sth = $dbh -> do_query($query); 


And again, change the DESC to ASC...

Code
   // -------------------------------------- <br />   // Grab all of the replies in this thread <br />      $query = " <br />        SELECT t1.B_Number,t1.B_Parent,t1.B_Posted,t2.U_Username,t1.B_Subject,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t2.U_Color,t2.U_Status,t2.U_Number,t1.B_AnonName,t1.B_File <br />        FROM  {$config['tbprefix']}Posts AS t1, <br />		  		  {$config['tbprefix']}Users AS t2 <br />        WHERE t1.B_Main=$current <br />		  AND   t1.B_Posterid = t2.U_Number <br />        $Viewable <br />        ORDER BY t1.B_Number ASC <br />      "; <br />      $sth = $dbh -> do_query($query);  




[]2. It seems that all replies are indented, and that the thread does not determine which message is being replied to. Here's an example of what is happening:

Main Topic
---Reply 3 to Main Topic
------Reply 2 to Main Topic
---------Reply 1 to Main Topic

Below is how I want it to work:

Main Topic
---Reply 1 to Main Topic
------Reply 1 to Reply 1
---Reply 2 to Main Topic
---Reply 3 to Main Topic

and so on ...

Again, if anyone can help it would be greatly appreciated.

Thanks, [/]

It *should* now appear as mentioned in the 2nd example you gave. At least it does for my version.

If 6.5 is not that way after the change then I have no idea what's up

Sponsored Links
Entire Thread
Subject Posted By Posted
Threaded format Rose 11/10/2004 2:32 PM
Re: Threaded format Twisty 11/10/2004 3:52 PM
Re: Threaded format Rose 11/10/2004 6:51 PM
Re: Threaded format Rose 11/11/2004 1:39 AM
Re: Threaded format Twisty 11/11/2004 2:09 AM
Re: Threaded format Rose 11/11/2004 2:35 AM
Re: Threaded format Rose 11/11/2004 2:59 AM
Re: Threaded format Twisty 11/11/2004 3:02 AM
Re: Threaded format Twisty 11/11/2004 3:59 AM
Got it!! Rose 11/11/2004 6:49 AM

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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,574
Posts293,926
Members13,850
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
Morgan 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)