mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-16 00:08:53 +00:00
Move jumpbox to separate template
git-svn-id: file:///svn/phpbb/trunk@67 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
cb964c96c7
commit
ad9d4d2605
4 changed files with 50 additions and 44 deletions
|
@ -34,6 +34,7 @@ else
|
||||||
{
|
{
|
||||||
$logged_in_status = "You are not logged in.";
|
$logged_in_status = "You are not logged in.";
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->set_var(array("SITENAME" => $sitename,
|
$template->set_var(array("SITENAME" => $sitename,
|
||||||
"PHPEX" => $phpEx,
|
"PHPEX" => $phpEx,
|
||||||
"PAGE_TITLE" => $page_title,
|
"PAGE_TITLE" => $page_title,
|
||||||
|
@ -56,15 +57,24 @@ switch($pagetype)
|
||||||
"USERS_BROWSING" => $users_browsing));
|
"USERS_BROWSING" => $users_browsing));
|
||||||
|
|
||||||
$template->pparse("output", "header");
|
$template->pparse("output", "header");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'viewforum':
|
case 'viewforum':
|
||||||
$template->set_file(array("header" => "viewforum_header.tpl",
|
$template->set_file(array("header" => "viewforum_header.tpl",
|
||||||
"body" => "viewforum_body.tpl",
|
"body" => "viewforum_body.tpl",
|
||||||
|
"jumpbox" => "jumpbox.tpl",
|
||||||
"footer" => "viewforum_footer.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,
|
$template->set_var(array("FORUM_ID" => $forum_id,
|
||||||
"FORUM_NAME" => $forum_name,
|
"FORUM_NAME" => $forum_name,
|
||||||
"MODERATORS" => $forum_moderators));
|
"MODERATORS" => $forum_moderators));
|
||||||
|
|
||||||
$template->pparse("output", "header");
|
$template->pparse("output", "header");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,13 +28,11 @@ switch($pagetype)
|
||||||
case 'index':
|
case 'index':
|
||||||
$template->pparse("output", "footer");
|
$template->pparse("output", "footer");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'viewforum':
|
case 'viewforum':
|
||||||
$jumpbox = make_jumpbox($db);
|
|
||||||
$template->set_var(array("PHPEX" => $phpEx,
|
$template->set_var(array("PHPEX" => $phpEx,
|
||||||
"FORUM_ID" => $forum_id,
|
"FORUM_ID" => $forum_id));
|
||||||
"SELECT_NAME" => "forum_id",
|
|
||||||
"JUMPBOX_ACTION" => "viewforum.".$phpEx,
|
|
||||||
"JUMPBOX_LIST" => $jumpbox));
|
|
||||||
$template->pparse("output", "footer");
|
$template->pparse("output", "footer");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
5
phpBB/templates/Default/jumpbox.tpl
Normal file
5
phpBB/templates/Default/jumpbox.tpl
Normal 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>
|
|
@ -24,14 +24,7 @@
|
||||||
<td>
|
<td>
|
||||||
<table border="0" width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
|
<table border="0" width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" style="{font-size: 8pt; height: 55px;}"><table cellspacing="0" cellpadding="0" border="0">
|
<td align="right" style="{font-size: 8pt; height: 55px;}">{JUMPBOX}</td>
|
||||||
<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>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Add table
Reference in a new issue