From d133dc9874f8a56d87e002777a186379062061b7 Mon Sep 17 00:00:00 2001
From: "Paul S. Owen" <psotfx@users.sourceforge.net>
Date: Thu, 19 Apr 2001 22:24:13 +0000
Subject: [PATCH] Templating var assignment changes and various updates or
 fixes

git-svn-id: file:///svn/phpbb/trunk@195 89ea8834-ac86-4346-8a33-228a782c2dd0
---
 phpBB/includes/page_header.php                | 42 ++++++++++++-------
 phpBB/index.php                               |  1 -
 phpBB/templates/Default/index_body.tpl        |  2 +-
 phpBB/templates/Default/newtopic_header.tpl   |  2 +-
 phpBB/templates/Default/viewforum_body.tpl    | 30 +++++++------
 phpBB/templates/Default/viewforum_footer.tpl  |  8 +---
 phpBB/templates/Default/viewforum_header.tpl  |  2 +-
 phpBB/templates/Default/viewonline_body.tpl   |  2 +-
 phpBB/templates/Default/viewonline_footer.tpl | 28 +++++++------
 phpBB/templates/Default/viewtopic_body.tpl    | 22 ++++++----
 phpBB/templates/Default/viewtopic_footer.tpl  |  4 +-
 phpBB/templates/Default/viewtopic_header.tpl  |  6 +--
 phpBB/viewforum.php                           | 20 ++++-----
 phpBB/viewonline.php                          |  2 -
 14 files changed, 91 insertions(+), 80 deletions(-)

diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php
index 53dd87e3ab..4774fe4174 100644
--- a/phpBB/includes/page_header.php
+++ b/phpBB/includes/page_header.php
@@ -24,8 +24,11 @@
 
 define(HEADER_INC, TRUE);
 
+//
 // Parse and show the overall header.
