Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Keep Attachment Checked by Default when Soft Deleting Details »»
Keep Attachment Checked by Default when Soft Deleting
Mod Version: 1.00, by Merjawy (Designer) Merjawy is offline
Developer Last Online: May 2013 I like it Show Printable Version Email this Page

vB Version: 4.2.0 Rating: (1 vote - 5.00 average) Installs: 8
Released: 09 Jul 2012 Last Update: Never Downloads: 0
Supported Template Edits Re-usable Code  

This is something I done for my own boards and I thought of sharing it.

When you and/or your Mods soft delete a post/thread with attachment, sometimes a Mod would forget to check mark the Keep Attachments box and if you ever want to undelete the post/thread, the attachments are long gone.

This simple code will make the Keep Attachments box checked by default.

It's for 4.2.0 but it should work for 4.x.x

Templates to modify the code in:

threadadmin_deleteposts
threadadmin_deletethread
threadadmin_deletethreads


Find this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Replaces it with this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



If you enjoy my mod, please consider marking it as "Installed". Any comments are welcome.



Updated: Sep. 4th 2012 (fixed typo)

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	2012-07-21_1052.jpg
Views:	164
Size:	52.9 KB
ID:	139976

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Request Read Reciept checked by default HMBeaty Modification Graveyard 6 29 Jun 2010 14:59
Allow 'Make Votes Public' to be checked by default HMBeaty Modification Graveyard 8 10 Jan 2010 15:10
'Remember Me' Checked by Default in Navbar Phooey vBulletin 3.6 Template Modifications 55 24 Nov 2008 17:21

Comments
  #2  
Old 21 Jul 2012, 14:57
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Update:

Added screenshot
Reply With Quote
  #3  
Old 01 Sep 2012, 15:18
dormopoco dormopoco is offline
 
Join Date: May 2007
TNX a LOT!!! very nice small mod!
Reply With Quote
  #4  
Old 01 Sep 2012, 19:12
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Your're welcome, Enjoy... Please mark installed
__________________
My psychiatrist told me I was crazy and I said I want a second opinion. He said okay, you're ugly too
Reply With Quote
  #5  
Old 03 Sep 2012, 19:28
maupassant maupassant is offline
 
Join Date: Feb 2009
Thanks, but it doesn't seem to work for me. Running 4.2.0 patch level 2 with Merhania skin (or style).
Reply With Quote
  #6  
Old 03 Sep 2012, 20:50
Andy Andy is offline
 
Join Date: Oct 2003
In post #1 there's a typo error in the code example. Here's the correct way to add this template change. Just add "{vb:raw checked.delete}" as shown below:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #7  
Old 04 Sep 2012, 03:23
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Originally Posted by maupassant View Post
Thanks, but it doesn't seem to work for me. Running 4.2.0 patch level 2 with Merhania skin (or style).
I done it based on the default style code, if you're using a customized style, the code might be changed and you just have to find where the changes need to be.

If you post the content of thoese templates I will try to help you.
__________________
My psychiatrist told me I was crazy and I said I want a second opinion. He said okay, you're ugly too
Reply With Quote
  #8  
Old 04 Sep 2012, 03:27
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Thanks Andy. But I don't see the error you mentioned! The code you've posted is exactlly the same as in post #1
__________________
My psychiatrist told me I was crazy and I said I want a second opinion. He said okay, you're ugly too
Reply With Quote
  #9  
Old 04 Sep 2012, 12:36
maupassant maupassant is offline
 
Join Date: Feb 2009
Merjawy, there is a difference between Andy's version and yours. Your code adds another <input at the beginning. Not Andy's.

So, is it because I added it that it doesn't work ? Is it normal to have <input <input ?

<input <input type="checkbox" name="keepattachments" value="1" id="cb_keepattachments" {vb:raw checked.delete} tabindex="1" /> {vb:rawphrase keep_attachments}

Last edited by maupassant : 04 Sep 2012 at 12:43.
Reply With Quote
  #10  
Old 04 Sep 2012, 18:16
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
That would do it.. I musta been sleepy : Thanks both of you... First post updated now
__________________
My psychiatrist told me I was crazy and I said I want a second opinion. He said okay, you're ugly too
Reply With Quote
  #11  
Old 04 Sep 2012, 18:34
maupassant maupassant is offline
 
Join Date: Feb 2009
Bummer. Still not working for me.

How do I post a template here ? Do I just copy and paste in the message box ?

