Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
==================================================
Finished-[6.3] Change Last Post Time 1.0
by Twisty (www.mameworld.net / www.mameworld.info)
October 8, 2004
==================================================

Mod Name / Version: Change the 'last post' time of a thread when a reply is deleted

Description: This is mainly for those who have dateslip enabled on their forum.

It will cause the last reply date to revert back to the date of the last message posted in the thread after a reply is deleted which has no replies under it.

It's basically an anti-abuse feature, because otherwise someone can reply to a loooong thread on an old page just to make everyone see it on the 1st page (especially nasty with expanded view), and it stays there even after their post is deleted.

This mod sends the old thread back to where it was originally.

Working Under: UBB.Threads 6.3

Mod Status: Finished

Any pre-requisites:

Author(s): Twisty

Date: 10/08/04

Credits:

Files Altered: deletepost.php

New Files:

Database Altered: no

Info/Instructions: (see attachment)



Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Attachments
121109-ChangeLastPostTime1.0[6.3].txt (0 Bytes, 80 downloads)

Sponsored Links
Joined: Jul 2001
Posts: 1,157
Likes: 82
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,157
Likes: 82
SWEET MOD! I've been looking for exactly this for a long time now... THANK YOU AGAIN TWISTY!!!


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
NP :-)

Joined: Nov 2000
Posts: 1,271
Kahuna
Kahuna
Joined: Nov 2000
Posts: 1,271
hmm... anyone know if this works on a 6.5 version?

Joined: Nov 2000
Posts: 1,271
Kahuna
Kahuna
Joined: Nov 2000
Posts: 1,271
doh! nope

i get:
Code
Parse error: parse error, unexpected T_STRING in /home/robkam2/public_html/ubbthreads/deletepost.php on line 137

Sponsored Links
Joined: Nov 2000
Posts: 1,271
Kahuna
Kahuna
Joined: Nov 2000
Posts: 1,271
i've also since added joshpet's "Reassign any replies to the main post" hack, so my deletepost.php is a little different. for example, instead of searching for:
Code
    if (!$rows) {<br />      $query = " <br />        DELETE FROM {$config['tbprefix']}Posts <br />        WHERE B_Number = $Number<br />        AND   B_Board  = '$Board_q'<br />      ";<br />      $dbh -> do_query($query);


i have this:

Code
if ((!$rows) || ($reassign)) {<br />      $query = " <br />        DELETE FROM {$config['tbprefix']}Posts <br />        WHERE B_Number = $Number<br />        AND   B_Board  = '$Board_q'<br />      ";<br />      $dbh -> do_query($query);


and then below that is a detailed trail of how to reassign the replies, incase you're deleting a post that appears in the middle of the thread.

anyway to merge the two?


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,573
Posts293,925
Members13,849
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 20240430)