-$template->set_filenames(array("overall_header" => "overall_header.tpl",
+//
+$template->set_filenames(array(
+	"overall_header" => "overall_header.tpl",
 	"overall_footer" => "overall_footer.tpl"));
 
 //
@@ -34,7 +37,7 @@ $template->set_filenames(array("overall_header" => "overall_header.tpl",
 if($userdata['session_logged_in'])
 {
 	$logged_in_status = "You are logged in as <b>".$userdata["username"]."</b>.";
-	$logged_in_status .= " [<A HREF=\"login.php?submit=logout\">Logout</A>]";
+	$logged_in_status .= " [<A HREF=\"login.$phpEx?submit=logout\">Logout</A>]";
 }
 else
 {
@@ -61,6 +64,7 @@ $template->assign_vars(array(
 	"SITENAME" => $sitename,
 	"PHPEX" => $phpEx,
 	"PHPSELF" => $PHP_SELF,
+
 	"L_USERNAME" => $l_username,
 	"L_PASSWORD" => $l_password,
 	"L_WELCOMETO" => $l_welcometo,
@@ -87,7 +91,12 @@ $template->assign_vars(array(
 	"L_THEFORUMS" => $l_theforums,
 	"L_NONEWPOSTS" => $l_nonewposts,
 	"L_NEWPOSTS" => $l_newposts,
+
 	"S_TIMEZONE" => $s_timezone,
+	"S_FORUMS_URL" => POST_FORUM_URL,
+	"S_TOPICS_URL" => POST_TOPIC_URL,
+	"S_USERS_URL" => POST_USERS_URL,
+
 	"PAGE_TITLE" => $page_title,
 	"LOGIN_STATUS" => $logged_in_status,
 	"META_INFO" => $meta_tags));
@@ -122,11 +131,12 @@ switch($pagetype)
 			"jumpbox" => "jumpbox.tpl",
 			"footer" => "viewforum_footer.tpl"));
 		$jumpbox = make_jumpbox();
-		$template->assign_var_from_handle("JUMPBOX", "jumpbox");
 		$template->assign_vars(array(
 			"JUMPBOX_LIST" => $jumpbox,
-			"JUMPBOX_ACTION" => "viewforum.".$phpEx,
-			"SELECT_NAME" => POST_FORUM_URL,
+		    "JUMPBOX_ACTION" => "viewforum.".$phpEx,
+		    "SELECT_NAME" => POST_FORUM_URL));
+		$template->assign_var_from_handle("JUMPBOX", "jumpbox");
+		$template->assign_vars(array(
 			"FORUM_ID" => $forum_id,
 			"FORUM_NAME" => $forum_name,
 			"MODERATORS" => $forum_moderators));
@@ -140,11 +150,12 @@ switch($pagetype)
 			"jumpbox" => "jumpbox.tpl",
 			"footer" => "viewtopic_footer.tpl"));
 		$jumpbox = make_jumpbox();
-		$template->assign_var_from_handle("JUMPBOX", "jumpbox");
 		$template->assign_vars(array(
 			"JUMPBOX_LIST" => $jumpbox,
 		    "JUMPBOX_ACTION" => "viewforum.".$phpEx,
-		    "SELECT_NAME" => POST_FORUM_URL,
+		    "SELECT_NAME" => POST_FORUM_URL));
+		$template->assign_var_from_handle("JUMPBOX", "jumpbox");
+		$template->assign_vars(array(
 			"FORUM_ID" => $forum_id,
 		    "FORUM_NAME" => $forum_name,
 		    "TOPIC_ID" => $topic_id,
@@ -154,16 +165,18 @@ switch($pagetype)
 		break;
 
 	case 'viewonline':
-		$template->set_filenames(array("header" => "viewonline_header.tpl",
+		$template->set_filenames(array(
+			"header" => "viewonline_header.tpl",
 			"body" => "viewonline_body.tpl",
 			"jumpbox" => "jumpbox.tpl",
 			"footer" => "viewonline_footer.tpl"));
 		$jumpbox = make_jumpbox();
-		$template->assign_var_from_handle("JUMPBOX", "jumpbox");
 		$template->assign_vars(array(
 			"JUMPBOX_LIST" => $jumpbox,
-			"JUMPBOX_ACTION" => "viewforum.".$phpEx,
-			"SELECT_NAME" => POST_FORUM_URL,
+		    "JUMPBOX_ACTION" => "viewforum.".$phpEx,
+		    "SELECT_NAME" => POST_FORUM_URL));
+		$template->assign_var_from_handle("JUMPBOX", "jumpbox");
+		$template->assign_vars(array(
 			"TOTAL_POSTS" => $total_posts,
 			"TOTAL_USERS" => $total_users,
 			"POST_USER_URL" => POST_USERS_URL,
@@ -181,11 +194,12 @@ switch($pagetype)
 			"header" => "newtopic_header.tpl",
 			"body" => "posting_body.tpl"));
 		$jumpbox = make_jumpbox();
-		$template->assign_var_from_handle("JUMPBOX", "jumpbox");
 		$template->assign_vars(array(
 			"JUMPBOX_LIST" => $jumpbox,
-			"JUMPBOX_ACTION" => "viewforum.".$phpEx,
-			"SELECT_NAME" => POST_FORUM_URL,
+		    "JUMPBOX_ACTION" => "viewforum.".$phpEx,
+		    "SELECT_NAME" => POST_FORUM_URL));
+		$template->assign_var_from_handle("JUMPBOX", "jumpbox");
+		$template->assign_vars(array(
 			"L_POSTNEWIN" => $l_postnewin,
 			"FORUM_ID" => $forum_id,
 			"FORUM_NAME" => $forum_name));
diff --git a/phpBB/index.php b/phpBB/index.php
index 1c9c1a0738..171d77eb36 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -108,7 +108,6 @@ if($total_categories)
 		$template->assign_block_vars("catrow",
 			array(
 				"CAT_ID" => $category_rows[$i]["cat_id"],
-				"POST_FORUM_URL" => POST_FORUM_URL,
 				"CAT_DESC" => stripslashes($category_rows[$i]["cat_title"])
 			)
 		);
diff --git a/phpBB/templates/Default/index_body.tpl b/phpBB/templates/Default/index_body.tpl
index d110ec2ee6..e2fadd0f3c 100644
--- a/phpBB/templates/Default/index_body.tpl
+++ b/phpBB/templates/Default/index_body.tpl
@@ -19,7 +19,7 @@
 	        <!-- BEGIN forumrow -->
 	        <tr bgcolor="{catrow.forumrow.ROW_COLOR}" class="tablebody">
 	          <td width="5%" align="center" valign="middle">{catrow.forumrow.FOLDER}</td>
-            <td><a href="viewforum.{PHPEX}?{catrow.POST_FORUM_URL}={catrow.forumrow.FORUM_ID}&{catrow.forumrow.POSTS}">{catrow.forumrow.FORUM_NAME}</a><br>{catrow.forumrow.FORUM_DESC}</td>
+            <td><a href="viewforum.{PHPEX}?{S_FORUMS_URL}={catrow.forumrow.FORUM_ID}&{catrow.forumrow.POSTS}">{catrow.forumrow.FORUM_NAME}</a><br>{catrow.forumrow.FORUM_DESC}</td>
             <td width="5%" align="center" valign="middle">{catrow.forumrow.TOPICS}</td>
 	          <td width="5%" align="center" valign="middle">{catrow.forumrow.POSTS}</td>
 	          <td width="15%" align="center" valign="middle">{catrow.forumrow.LAST_POST}</td>
diff --git a/phpBB/templates/Default/newtopic_header.tpl b/phpBB/templates/Default/newtopic_header.tpl
index 3e3d70a706..0e032ec54c 100644
--- a/phpBB/templates/Default/newtopic_header.tpl
+++ b/phpBB/templates/Default/newtopic_header.tpl
@@ -7,7 +7,7 @@
 	        <tr>
                   <td align="center" style="{font-size: 8pt;}">
                     {L_POSTNEWIN}<br>
-	            <a href="viewforum.{PHPEX}?forum_id={FORUM_ID}">{FORUM_NAME}</a>
+	            <a href="viewforum.{PHPEX}?{S_FORUMS_URL}={FORUM_ID}">{FORUM_NAME}</a>
 	          </td>
 	        </tr>
 	      </table>
diff --git a/phpBB/templates/Default/viewforum_body.tpl b/phpBB/templates/Default/viewforum_body.tpl
index 3b84fbddc9..b9d952a9cf 100644
--- a/phpBB/templates/Default/viewforum_body.tpl
+++ b/phpBB/templates/Default/viewforum_body.tpl
@@ -15,7 +15,7 @@
 	        <!-- BEGIN topicrow -->
 	        <tr bgcolor="#DDDDDD" class="tablebody">
 	          <td width="5%" align="center" valign="middle">{topicrow.FOLDER}</td>
-                  <td><a href="viewtopic.{PHPEX}?{topicrow.POST_TOPIC_URL}={topicrow.TOPIC_ID}&{topicrow.REPLIES}">{topicrow.TOPIC_TITLE}</a>{topicrow.GOTO_PAGE}</td>
+                  <td><a href="viewtopic.{PHPEX}?{S_TOPICS_URL}={topicrow.TOPIC_ID}&{topicrow.REPLIES}">{topicrow.TOPIC_TITLE}</a>{topicrow.GOTO_PAGE}</td>
                   <td width="5%" align="center" valign="middle">{topicrow.REPLIES}</td>
                   <td width="10%" align="center" valign="middle">{topicrow.TOPIC_POSTER}</td>
 	          <td width="5%" align="center" valign="middle">{topicrow.VIEWS}</td>
@@ -28,18 +28,16 @@
 	</table>
     </td>
   </tr>
-  <tr>
-    <td>
-     <table border="0" align="center" width="100%" bgcolor="#000000" cellpadding="0" cellspacing="1">
-      <tr>
-        <td>
-          <table border="0" width="100%" cellpadding="3" cellspacing="1">
-           <tr bgcolor="#CCCCCC" class="tablebody">
-             <td align="right">{PAGINATION}</td>
-           </tr>
-          </table>
-        </td>
-       </tr>
-      </table>
-	</td>
-</tr>
+  
+	<tr>
+		<td align="center" bgcolor="#000000"><table border="0" width="100%" cellpadding="0" cellspacing="1">
+			<tr>
+				<td bgcolor="#CCCCCC"><table border="0" width="100%" cellpadding="3" cellspacing="1">
+					<tr class="tablebody">
+						<td align="left"><b>{S_TIMEZONE}</b></td>
+						<td align="right">{PAGINATION}</td>
+					</tr>
+				</table></td>
+			</tr>
+		</table></td>
+	</tr>
diff --git a/phpBB/templates/Default/viewforum_footer.tpl b/phpBB/templates/Default/viewforum_footer.tpl
index 6b70389d0a..c55d8ce53b 100644
--- a/phpBB/templates/Default/viewforum_footer.tpl
+++ b/phpBB/templates/Default/viewforum_footer.tpl
@@ -8,11 +8,7 @@
 	    <td>
 	      <table border="0" width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
 	        <tr>
-	          <td align="left" style="{font-size: 8pt;}">
-	            <a href="posting.{PHPEX}?mode=newtopic&forum_id={FORUM_ID}">
-	            <img src="images/newpost.jpg" height="50" width="250" alt="Post New Topic" border="0">
-	            </a>
-	          </td>
+	          <td align="left" style="{font-size: 8pt;}"><a href="posting.{PHPEX}?mode=newtopic&{S_FORUMS_URL}={FORUM_ID}"><img src="images/newpost.jpg" height="50" width="250" alt="Post New Topic" border="0"></a></td>
 	        </tr>
 	      </table>
 	    </td>
@@ -24,7 +20,7 @@
 	      <td>                          
 	        <table border="0" width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
 	          <tr>
-	            <td align="right" style="{font-size: 8pt; height: 55px;}">{JUMPBOX}</td>                             
+	            <td align="right" style="{font-size: 8pt; height: 55px;}">{JUMPBOX}</td>    
 	          </tr>                               
 	        </table>                              
 	      </td>                                    
diff --git a/phpBB/templates/Default/viewforum_header.tpl b/phpBB/templates/Default/viewforum_header.tpl
index 8709741bfa..76435867ef 100644
--- a/phpBB/templates/Default/viewforum_header.tpl
+++ b/phpBB/templates/Default/viewforum_header.tpl
@@ -24,7 +24,7 @@
 	      <table border="0" width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
 	        <tr>
 	          <td align="right" style="{font-size: 8pt;}">
-	            <a href="posting.{PHPEX}?mode=newtopic&forum_id={FORUM_ID}">
+	            <a href="posting.{PHPEX}?mode=newtopic&{S_FORUMS_URL}={FORUM_ID}">
 	            <img src="images/newpost.jpg" height="50" width="250" alt="Post New Topic" border="0">
 	            </a>
 	          </td>
diff --git a/phpBB/templates/Default/viewonline_body.tpl b/phpBB/templates/Default/viewonline_body.tpl
index 1093f74eed..08bca63aed 100644
--- a/phpBB/templates/Default/viewonline_body.tpl
+++ b/phpBB/templates/Default/viewonline_body.tpl
@@ -12,7 +12,7 @@
 				</tr>
 				<!-- BEGIN userrow -->
 				<tr bgcolor="{userrow.ROW_COLOR}" class="tablebody">
-					<td width="35%">&nbsp;<a href="profile.{PHPEX}?mode=viewprofile&{POST_USER_URL}={userrow.USER_ID}">{userrow.USERNAME}</a>&nbsp;</td>
+					<td width="35%">&nbsp;<a href="profile.{PHPEX}?mode=viewprofile&{S_USERS_URL}={userrow.USER_ID}">{userrow.USERNAME}</a>&nbsp;</td>
 					<td width="25%" align="center">&nbsp;{userrow.LASTUPDATE}&nbsp;</td>
 					<td width="40%">&nbsp;<a href="{userrow.LOCATION_URL}">&nbsp;{userrow.LOCATION}</a>&nbsp;</td>
 				</tr>
diff --git a/phpBB/templates/Default/viewonline_footer.tpl b/phpBB/templates/Default/viewonline_footer.tpl
index bb22397c56..93e69a36f5 100644
--- a/phpBB/templates/Default/viewonline_footer.tpl
+++ b/phpBB/templates/Default/viewonline_footer.tpl
@@ -1,15 +1,17 @@
+
 	<tr>
-	  <td align="right">
-	   <table border="0" bgcolor="#000000" cellpadding="0" cellspacing="1">
-	    <tr>                           
-	      <td align="right">                          
-	        <table border="0" width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
-	          <tr>
-	            <td style="{font-size: 8pt; height: 55px;}">{JUMPBOX}</td>                             
-	          </tr>                               
-	        </table>                              
-	      </td>                                    
-	    </tr>
-	    </table>
-	   </td>
+		<td align="center"><table border="0" width="100%" cellpadding="0" cellspacing="1">
+			<tr>
+				<td style="{font-size: 8pt;}" align="left" valign="top"><b>{S_TIMEZONE}</b></td>
+				<td style="{font-size: 8pt;}" align="right" ><table cellpadding="0" cellspacing="1" border="0" bgcolor="#000000">
+					<tr>
+						<td bgcolor="#CCCCCC"><table width="100%" cellpadding="1" cellspacing="1" border="0">
+							<tr>
+								<td style="{font-size:8pt; height:55px;}" align="right">{JUMPBOX}</td>
+							</tr>
+						</table></td>
+					</tr>
+				</table></td>
+			</tr>
+		</table></td>
 	</tr>
diff --git a/phpBB/templates/Default/viewtopic_body.tpl b/phpBB/templates/Default/viewtopic_body.tpl
index 546f8c620d..3844cac500 100644
--- a/phpBB/templates/Default/viewtopic_body.tpl
+++ b/phpBB/templates/Default/viewtopic_body.tpl
@@ -5,8 +5,8 @@
     <td>
       <table border="0" width="100%" cellpadding="3" cellspacing="1">
         <tr><td wdith="90%" class="tablebody" bgcolor="#CCCCCC">This topic is {PAGES} long. {PAGINATION}</td>
-            <td width="5%" class="tableheader" align="center"><a href="viewtopic.{PHPEX}?t={TOPIC_ID}&view=older"><img src="images/prev.gif" alt="View previous topic" border="0"></a></td>
-            <td width="5%" class="tableheader" align="center"><a href="viewtopic.{PHPEX}?t={TOPIC_ID}&view=newer"><img src="images/next.gif" alt="View next topic" border="0"></a></td>
+            <td width="5%" class="tableheader" align="center"><a href="viewtopic.{PHPEX}?{S_TOPICS_URL}={TOPIC_ID}&view=older"><img src="images/prev.gif" alt="View previous topic" border="0"></a></td>
+            <td width="5%" class="tableheader" align="center"><a href="viewtopic.{PHPEX}?{S_TOPICS_URL}={TOPIC_ID}&view=newer"><img src="images/next.gif" alt="View next topic" border="0"></a></td>
         </tr>
       </table>
     </td>
@@ -49,18 +49,22 @@
 	</td>
 </tr>
 <tr>
-<td>
-<table border="0" align="center" width="100%" bgcolor="#000000" cellpadding="0" cellspacing="1">                                  
+  <td><table border="0" align="center" width="100%" bgcolor="#000000" cellpadding="0" cellspacing="1">
     <tr>
       <td>
         <table border="0" width="100%" cellpadding="3" cellspacing="1">
-          <tr><td wdith="90%" class="tablebody" bgcolor="#CCCCCC">This topic is {PAGES} long. {PAGINATION}</td>
-              <td width="5%" class="tableheader" align="center"><a href="viewtopic.{PHPEX}?forum_id={FORUM_ID}&topic_id={TOPIC_ID}&view=older"><img src="images/prev.gif" alt="View previous topic" border="0"></a></td>
-              <td width="5%" class="tableheader" align="center"><a href="viewtopic.{PHPEX}?forum_id={FORUM_ID}&topic_id={TOPIC_ID}&view=newer"><img src="images/next.gif" alt="View next topic" border="0"></a></td>
+          <tr>
+ 			  <td width="90%" class="tablebody" bgcolor="#CCCCCC"><table width="100%" cellspacing="0" cellpadding="0" border="0">
+				<tr>
+					<td align="left" nowrap><b>{S_TIMEZONE}</b></td>
+					<td align="right" nowrap>This topic is {PAGES} long. {PAGINATION}</td>
+				</tr>
+			  </table></td>
+              <td width="5%" class="tableheader" align="center"><a href="viewtopic.{PHPEX}?{S_TOPICS_URL}={TOPIC_ID}&view=older"><img src="images/prev.gif" alt="View previous topic" border="0"></a></td>
+              <td width="5%" class="tableheader" align="center"><a href="viewtopic.{PHPEX}?{S_TOPICS_URL}={TOPIC_ID}&view=newer"><img src="images/next.gif" alt="View next topic" border="0"></a></td>
           </tr>
         </table>
       </td>
     </tr>
-    </table>
-  </td>
+  </table></td>
 </tr>
diff --git a/phpBB/templates/Default/viewtopic_footer.tpl b/phpBB/templates/Default/viewtopic_footer.tpl
index 4de01bcef3..f4277d2cf5 100644
--- a/phpBB/templates/Default/viewtopic_footer.tpl
+++ b/phpBB/templates/Default/viewtopic_footer.tpl
@@ -9,9 +9,9 @@
 	      <table border="0" width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
 	        <tr>
 	          <td align="left" style="{font-size: 8pt;}">
-	            <a href="posting.{PHPEX}?mode=newtopic&forum_id={FORUM_ID}">
+	            <a href="posting.{PHPEX}?mode=newtopic&{S_FORUMS_URL}={FORUM_ID}">
 	            <img src="images/newpost.jpg" height="50" width="125" alt="Post New Topic" border="0"></a>&nbsp;
-                    <a href="posting.{PHPEX}?mode=reply&forum_id={FORUM_ID}&topic_id={TOPIC_ID}">
+                    <a href="posting.{PHPEX}?mode=reply&{S_TOPICS_URL}={TOPIC_ID}">
                     <img src="images/reply.jpg" height="50" width="125" alt="Reply to this topic" border="0">
 	            </a>
 	          </td>
diff --git a/phpBB/templates/Default/viewtopic_header.tpl b/phpBB/templates/Default/viewtopic_header.tpl
index c524d8e746..323162b098 100644
--- a/phpBB/templates/Default/viewtopic_header.tpl
+++ b/phpBB/templates/Default/viewtopic_header.tpl
@@ -9,7 +9,7 @@
 	        <table border="0" width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
 	          <tr>                                
 	            <td align="left" valign="bottom" style="{font-size: 8pt; height: 55px;}" nowrap>
-	            <a href="index.{PHPEX}">{SITENAME} - Forum Index</a> >> <a href="viewforum.{PHPEX}?{POST_FORUM_URL}={FORUM_ID}">{FORUM_NAME}</a> >> {TOPIC_TITLE}
+	            <a href="index.{PHPEX}">{SITENAME} - Forum Index</a> >> <a href="viewforum.{PHPEX}?{S_FORUMS_URL}={FORUM_ID}">{FORUM_NAME}</a> >> {TOPIC_TITLE}
 	            </td>                             
 	          </tr>                               
 	        </table>                              
@@ -22,9 +22,9 @@
 	      <table border="0" width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
 	        <tr>
 	          <td align="right" style="{font-size: 8pt;}">
-	            <a href="posting.{PHPEX}?mode=newtopic&forum_id={FORUM_ID}">
+	            <a href="posting.{PHPEX}?mode=newtopic&{S_FORUMS_URL}={FORUM_ID}">
 	            <img src="images/newpost.jpg" height="50" width="125" alt="Post New Topic" border="0"></a>&nbsp;
-                    <a href="posting.{PHPEX}?mode=reply&forum_id={FORUM_ID}&topic_id={TOPIC_ID}">
+                    <a href="posting.{PHPEX}?mode=reply&{S_TOPICS_URL}={TOPIC_ID}">
                     <img src="images/reply.jpg" height="50" width="125" alt="Reply to this topic" border="0">
 	            </a>
 	          </td>
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index d862d7750c..91295ebc89 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -158,16 +158,16 @@ if($total_topics)
 	$last_post_time = date($date_format, $topic_rowset[$x]["post_time"]);
 	$last_post_user = $topic_rowset[$x]["user2"];
 	$folder_img = "<img src=\"images/folder.gif\">";
-	$template->assign_block_vars("topicrow", array("FORUM_ID" => $forum_id,
-				 "POST_TOPIC_URL" => POST_TOPIC_URL,
-				 "TOPIC_ID" => $topic_id,
-				 "FOLDER" => $folder_img, 
-				 "TOPIC_POSTER" => "<a href=\"profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$topic_rowset[$x]["user_id"]."\">".$topic_poster."</a>",
-				 "GOTO_PAGE" => $goto_page,
-				 "REPLIES" => $replies,
-				 "TOPIC_TITLE" => $topic_title,
-				 "VIEWS" => $views,
-				 "LAST_POST" => $last_post_time . "<br><a href=\"profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$topic_rowset[$x]["id2"]."\">" . $last_post_user ."</a>"));
+	$template->assign_block_vars(
+		"topicrow", array("FORUM_ID" => $forum_id,
+		 "TOPIC_ID" => $topic_id,
+		 "FOLDER" => $folder_img, 
+		 "TOPIC_POSTER" => "<a href=\"profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$topic_rowset[$x]["user_id"]."\">".$topic_poster."</a>",
+		 "GOTO_PAGE" => $goto_page,
+		 "REPLIES" => $replies,
+		 "TOPIC_TITLE" => $topic_title,
+		 "VIEWS" => $views,
+		 "LAST_POST" => $last_post_time . "<br><a href=\"profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$topic_rowset[$x]["id2"]."\">" . $last_post_user ."</a>"));
      }
 
    $count = 1;
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index cada2b70c4..f4d2ce99cc 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -62,8 +62,6 @@ if(!$onlinerow)
 }
 
 $template->assign_vars(array(
-	"POST_FORUM_URL" => POST_FORUM_URL,
-	"POST_USER_URL" => POST_USERS_URL,
 	"L_WHOSONLINE" => $l_whosonline,
 	"L_USERNAME" => $l_username,
 	"L_LOCATION" => $l_forum_location,