PDA

View Full Version : PM CC'ing


Jolten
09-01-2005, 09:48 PM
I'm looking for a hack (vb3.0.x) that includes the username of all members a pm was sent to. This would allow admins to know when a PM has been sent to all of them. Currently there's no way of telling who, in addition to yourself, received the PM.

Andreas
09-01-2005, 09:56 PM
Hmm ... all recipients should be shown.
At least looking at the Code makes me think so.

Jolten
09-01-2005, 09:59 PM
I'm not seeing them anywhere.

Andreas
09-01-2005, 10:06 PM
Right ... it's only shown in the Outbox.
But it is easy to modify the Code so it shows everywhere.

Jolten
09-01-2005, 11:11 PM
Thanks for pointing me in teh right direction Kirby. I've done it.

In private.php find

// get userbit
if ($folderid == -1)
{
$users = unserialize($pm['touserarray']);
$tousers = array();
if (!empty($users))
{
foreach ($users AS $userid => $username)
{
eval('$tousers[] = "' . fetch_template('pm_messagelistbit_user') . '";');
}
}
$userbit = implode(', ', $tousers);
}
else
{
$userid = &$pm['fromuserid'];
$username = &$pm['fromusername'];
eval('$userbit = "' . fetch_template('pm_messagelistbit_user') . '";');
}


Replace with:

// get userbit
if ($folderid == -1)
{
$users = unserialize($pm['touserarray']);
$tousers = array();
if (!empty($users))
{
foreach ($users AS $userid => $username)
{
eval('$tousers[] = "' . fetch_template('pm_messagelistbit_user') . '";');
}
}
$userbit = implode(', ', $tousers);
}
else
{
$users = unserialize($pm['touserarray']);
$tousers = array();
if (!empty($users))
{
foreach ($users AS $userid => $username)
{
eval('$tousers[] = "' . fetch_template('pm_messagelistbit_user') . '";');
}
}
$userbit = implode(', ', $tousers);
}


and now all recipients show in both the in AND outbox.

Thanks again!

Andreas
09-01-2005, 11:14 PM
Or just

$users = unserialize($pm['touserarray']);
$tousers = array();
if (!empty($users))
{
foreach ($users AS $userid => $username)
{
eval('$tousers[] = "' . fetch_template('pm_messagelistbit_user') . '";');
}
}
$userbit = implode(', ', $tousers);

;)

Boofo
09-01-2005, 11:18 PM
Or just

$users = unserialize($pm['touserarray']);
$tousers = array();
if (!empty($users))
{
foreach ($users AS $userid => $username)
{
eval('$tousers[] = "' . fetch_template('pm_messagelistbit_user') . '";');
}
}
$userbit = implode(', ', $tousers);

;)

Could you just hook this then?

Andreas
09-01-2005, 11:49 PM
Definitly not, as this is for 3.0 :)

Boofo
09-01-2005, 11:57 PM
Oops! Sorry about that. I didn't see what forum this was in. ;)

Jolten
09-02-2005, 12:44 AM
Yeah I guess I don't need the if statement do I :)

Thanks Kirby.