Massen PN
Verfasst: 05.06.2005 17:30
gibt es einen Mod, mit dem man Massen PNs schreiben kann?
Code: Alles auswählen
#
#-----[ FIND ]------------------------------------------------
#
if ( !($result = $db->sql_query($sql)) )
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
$to_userdata = $db->sql_fetchrow($result);
}
else
{
#
#-----[ REPLACE WITH ]----------------------------------------
#
// Start replacement - Custom mass PM MOD
if( !($result2 = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain users PM information', '', __LINE__, __FILE__, $sql);
}
$to_users = $db->sql_fetchrowset($result2);
$n=0;
while ($to_username_array[$n] && !$error)
{
if (strcasecmp($to_users[$n]['username'], str_replace("\'", "'",$to_username_array[$n])))
{
$error = TRUE;
$error_msg .= $lang['No_such_user']." '".str_replace("\'", "'", $to_username_array[$n]);
}
$n++;
}
}
else
{
// End replacement - Custom mass PM MOD
Code: Alles auswählen
if ( !($result = $db->sql_query($sql)) )
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
if ( $row = $db->sql_fetchrow($result) )
{
$to_username = $row['username'];
}
}
if ( $mode == 'edit' )
{
$sql = "SELECT pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id, u.user_sig
FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u
WHERE pm.privmsgs_id = $privmsg_id
AND pmt.privmsgs_text_id = pm.privmsgs_id
AND pm.privmsgs_from_userid = " . $userdata['user_id'] . "
AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR pm.privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )
AND u.user_id = pm.privmsgs_to_userid";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain private message for editing', '', __LINE__, __FILE__, $sql);
}
if ( !($privmsg = $db->sql_fetchrow($result)) )
{
redirect(append_sid("privmsg.$phpEx?folder=$folder", true));
}
$privmsg_subject = $privmsg['privmsgs_subject'];
$privmsg_message = $privmsg['privmsgs_text'];
$privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
$privmsg_bbcode_enabled = ($privmsg['privmsgs_enable_bbcode'] == 1);
if ( $privmsg_bbcode_enabled )
{
$privmsg_message = preg_replace("/\:(([a-z0-9]:)?)$privmsg_bbcode_uid/si", '', $privmsg_message);
}
$privmsg_message = str_replace('<br />', "\n", $privmsg_message);
$privmsg_message = preg_replace('#</textarea>#si', '</textarea>', $privmsg_message);
$user_sig = ( $board_config['allow_sig'] ) ? (($privmsg['privmsgs_type'] == PRIVMSGS_NEW_MAIL) ? $user_sig : $privmsg['user_sig']) : '';
$to_username = $privmsg['username'];
$to_userid = $privmsg['user_id'];
}
else if ( $mode == 'reply' || $mode == 'quote' )
{
hab den Willkommens PN eingebautMarkus67 hat geschrieben:@doormaster
In einer standard privmsgs.php ist der Eintrag so vorhanden ... hast du schon andere MOD's eingebaut ?
Markus