Move jumpbox to separate template

git-svn-id: file:///svn/phpbb/trunk@67 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-02-27 18:50:36 +00:00
parent cb964c96c7
commit ad9d4d2605
4 changed files with 50 additions and 44 deletions

View file

@ -34,6 +34,7 @@ else
{
$logged_in_status = "You are not logged in.";
}
$template->set_var(array("SITENAME" => $sitename,
"PHPEX" => $phpEx,
"PAGE_TITLE" => $page_title,
@ -56,15 +57,24 @@ switch($pagetype)
"USERS_BROWSING" => $users_browsing));
$template->pparse("output", "header");
break;
case 'viewforum':
$template->set_file(array("header" => "viewforum_header.tpl",
"body" => "viewforum_body.tpl",
"jumpbox" => "jumpbox.tpl",
"footer" => "viewforum_footer.tpl"));
$jumpbox = make_jumpbox($db);
$template->set_var(array("JUMPBOX_LIST" => $jumpbox,
"JUMPBOX_ACTION" => "viewforum.".$phpEx,
"SELECT_NAME" => "forum_id"));
$template->parse("JUMPBOX","jumpbox");
$template->set_var(array("FORUM_ID" => $forum_id,
"FORUM_NAME" => $forum_name,
"MODERATORS" => $forum_moderators));
$template->pparse("output", "header");
break;
}

View file

@ -28,13 +28,11 @@ switch($pagetype)
case 'index':
$template->pparse("output", "footer");
break;
case 'viewforum':
$jumpbox = make_jumpbox($db);
$template->set_var(array("PHPEX" => $phpEx,
"FORUM_ID" => $forum_id,
"SELECT_NAME" => "forum_id",
"JUMPBOX_ACTION" => "viewforum.".$phpEx,
"JUMPBOX_LIST" => $jumpbox));
"FORUM_ID" => $forum_id));
$template->pparse("output", "footer");
break;
}

View file

@ -0,0 +1,5 @@
<table cellspacing="0" cellpadding="0" border="0">
<tr><form method="POST" action="{JUMPBOX_ACTION}">
<td nowrap>Jump To:<select name="{SELECT_NAME}"><option value="-1">Select A Forum</option>{JUMPBOX_LIST}</select><input type="submit" value="Go"></td>
</form></tr>
</table>

View file

@ -24,14 +24,7 @@
<td>
<table border="0" width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
<tr>
<td align="right" style="{font-size: 8pt; height: 55px;}"><table cellspacing="0" cellpadding="0" border="0">
<tr><form method="POST" action="{JUMPBOX_ACTION}">
<td>Jump To:<select name="{SELECT_NAME}"><option value="-1">Select A Forum</option>
{JUMPBOX_LIST}
</select>
<input type="submit" value="Go"></td>
</form></tr>
</table></td>
<td align="right" style="{font-size: 8pt; height: 55px;}">{JUMPBOX}</td>
</tr>
</table>
</td>