1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-21 00:02:18 +02:00

Templating var assignment changes and various updates or fixes

git-svn-id: file:///svn/phpbb/trunk@195 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-04-19 22:24:13 +00:00
parent 562a2e5592
commit d133dc9874
14 changed files with 91 additions and 80 deletions

View File

@ -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));

View File

@ -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"])
)
);

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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;

View File

@ -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,