aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-06-11 12:00:31 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-06-11 12:00:31 +0000
commit44ea5b9e506447e5aa3709364499624de94b1b33 (patch)
treef76283f5ba73afba20d557b5da1492a78e7691f8
parent5ece706945f0b80ff7e1cd95c5d0dc90d6cc530e (diff)
downloadforums-44ea5b9e506447e5aa3709364499624de94b1b33.tar
forums-44ea5b9e506447e5aa3709364499624de94b1b33.tar.gz
forums-44ea5b9e506447e5aa3709364499624de94b1b33.tar.bz2
forums-44ea5b9e506447e5aa3709364499624de94b1b33.tar.xz
forums-44ea5b9e506447e5aa3709364499624de94b1b33.zip
Minor mods or fixes and PSO preview template
git-svn-id: file:///svn/phpbb/trunk@465 89ea8834-ac86-4346-8a33-228a782c2dd0
-rwxr-xr-xphpBB/language/lang_english.php2
-rw-r--r--phpBB/posting.php27
-rw-r--r--phpBB/templates/PSO/posting_preview.tpl37
3 files changed, 54 insertions, 12 deletions
diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php
index 6e99840a74..8ce39b8fbc 100755
--- a/phpBB/language/lang_english.php
+++ b/phpBB/language/lang_english.php
@@ -149,7 +149,7 @@ $lang['Post_new_in'] = "Post New Topic in:"; // Followed by forum name
$lang['Post_Annoucement'] = "Post as an annoucement";
$lang['Post_Sticky'] = "Stick this topic";
$lang['Annouce_and_sticky'] = "You cannot post a topic that is both an annoucement and a sticky topic";
-
+$lang['Preview'] = "Preview";
//
// Private Messaging
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 71ab1992b2..9fb33b73cc 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -861,9 +861,9 @@ if($error)
// End: error handling
//
-if(!isset($username))
+if(empty($username))
{
- $username = $userdata["username"];
+ $username = $userdata['username'];
}
//
@@ -879,12 +879,16 @@ if($preview)
$template->set_filenames(array("preview" => "posting_preview.tpl"));
$template->assign_vars(array(
- "TOPIC_TITLE" => $subject,
- "ROW_COLOR" => $theme['td_color1'],
+ "TOPIC_TITLE" => $subject,
+ "POST_SUBJECT" => $subject,
+ "ROW_COLOR" => "#" . $theme['td_color1'],
"POSTER_NAME" => $username,
- "L_POSTED" => $lang['Posted'],
"POST_DATE" => create_date($board_config['default_dateformat'], time(), $board_config['default_timezone']),
- "MESSAGE" => stripslashes(nl2br($preview_message))));
+ "MESSAGE" => stripslashes(nl2br($preview_message)),
+
+ "L_PREVIEW" => $lang['Preview'],
+ "L_POSTED" => $lang['Posted'])
+ );
$template->pparse("preview");
}
//
@@ -921,10 +925,11 @@ if($preview)
$template->assign_var_from_handle("JUMPBOX", "jumpbox");
$template->assign_vars(array(
- "L_POSTNEWIN" => $section_title,
"FORUM_ID" => $forum_id,
"FORUM_NAME" => $forum_name,
+ "L_POSTNEWIN" => $section_title,
+
"U_VIEW_FORUM" => append_sid("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id"))
);
@@ -935,11 +940,11 @@ if($preview)
}
else
{
- $username_input = '<input type="text" name="username" value="'.$username.'" size="25" maxlength="50">';
+ $username_input = '<input type="text" name="username" value="' . $username . '" size="25" maxlength="50">';
$password_input = '<input type="password" name="password" size="25" maxlenght="40">';
}
- $subject_input = '<input type="text" name="subject" value="'.$subject.'" size="50" maxlenght="255">';
- $message_input = '<textarea name="message" rows="10" cols="35" wrap="virtual">'.$message.'</textarea>';
+ $subject_input = '<input type="text" name="subject" value="'.$subject.'" size="50" maxlength="255">';
+ $message_input = '<textarea name="message" rows="10" cols="40" wrap="virtual">'.$message.'</textarea>';
if($board_config['allow_html'])
{
@@ -1034,7 +1039,7 @@ if($preview)
"L_SUBJECT" => $l_subject,
"L_MESSAGE_BODY" => $l_body,
"L_OPTIONS" => $l_options,
- "L_PREVIEW" => $l_preview,
+ "L_PREVIEW" => $lang['Preview'],
"L_SUBMIT" => $l_submit,
"L_CANCEL" => $l_cancelpost,
diff --git a/phpBB/templates/PSO/posting_preview.tpl b/phpBB/templates/PSO/posting_preview.tpl
new file mode 100644
index 0000000000..9abe6a37e6
--- /dev/null
+++ b/phpBB/templates/PSO/posting_preview.tpl
@@ -0,0 +1,37 @@
+<div align="center"><table border="0" cellpadding="1" cellspacing="0" width="98%">
+ <tr>
+ <td bgcolor="{T_TH_COLOR1}"><table border="0" cellpadding="4" cellspacing="1" width="100%">
+ <tr>
+ <td colspan="2" bgcolor="{T_TH_COLOR2}"><table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td><font face="{T_FONTFACE1}" size="{T_FONTSIZE3}"><b>{L_PREVIEW}</b></font></td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td width="20%" bgcolor="{T_TH_COLOR3}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}"><b>{L_AUTHOR}</b></font></td>
+ <td bgcolor="{T_TH_COLOR3}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}"><b>{L_MESSAGE}</b></font></td>
+ </tr>
+ <tr bgcolor="{ROW_COLOR}">
+ <td width="20%" align="left" valign="top"><table height="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td valign="top"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}"><b>{POSTER_NAME}</b></font><br><br></td>
+ </tr>
+ </table></td>
+ <td width="80%" height="100%"><table width="100%" height="100%" cellspacing="1" cellpadding="0" border="0">
+ <tr>
+ <td><img src="images/posticon.gif" alt="Post image icon"><font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">{L_POSTED}: {POST_DATE}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Post Subject: {POST_SUBJECT}</font><hr></td>
+ </tr>
+ <tr>
+ <td height="100%" valign="top"><font face="{T_FONTFACE3}" size="{T_FONTSIZE2}" color="{T_FONTCOLOR1}">{MESSAGE}</font></td>
+ </tr>
+ <tr>
+ <td><hr></td>
+ </tr>
+ </table></td>
+ </tr>
+ </table></td>
+ </tr>
+</table></div>
+
+<br clear="all" />