git-svn-id: file:///svn/phpbb/trunk@4011 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2003-05-18 11:12:04 +00:00
parent 33b0446650
commit 178572a5d0
3 changed files with 52 additions and 4 deletions

View file

@ -40,6 +40,7 @@ include($phpbb_root_path . 'includes/message_parser.'.$phpEx);
// Start session management // Start session management
$user->start(); $user->start();
$auth->acl($user->data); $auth->acl($user->data);
$user->setup();
// Grab only parameters needed here // Grab only parameters needed here
$mode = (!empty($_REQUEST['mode'])) ? strval($_REQUEST['mode']) : ''; $mode = (!empty($_REQUEST['mode'])) ? strval($_REQUEST['mode']) : '';
@ -1148,8 +1149,6 @@ function topic_review($topic_id, $is_inline_review = false)
global $user, $auth, $db, $template, $bbcode; global $user, $auth, $db, $template, $bbcode;
global $censors, $config, $phpbb_root_path, $phpEx, $SID; global $censors, $config, $phpbb_root_path, $phpEx, $SID;
$user->setup();
// Define censored word matches // Define censored word matches
if (empty($censors)) if (empty($censors))
{ {
@ -1235,6 +1234,7 @@ function topic_review($topic_id, $is_inline_review = false)
'POSTER_NAME' => $poster, 'POSTER_NAME' => $poster,
'POST_DATE' => $user->format_date($row['post_time']), 'POST_DATE' => $user->format_date($row['post_time']),
'POST_SUBJECT' => $post_subject, 'POST_SUBJECT' => $post_subject,
'POST_ID' => $row['post_id'],
'MESSAGE' => nl2br($message), 'MESSAGE' => nl2br($message),
'S_ROW_COUNT' => $i++) 'S_ROW_COUNT' => $i++)

View file

@ -84,6 +84,7 @@ function bbstyle(bbnumber) {
donotinsert = false; donotinsert = false;
theSelection = false; theSelection = false;
bblast = 0; bblast = 0;
document.forms[form_name].elements[text_name].focus();
if (bbnumber == -1) { // Close all open tags & default button names if (bbnumber == -1) { // Close all open tags & default button names
while (bbcode[0]) { while (bbcode[0]) {

View file

@ -5,12 +5,58 @@
<th height="28" align="center">{L_TOPIC_REVIEW}</th> <th height="28" align="center">{L_TOPIC_REVIEW}</th>
</tr> </tr>
<tr> <tr>
<td class="row1"><iframe width="100%" height="300" src="{U_REVIEW_TOPIC}"> <td class="row1"><iframe width="100%" height="300" name="review_window" src="{U_REVIEW_TOPIC}">
<!-- ELSE --> <!-- ELSE -->
<!-- INCLUDE simple_header.html --> <!-- INCLUDE simple_header.html -->
<script language="javascript" type="text/javascript" src="templates/subSilver/editor.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
var parent_form_name = 'post';
var parent_text_name = 'message';
function insert_quote(text) {
if (window.parent.document.forms[parent_form_name].elements[parent_text_name].createTextRange && window.parent.document.forms[parent_form_name].elements[parent_text_name].caretPos)
{
var caretPos = window.parent.document.forms[parent_form_name].elements[parent_text_name].caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
window.parent.document.forms[parent_form_name].elements[parent_text_name].focus();
} else {
window.parent.document.forms[parent_form_name].elements[parent_text_name].value += text;
window.parent.document.forms[parent_form_name].elements[parent_text_name].focus();
}
}
function addquote(post_id, username) {
var text_name = 'message_' + post_id;
if ((clientVer >= 4) && is_ie && is_win)
{
theSelection = document.selection.createRange().text; // Get text selection - does not consider the div only!
}
if (!theSelection)
{
eval("theSelection = document.all." + text_name + ".innerText;");
}
if (theSelection)
{
insert_quote('[quote="' + username + '"]' + theSelection + '[/quote]');
}
return;
}
//-->
</script>
<table class="tablebg" width="100%" cellpadding="2" cellspacing="1" border="0"> <table class="tablebg" width="100%" cellpadding="2" cellspacing="1" border="0">
<tr> <tr>
<th width="22%" height="26">{L_AUTHOR}</th> <th width="22%" height="26">{L_AUTHOR}</th>
@ -26,12 +72,13 @@
<td height="28" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <td height="28" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td width="100%">{postrow.MINI_POST_IMG}<span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen">&nbsp;</span>&nbsp;&nbsp;&nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> <td width="100%">{postrow.MINI_POST_IMG}<span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen">&nbsp;</span>&nbsp;&nbsp;&nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
<td valign="top" align="right" nowrap="nowrap"><input type="button" class="button" name="addquote" value="{L_QUOTE}" style="width: 50px" onClick="addquote({postrow.POST_ID}, '{postrow.POSTER_NAME}');" /></td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><hr /></td> <td colspan="2"><hr /></td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><span class="postbody">{postrow.MESSAGE}</span></td> <td colspan="2"><span class="postbody"><div id="message_{postrow.POST_ID}">{postrow.MESSAGE}</div></span></td>
</tr> </tr>
</table></td> </table></td>
</tr> </tr>