PDA

View Full Version : Disable Send PM button when user is not accepting PM's


Protoman
07-18-2005, 10:00 PM
Simple mod I thought I'd share. :bunny:
This removes the line that says 'Send user a PM' when viewing a profile if the user has chosen to not receive PM's

In private.php

Find
// form for creating a new private message
if ($_REQUEST['do'] == 'newpm')
{
require_once('./includes/functions_newpost.php');
Below Add
if (!$bbuserinfo['receivepm'])
{
exit;
}

Upload the new private.php and you're finished! ^_^

Colin F
07-20-2005, 10:14 AM
corollasbest,

What you posted doesn't seem to work correctly.
First off, $bbuserinfo['receivepm'] will check if the viewing user, and not the user being viewed has receivepm set to on/off.
Second, you're checking in the private.php, so how should that be able to remove a link on a different page?
Thirdly, just posting exit; will display a blank page. You should try to post an error message or so. A blank page will leave a lot of your users clueless...

Protoman
07-20-2005, 02:18 PM
works for me. you can move it to betas if you want.

paul41598
07-20-2005, 03:02 PM
works great for me on 3.0.7 too! Thanks, nice and simple little mod that proves useful ;)