MyBB Community Forums

Full Version: Remove default checks for PM "Save a Copy" and "Request Receipt"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As the title suggests, how do you remove the default checkmarks on "Save a Copy" and "Request Read Receipt" for PMs? This is for version 1.2, as we're currently skinning it on a test forum for rollout to our current forum.
Easiest way is to modify the templates.

ACP -> Templates -> Modify / Delete -> *Template Set* -> Private Messaging Templates -> private_send

Find
<input type="checkbox" class="checkbox" name="options[readreceipt]" value="yes" tabindex="11" {$optionschecked['readreceipt']} />

Remove the {$optionschecked['readreceipt']}

Find
<input type="checkbox" class="checkbox" name="options[savecopy]" value="yes" tabindex="10" {$optionschecked['savecopy']} />

Remove the {$optionschecked['savecopy']}
Note that if they are removed, and a user previews a PM, those selections will not be pre-selected when the preview is shown.
Thanks, my designer figured it out earlier (I assume he used the same method). Dennis, you are correct, if you select those options and then click preview, you have to select them again. Not a big deal at all, as I almost want to remove the functionality completely.
Very true Dennis. If you don't want to break it, here is a fix.

In private.php, find/remove:
else
	{
		if($mybb->user['signature'] != "")
		{
			$optionschecked['signature'] = "checked";
		}
		if($mybb->usergroup['cantrackpms'] == "yes")
		{
			$optionschecked['readreceipt'] = "checked";
		}
		$optionschecked['savecopy'] = "checked";
	}

Next, find:
if($options['savecopy'] != "no")
		{
			$optionschecked['savecopy'] = "checked";
		}
		if($options['readreceipt'] != "no")
		{
			$optionschecked['readreceipt'] = "checked";
		}
Replace with:
if($options['savecopy'] == "yes")
		{
			$optionschecked['savecopy'] = "checked";
		}
		if($options['readreceipt'] == "yes")
		{
			$optionschecked['readreceipt'] = "checked";
		}

That should do exactly what you want. Smile
so, which way should i do it?
i'm confused. should i go though the admin? or do the second method?
That's mixed upToungue do the following
open private.php

find
if($options['savecopy'] != "no")
		{
			$optionschecked['savecopy'] = "checked";
		}
		if($options['readreceipt'] != "no")
		{
			$optionschecked['readreceipt'] = "checked";
		}
replace with
	if($options['savecopy'] == "yes")
		{
			$optionschecked['savecopy'] = "checked";
		}
		if($options['readreceipt'] == "yes")
		{
			$optionschecked['readreceipt'] = "checked";
		}
find
if($mybb->usergroup['cantrackpms'] == "yes")
		{
			$optionschecked['readreceipt'] = "checked";
		}
		$optionschecked['savecopy'] = "checked";
replace with
$optionschecked['readreceipt'] = "";
		$optionschecked['savecopy'] = "";


You are done.