Topic Options
#238593 - 03/02/03 06:51 AM Deleted topics automatically go into forum instead
Joined: Jan 2002
Posts: 676
smilesforu Offline
Junior Member
smilesforu Offline
Junior Member

Joined: Jan 2002
Posts: 676
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.
Top
Sponsored Links
      
#238594 - 03/02/03 10:11 AM Re: Deleted topics automatically go into forum instead [Re: Kelly]
Joined: Mar 2003
Posts: 231
RandyJG Offline
Junior Member
RandyJG Offline
Junior Member

Joined: Mar 2003
Posts: 231
Canada
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.
Top
#238595 - 03/02/03 11:45 AM Re: Deleted topics automatically go into forum instead [Re: romka]
Joined: Jan 2002
Posts: 676
smilesforu Offline
Junior Member
smilesforu Offline
Junior Member

Joined: Jan 2002
Posts: 676
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..
Top
#238596 - 04/09/03 12:56 PM Re: Deleted topics automatically go into forum instead (FIX) [Re: Kelly]
Joined: Mar 2003
Posts: 231
RandyJG Offline
Junior Member
RandyJG Offline
Junior Member

Joined: Mar 2003
Posts: 231
Canada
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.
Top
#238597 - 04/09/03 09:52 PM Re: Deleted topics automatically go into forum instead (FIX) [Re: romka]
Joined: Jan 2002
Posts: 676
smilesforu Offline
Junior Member
smilesforu Offline
Junior Member

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

Shout Box
Latest Posts
Housekeeping
by Mark_S
05/15/15 01:28 PM
UBB.threads v7.6.0+ System Requirement Test
by Gizmo
05/02/15 11:38 AM
Visit Us on Facebook
(Views)Popular Topics
Known public proxy servers 2,362,570
Integrated Index Page (IIP) 5.3.1 916,266
Q & A 875,776
Finished-[6.5.2] Games Arcade Deluxe v1.9 720,578
[6.0x] Who's Online 4.0.0 [Finished] 701,223
Integrated Index Page (IIP) 5.1.1 568,901
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 472,142
[6.0x] UBB Calendar v1.9 364,289
1and1.com 337,157
[6.0x] Avatar Hack v0.0007e *FINAL* [Finished] 330,725
Member Spotlight
Joined: Jan 2000
Posts: 5575
Forum Stats
13,722 Registered Members
63 Forums
37,288 Topics
291,781 Posts

Most users ever online: 1,097 @ 08/08/14 03:45 PM
Top Posters
AllenAyres 25587
JoshPet 11330
Rick 8373
LK 7396
Lord Dexter 6503
Gizmo 5575
Greg Hard 5533
Top Posters (30 Days)
Mark_S 9
Gizmo 8
id242 5
Bill B 2
Ruben Rocha 1
The UBB.Developers Network™ (UBB.Dev™/Threads.Dev™) is ©2000-2015 VNC Web Services

▼ Our Sponsors ▼ ▲ Our Sponsors ▲