|
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... // --------------------------------------------------------------- <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... // --------------------------------------------------------------- <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... // -------------------------------------- <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... // -------------------------------------- <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
|
|
|
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.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,574
Posts293,926
Members13,850
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|