posting_body.tpl
++FINDE++
Code: Alles auswählen
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>
<!-- BEGIN switch_not_privmsg -->
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
<!-- END switch_not_privmsg -->
</tr>
</table>
++DARUNTER EINFÜGEN++
Code: Alles auswählen
<!-- BEGIN switch_privmsg_review -->
<table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
<tr>
<th colspan="3" class="thHead" nowrap="nowrap">{L_MESSAGE}</th>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_FROM}:</span></td>
<td width="100%" class="row2" colspan="2"><span class="genmed">{PRIV_FROM}</span></td>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_POSTED}:</span></td>
<td width="100%" class="row2" colspan="2"><span class="genmed">{PRIV_DATE}</span></td>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_SUBJECT}:</span></td>
<td width="100%" class="row2"><span class="genmed">{PRIV_SUBJECT}</span></td>
</tr>
<tr>
<td valign="top" colspan="2" class="row1"><span class="postbody">{PRIV_MESSAGE}</span></td>
</tr>
</table>
<!-- END switch_privmsg_review -->
privmsg.php
++FINDE++
Code: Alles auswählen
$template->assign_block_vars('switch_privmsg', array());
++DARUNTER EINFÜGEN++
Code: Alles auswählen
if ( $mode == 'reply' || $privmsg_id != '' )
{
$sql = "SELECT u.*, pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text
FROM ". USERS_TABLE ." u, ". PRIVMSGS_TABLE ." pm, ". PRIVMSGS_TEXT_TABLE ." pmt
WHERE pm.privmsgs_id = $privmsg_id
AND pmt.privmsgs_text_id = pm.privmsgs_id
$pm_sql_user
AND u.user_id = pm.privmsgs_from_userid";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query private message post information', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$priv_from = $row['username'];
$priv_date = create_date($board_config['default_dateformat'], $row['privmsgs_date'], $board_config['board_timezone']);
$priv_subject = $row['privmsgs_subject'];
$priv_message = $row['privmsgs_text'];
$priv_bbcode_uid = $row['privmsgs_bbcode_uid'];
if ( !$board_config['allow_html'] )
{
if ( $row['privmsgs_enable_html'] )
{
$priv_message = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $priv_message);
}
}
if ( $priv_bbcode_uid != '' )
{
$priv_message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($priv_message, $priv_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $priv_message);
}
$priv_message = make_clickable($priv_message);
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
if ( count($orig_word) )
{
$priv_subject = preg_replace($orig_word, $replacement_word, $priv_subject);
$priv_message = preg_replace($orig_word, $replacement_word, $priv_message);
}
if ( $board_config['allow_smilies'] && $row['privmsgs_enable_smilies'] )
{
$priv_message = smilies_pass($priv_message);
}
$priv_message = str_replace("\n", '<br />', $priv_message);
}
$template->assign_block_vars('switch_privmsg_review', array());
$template->assign_vars(array(
'L_MESSAGE' => 'Review',
'L_FROM' => $lang['From'],
'L_POSTED' => $lang['Posted'],
'PRIV_FROM' => $priv_from,
'PRIV_DATE' => $priv_date,
'PRIV_SUBJECT' => $priv_subject,
'PRIV_MESSAGE' => $priv_message,
));
}
Das jetzt nur mal auf die schnelle, wenn es so funktioniert wie´s soll, dann optimiere ich es nochmal. (Bei Vorschau der Nachricht dürfte es im Moment noch nicht funktionieren.)