First one (threadadmin_deleteposts) with your modification :

<div id="pagetitle">
<h1>{vb:rawphrase delete_posts}</h1>
</div>

<form action="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}inlinemod.php?t={vb:raw threadid}&amp;p={vb:raw postid}&amp;postids={vb:raw postids}" method="post" name="vbform" class="vbform block">

<h2 class="blockhead">{vb:rawphrase delete_posts}</h2>
<div class="blockbody formcontrols">
<h3 class="blocksubhead">{vb:rawphrase deleting_x_posts_from_y_threads_in_z_forums, {vb:raw postcount}, {vb:raw threadcount}, {vb:raw forumcount}}</h3>
<div class="section">
<div class="blockrow">
<label>{vb:rawphrase delete_posts}:</label>
<ul class="checkradio group dep_group rightcol">
<vb:if condition="$show['deleteposts']">
<li>
<label><input type="radio" class="dep_ctrl" name="deletetype" value="1" id="rb_del_soft" {vb:raw checked.delete} tabindex="1" /> {vb:rawphrase soft_delete_leave_deleted_message}</label>
</li>
<li id="rb_del_soft_deps" class="floatcontainer deps">
<label for="cb_keepattachments">
<input type="checkbox" name="keepattachments" value="1" id="cb_keepattachments" {vb:raw checked.delete} tabindex="1" /> {vb:rawphrase keep_attachments}
</label>
</li>
</vb:if>
<vb:if condition="$show['removeposts']">
<li>
<label for="rb_del_hard" class="floatcontainer">
<input type="radio" name="deletetype" value="2" id="rb_del_hard" {vb:raw checked.remove} tabindex="1" /> {vb:rawphrase physically_remove}
</label>
</li>
</vb:if>
</ul>
<p class="description">
{vb:rawphrase delete_types_explained}
<vb:if condition="$show['firstpost']"><br /><br />{vb:rawphrase deleting_the_first_post}</vb:if>
</p>
</div>

<vb:if condition="$show['deleteposts']">
<div class="blockrow">
<label for="deletereason">{vb:rawphrase reason_for_deletion}:</label>
<input type="text" class="primary textbox" name="deletereason" value="{vb:raw threadinfo.del_reason}" maxlength="125" tabindex="1" />
<p class="description">
{vb:rawphrase delete_reason_explained}
</p>
</div>
</vb:if>
</div>
</div>
<div class="blockfoot actionbuttons">
<div class="group">
<input type="submit" class="button" value="{vb:rawphrase delete_posts}" accesskey="s" tabindex="1" />
<input type="reset" class="button" value="{vb:rawphrase cancel}" accesskey="c" onclick="history.back(1)" tabindex="1" />
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="t" value="{vb:raw threadid}" />
<input type="hidden" name="p" value="{vb:raw postid}" />
<input type="hidden" name="postids" value="{vb:raw postids}" />
<input type="hidden" name="do" value="dodeleteposts" />
<input type="hidden" name="url" value="{vb:raw url}" />
</div>
</div>
</form>
Reply With Quote
  #12  
Old 05 Sep 2012, 06:22
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
When posting code in here, wrap it in php or quote tag by clicking the icon top of the editor.

Quick look shows no issue in your code... I am not using my PC atm, but will check it again later and see what the issue is.

Send me PM when you get online.
__________________
My psychiatrist told me I was crazy and I said I want a second opinion. He said okay, you're ugly too
Reply With Quote
  #13  
Old 14 Sep 2012, 22:02
maupassant maupassant is offline
 
Join Date: Feb 2009
O.K. Just a precision here. The mod works if I use the Moderation Tools at the bottom of a page listing posts or threads. The mod doesn't work if I open a thread and try to use "Edit Post" or "Administrative - Delete Thread".
Reply With Quote
  #14  
Old 15 Sep 2012, 05:49
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Thanks for pointing that out. It's easy fix, I will look into it as soon as I have time and update the mod.
__________________
My psychiatrist told me I was crazy and I said I want a second opinion. He said okay, you're ugly too
Reply With Quote
  #15  
Old 08 Oct 2012, 06:15
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Sorry for the delay, I was real busy...

Here is a fix to use from within the thread (Administative)

Edit threadadmin_deletethread

Look for:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
My psychiatrist told me I was crazy and I said I want a second opinion. He said okay, you're ugly too
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 21:24.

Layout Options | Width: Wide Color: