Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
I have a mod that is trigger happy on the delete button... of course once its gone I can't recover it. I would like to be able to have deleted posts go to a separate forum that can be deleted later if I wish. This may have been suggested previously or exist? If so I would like to add it to the controls of my site.

Sponsored Links
Joined: Mar 2003
Posts: 215
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 215
This is what I came up with for 6.0.1 that worked, and appears to work on a 6.2 test board. I would use this code at your own risk.

"DeletedThreads" is the keyword for the forum that contains deleted threads. moderators need moderator rights to this forum in order for this to work.

This moves them without a confirmation step.

I put this in the editpost_manage.tmpl which would be displayed to only admin/mods.

To move a post and replies:

<FORM METHOD=POST action ="{$config['phpurl']}/admin/domovepost.php">
<INPUT TYPE=HIDDEN NAME=Cat VALUE="$Cat">
<INPUT TYPE=HIDDEN NAME=page VALUE="$page">
<INPUT TYPE=HIDDEN NAME=view VALUE="$view">
<INPUT TYPE=HIDDEN NAME=sb VALUE="$sb">
<input type=hidden name=o value="$o">
<input type=hidden name="Keyword" value="DeletedThreads">
<INPUT TYPE=HIDDEN NAME="oldboard" value="$board">
<input type=hidden name="number" value="$Number">
<input type=submit value="*Delete Post & Replies" class="buttons">
</form>

To move a thread/topic:

<FORM METHOD = POST action ="{$config['phpurl']}/admin/domovethreads.php">
<INPUT TYPE=HIDDEN NAME=Cat VALUE="$Cat">
<INPUT TYPE=HIDDEN NAME=page VALUE="$page">
<INPUT TYPE=HIDDEN NAME=view VALUE="$view">
<INPUT TYPE=HIDDEN NAME=sb VALUE="$sb">
<input type=hidden name=o value="$o">
<input type=HIDDEN name="Keyword" value="DeletedThreads">
<INPUT TYPE=HIDDEN NAME="oldboard" value="$Board">
<input type=hidden name="number" value="$Main">
<input type=submit value="*Delete Thread" class="buttons">
</FORM>

You could then hide the real delete buttons if you wanted.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Works so far... I like the idea of hiding the buttons and replacing them with these. But of course I would also like to keep the delete buttons for clean up reasons later. Hopefully he will use these instead of the real ones modified them with his name so he can see them...lol.

Thanks for the help..

Joined: Mar 2003
Posts: 215
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 215
I just discovered a bug in this that comes from a typo.

In the code for move a post and replies I have:
<INPUT TYPE=HIDDEN NAME="oldboard" value="$board">

This should be:
<INPUT TYPE=HIDDEN NAME="oldboard" value="$Board">

The domovepost.php doesn't check that the value is given. So when it goes to update the post total and last post in the forum it doesn't update anything because the old board value is "" and won't be found.

I came across this problem when adding this to domovepost to track the forum a post is being moved from:

admin_log("MOVEPOST", $oldboard."->".$Keyword." ".$moved);

Some moves (as a result to using the delete/move button) wouldnt' have a oldboard value.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Thanks for spotting that. I was having incorrect post totals and had no idea where it was coming from.

Sponsored Links

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
Posts: 70
Joined: January 2007
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
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 20221218)