1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-09 07:58:56 +02:00

A couple of initial changes for the new module system with the mcp

(further changes are needed elsewhere for these to actually be
useful....)


git-svn-id: file:///svn/phpbb/trunk@5298 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Graham Eames 2005-11-09 20:36:04 +00:00
parent 81ab6d83b8
commit ace13c86a5
3 changed files with 32 additions and 19 deletions

View File

@ -13,10 +13,17 @@
* mcp_main * mcp_main
* Handling mcp actions * Handling mcp actions
*/ */
class mcp_main extends module class mcp_main
{ {
function mcp_main($id, $mode, $url) var $p_master;
function mcp_main(&$p_master)
{
$this->p_master = &$p_master;
}
function main($id, $mode)
{ {
global $auth, $db, $user, $template; global $auth, $db, $user, $template;
global $config, $phpbb_root_path, $phpEx, $SID; global $config, $phpbb_root_path, $phpEx, $SID;
@ -131,7 +138,7 @@ class mcp_main extends module
mcp_front_view($id, $mode, $action, $url); mcp_front_view($id, $mode, $action, $url);
$this->display($user->lang['MCP'], 'mcp_front.html'); $this->tpl_name = 'mcp_front';
break; break;
case 'forum_view': case 'forum_view':
@ -153,7 +160,7 @@ class mcp_main extends module
mcp_forum_view($id, $mode, $action, $url, $forum_info); mcp_forum_view($id, $mode, $action, $url, $forum_info);
$this->display($user->lang['MCP'], 'mcp_forum.html'); $this->tpl_name = 'mcp_forum';
break; break;
case 'topic_view': case 'topic_view':
@ -161,7 +168,7 @@ class mcp_main extends module
mcp_topic_view($id, $mode, $action, $url); mcp_topic_view($id, $mode, $action, $url);
$this->display($user->lang['MCP'], 'mcp_topic.html'); $this->tpl_name = 'mcp_topic';
break; break;
case 'post_details': case 'post_details':
@ -169,7 +176,7 @@ class mcp_main extends module
mcp_post_details($id, $mode, $action, $url); mcp_post_details($id, $mode, $action, $url);
$this->display($user->lang['MCP'], 'mcp_post.html'); $this->tpl_name = 'mcp_post';
break; break;
default: default:

View File

@ -13,10 +13,17 @@
* mcp_queue * mcp_queue
* Handling the moderation queue * Handling the moderation queue
*/ */
class mcp_queue extends module class mcp_queue
{ {
function mcp_queue($id, $mode, $url) var $p_master;
function mcp_main(&$p_master)
{
$this->p_master = &$p_master;
}
function main($id, $mode)
{ {
global $auth, $db, $user, $template; global $auth, $db, $user, $template;
global $config, $phpbb_root_path, $phpEx, $SID; global $config, $phpbb_root_path, $phpEx, $SID;
@ -122,7 +129,7 @@ class mcp_queue extends module
'POST_ID' => $post_info['post_id']) 'POST_ID' => $post_info['post_id'])
); );
$this->display($user->lang['MCP_QUEUE'], 'mcp_post.html'); $this->tpl_name = 'mcp_post';
break; break;
@ -278,7 +285,7 @@ class mcp_queue extends module
'S_FORUM_OPTIONS' => $forum_options) 'S_FORUM_OPTIONS' => $forum_options)
); );
$this->display($user->lang['MCP_QUEUE'], 'mcp_queue.html'); $this->tpl_name = 'mcp_queue';
break; break;
} }
} }

View File

@ -40,23 +40,22 @@ function marklist(form_name, status)
<tr> <tr>
<th>{L_OPTIONS}</th> <th>{L_OPTIONS}</th>
</tr> </tr>
<!-- BEGIN mcp_section --> <!-- BEGIN l_block1 -->
<tr> <tr>
<!-- IF mcp_section.S_SELECTED --> <!-- IF l_block1.S_SELECTED -->
<td class="row1"><b class="nav">{mcp_section.L_TITLE}</b> <td class="row1"><b class="nav">{l_block1.L_TITLE}</b>
<ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;"> <ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;">
<!-- BEGIN mcp_subsection --> <!-- BEGIN l_block2 -->
<li>&#187; <!-- IF mcp_section.mcp_subsection.S_SELECTED --><b>{mcp_section.mcp_subsection.L_TITLE}<!-- IF mcp_section.mcp_subsection.ADD_ITEM --> ({mcp_section.mcp_subsection.ADD_ITEM})<!-- ENDIF --></b><!-- ELSE --><a href="{mcp_section.mcp_subsection.U_TITLE}">{mcp_section.mcp_subsection.L_TITLE}<!-- IF mcp_section.mcp_subsection.ADD_ITEM --> ({mcp_section.mcp_subsection.ADD_ITEM})<!-- ENDIF --></a><!-- ENDIF --></li> <li>&#187; <!-- IF l_block1.l_block2.S_SELECTED --><b>{l_block1.l_block2.L_TITLE}</b><!-- ELSE --><a href="{l_block1.l_block2.U_TITLE}">{l_block1.l_block2.L_TITLE}</a><!-- ENDIF --></li>
<!-- END mcp_subsection --> <!-- END l_block2 -->
</ul> </ul>
<!-- ELSE --> <!-- ELSE -->
<td class="row2" nowrap="nowrap" onmouseover="this.className='row1'" onmouseout="this.className='row2'" onclick="location.href='{mcp_section.U_TITLE}'"><a class="nav" href="{mcp_section.U_TITLE}">{mcp_section.L_TITLE}</a> <td class="row2" nowrap="nowrap" onmouseover="this.className='row1'" onmouseout="this.className='row2'" onclick="location.href='{l_block1.U_TITLE}'"><a class="nav" href="{l_block1.U_TITLE}">{l_block1.L_TITLE}</a>
<!-- ENDIF --> <!-- ENDIF -->
</td> </td>
</tr> </tr>
<!-- END mcp_section --> <!-- END l_block1 -->
</table> </table>
</td> </td>