MyBB Community Forums

Full Version: Mobile compatible AdminCP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
CSS has been updated so it works much better than the original code.

[attachment=42056][attachment=42051][attachment=42053][attachment=42049][attachment=42052]


Upload style.php in your FTP > Admin > Default folder
[attachment=42124]

Upload class_page.php in your FTP > Admin > Inc folder
[attachment=42125]

Open your FTP > Admin > Styles > main.css

Add this at the very bottom.

@media only screen and (max-width: 868px) {

body {
	overflow-x: hidden !Important;
    overflow-y: scroll !Important;
}

#left_menu {
  float:none !Important;
  display:inline-block;	
  width: 100%;
	
}

#content  {
  float:left !Important;
  display: block;	
  width: 100%;
  padding: 5px 5px;
  margin: 0;
  margin-left: 0px !important; 
}

#logo {
	padding-top: 10px;
	margin-top: 30px !important;
	text-align: center !important;
    float:none !Important;
	left:0px;
	right: 0px;
	top: 0px;

}

.float_right {
  float:none !Important;
  display:inline;	
}

.float_left {
  float:none !Important;
  display:inline;	
}

table.general th {
    display: none;	
}

#welcome {
	padding: 10px;
	text-align: left !important;
    float:none !Important;
    margin:auto auto;
	left:0px;
	right: 0px;
	top: 0px;
}

table.general {
    background: #f1f1f1;
    text-align: left !important;
    float:none !Important;
    display: block !important;
	width: auto !important;
	font-size: 13px] !important;	
	width: auto !important;
}

table.general td {
    background: transparent;
    padding: 3px;
    text-align: left !important;
    float:none !Important;
    display: block !important;
	border-top: 0px !important;
	border-left: 0px !important;
	border-bottom: 1px solid: #646464;
	width: auto !important;
	font-size: 13px] !important;
}

table.general .alt_row td {
    background: transparent;
    padding: 3px;
    text-align: left !important;
    float:none !Important;
    display: block !important;
	border-top: 0px !important;
	border-left: 0px !important;
	border-bottom: 1px solid: #646464;
	width: auto !important;
	font-size: 13px] !important;
}

#menu ul {
	margin: 0;
	padding: 5px 5px 0;
	height: 60px;
}

.nav_tabs li.active a {
    font-size: 110%;
    font-weight: bold;
    text-align: left !important;
    float:none !Important;
    display: inline !important;
	width: auto;
}

.nav_tabs li a {
    font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Sans-Serif;
    font-size: 110%;
    text-align: left !important;
    float:none !Important;
    display: inline !important;
	width: auto;
}

#footer .generation {
    text-align: center !important;
    float:none !Important;
    margin:auto auto;

}

#footer .powered {
    text-align: center !important;
    float:none !Important;
    margin:auto auto;
}

.border_wrapper {
    background: #f1f1f1;
   	 width: auto !important;
}

fieldset {
    text-align: left !important;
    float:none !Important;
    display: inline !important;
	width: 100% !important;
}

pre {
    display: none !important;
}

it's looking nice iAndrew, Admin CP definitely lacks a responsive design Smile
With a little bit more enhancements, it can be very good for mobile devices.
Thanks. Which enhancements?
Thanks for sharing the style. Good work on the mobile compatibility.
Nice, though we are forgetting about login viewport. While there are several mobile compatible acp styles currently..., the one change mybb made was to how the login page loads. While we used to be able to modify the login in style.php the change removed that option as the login load is prior hence one may now have to edit core file to accomplish this adding
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Around this:
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />
In admin/inc/class_page.php
(2019-07-28, 04:49 PM)vintagedaddyo Wrote: [ -> ]Nice, though we are forgetting about login viewport. While there are several mobile compatible acp styles currently..., the one change mybb made was to how the login page loads. While we used to be able to modify the login in style.php the change removed that option as the login load is prior hence one may now have to edit core file to accomplish this adding
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Around this:
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />
In admin/inc/class_page.php

I made it using css only so it will never need to be updated like themes that currently show errors or have bugs. Thanks for the login code. I will get it added shortly.
(2019-07-28, 05:30 PM)iAndrew Wrote: [ -> ]
(2019-07-28, 04:49 PM)vintagedaddyo Wrote: [ -> ]Nice, though we are forgetting about login viewport. While there are several mobile compatible acp styles currently..., the one change mybb made was to how the login page loads. While we used to be able to modify the login in style.php the change removed that option as the login load is prior hence one may now have to edit core file to accomplish this adding
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Around this:
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />
In admin/inc/class_page.php

I made it using css only so it will never need to be updated like themes that currently show errors or have bugs. Thanks for the login code. I will get it added shortly.

Cool beans..., Cool Smile  and yeppers a mybb setup with both front and backend responsive is much more user friendly..., thats why for awhile from around 1808 to say 1812 for example I was just simply making my own mybb responsive core by default install pkg for personal usages. Suprised more users haven't done similar.
(2019-07-28, 03:14 AM)iAndrew Wrote: [ -> ]Upload style.php in your FTP > Admin > Default folder

Just an observation but fyi, I was wondering if you have noticed yet that the way you have included your partial header, successfully breaks the modal in acp?

* but adding the entire header inside the function rather than outside the function with only a partial does not:

<?php
/**
 *
 * MyBB: Responsive - Admin CP (Tutorial)
 *
 * Filename: style.php
 *
 * Style Author: iAndrew & Vintagedaddyo
 *
 * iA Site: https://community.mybb.com/user-84715.html
 * V Site: http://community.mybb.com/user-6029.html
 *
 * MyBB Version: 1.8.x
 *
 * Style Version: 1.0
 * 
 */

// Disallow direct access to this file for security reasons

if(!defined("IN_MYBB"))
{
	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

class Page extends DefaultPage
{

	/**
	 * Output the page breadcrumb.
	 *
	 */

	function _generate_breadcrumb()
	{
		if(!is_array($this->_breadcrumb_trail))
		{
			return false;
		}
		$trail = "";
		foreach($this->_breadcrumb_trail as $key => $crumb)
		{
			if($this->_breadcrumb_trail[$key+1])
			{
				$trail .= "<a href=\"".$crumb['url']."\">".$crumb['name']."</a>";
				if($this->_breadcrumb_trail[$key+2])
				{
					$trail .= " &raquo; ";
				}
			}
			else
			{
				$trail .= " &raquo; <span class=\"active\">".$crumb['name']."</span>";
			}
		}
		return $trail;
	}

	/**
	 * Output the page header.
	 *
	 */
	
	function output_header($title="")
	{
		global $mybb, $admin_session, $lang, $plugins;

		$args = array(
			'this' => &$this,
			'title' => &$title,
		);

		$plugins->run_hooks("admin_page_output_header", $args);

		if(!$title)
		{
			$title = $lang->mybb_admin_panel;
		}

		$rtl = "";
		if($lang->settings['rtl'] == 1)
		{
			$rtl = " dir=\"rtl\"";
		}

		echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
		echo "<html xmlns=\"http://www.w3.org/1999/xhtml\"{$rtl}>\n";
		echo "<head profile=\"http://gmpg.org/xfn/1\">\n";
		echo "	<title>".$title."</title>\n";
        echo "  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n";		
		echo "	<meta name=\"author\" content=\"MyBB Group\" />\n";
		echo "	<meta name=\"copyright\" content=\"Copyright ".COPY_YEAR." MyBB Group.\" />\n";
		echo "	<link rel=\"stylesheet\" href=\"styles/".$this->style."/main.css?ver=1813\" type=\"text/css\" />\n";
		echo "	<link rel=\"stylesheet\" href=\"styles/".$this->style."/modal.css?ver=1813\" type=\"text/css\" />\n";

		// Load stylesheet for this module if it has one

		if(file_exists(MYBB_ADMIN_DIR."styles/{$this->style}/{$this->active_module}.css"))
		{
			echo "	<link rel=\"stylesheet\" href=\"styles/{$this->style}/{$this->active_module}.css\" type=\"text/css\" />\n";
		}

		echo "	<script type=\"text/javascript\" src=\"../jscripts/jquery.js?ver=1821\"></script>\n";
		echo "	<script type=\"text/javascript\" src=\"../jscripts/jquery.plugins.min.js?ver=1821\"></script>\n";
		echo "	<script type=\"text/javascript\" src=\"../jscripts/general.js?ver=1821\"></script>\n";
		echo "	<script type=\"text/javascript\" src=\"./jscripts/admincp.js?ver=1821\"></script>\n";
		echo "	<script type=\"text/javascript\" src=\"./jscripts/tabs.js\"></script>\n";

		echo "	<link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.min.css\" />\n";
		echo "	<link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.structure.min.css\" />\n";
		echo "	<link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.theme.min.css\" />\n";
		echo "	<script src=\"jscripts/jqueryui/js/jquery-ui.min.js?ver=1813\"></script>\n";

		// Stop JS elements showing while page is loading (JS supported browsers only)
		echo "  <style type=\"text/css\">.popup_button { display: none; } </style>\n";
		echo "  <script type=\"text/javascript\">\n".
				"//<![CDATA[\n".
				"	document.write('<style type=\"text/css\">.popup_button { display: inline; } .popup_menu { display: none; }<\/style>');\n".
                "//]]>\n".
                "</script>\n";

		echo "	<script type=\"text/javascript\">
//<![CDATA[
var loading_text = '{$lang->loading_text}';
var cookieDomain = '{$mybb->settings['cookiedomain']}';
var cookiePath = '{$mybb->settings['cookiepath']}';
var cookiePrefix = '{$mybb->settings['cookieprefix']}';
var cookieSecureFlag = '{$mybb->settings['cookiesecureflag']}';
var imagepath = '../images';

lang.unknown_error = \"{$lang->unknown_error}\";
lang.saved = \"{$lang->saved}\";
//]]>
</script>\n";
		echo $this->extra_header;
		echo "</head>\n";
		echo "<body>\n";
		echo "<div id=\"container\">\n";
		echo "	<div id=\"logo\"><h1><span class=\"invisible\">{$lang->mybb_admin_cp}</span></h1></div>\n";
		$username = htmlspecialchars_uni($mybb->user['username']);
		echo "	<div id=\"welcome\"><span class=\"logged_in_as\">{$lang->logged_in_as} <a href=\"index.php?module=user-users&amp;action=edit&amp;uid={$mybb->user['uid']}\" class=\"username\">{$username}</a></span> | <a href=\"{$mybb->settings['bburl']}\" target=\"_blank\" class=\"forum\">{$lang->view_board}</a> | <a href=\"index.php?action=logout&amp;my_post_key={$mybb->post_code}\" class=\"logout\">{$lang->logout}</a></div>\n";
		echo $this->_build_menu();
		echo "	<div id=\"page\">\n";
		echo "		<div id=\"left_menu\">\n";
		echo $this->submenu;
		echo $this->sidebar;
		echo "		</div>\n";
		echo "		<div id=\"content\">\n";
		echo "			<div class=\"breadcrumb\">\n";
		echo $this->_generate_breadcrumb();
		echo "			</div>\n";
		echo "           <div id=\"inner\">\n";
		if(isset($admin_session['data']['flash_message']) && $admin_session['data']['flash_message'])
		{
			$message = $admin_session['data']['flash_message']['message'];
			$type = $admin_session['data']['flash_message']['type'];
			echo "<div id=\"flash_message\" class=\"{$type}\">\n";
			echo "{$message}\n";
			echo "</div>\n";
			update_admin_session('flash_message', '');
		}

		if(!empty($this->extra_messages) && is_array($this->extra_messages))
		{
			foreach($this->extra_messages as $message)
			{
				switch($message['type'])
				{
					case 'success':
					case 'error':
						echo "<div id=\"flash_message\" class=\"{$message['type']}\">\n";
						echo "{$message['message']}\n";
						echo "</div>\n";
						break;
					default:
						$this->output_error($message['message']);
						break;
				}
			}
		}

		if($this->show_post_verify_error == true)
		{
			$this->output_error($lang->invalid_post_verify_key);
		}
	}

	/**
	 * Output the page footer.
	 */
	
	function output_footer($quit=true)
	{
		global $mybb, $maintimer, $db, $lang, $plugins;

		$args = array(
			'this' => &$this,
			'quit' => &$quit,
		);

		$plugins->run_hooks("admin_page_output_footer", $args);

		$memory_usage = get_friendly_size(get_memory_usage());

		$totaltime = format_time_duration($maintimer->stop());
		$querycount = $db->query_count;

		if(my_strpos(getenv("REQUEST_URI"), "?"))
		{
			$debuglink = htmlspecialchars_uni(getenv("REQUEST_URI")) . "&amp;debug=1#footer";
		}
		else
		{
			$debuglink = htmlspecialchars_uni(getenv("REQUEST_URI")) . "?debug=1#footer";
		}

		echo "			</div>\n";
		echo "		</div>\n";
		echo "	<br style=\"clear: both;\" />";
		echo "	<br style=\"clear: both;\" />";
		echo "	</div>\n";
		echo "<div id=\"footer\"><p class=\"generation\">".$lang->sprintf($lang->generated_in, $totaltime, $debuglink, $querycount, $memory_usage)."</p><p class=\"powered\">Powered By <a href=\"http://www.mybb.com/\" target=\"_blank\">MyBB</a>, &copy; 2002-".COPY_YEAR." <a href=\"http://www.mybb.com/\" target=\"_blank\">MyBB Group</a> All Rights Reserved.&nbsp;&nbsp;Theme \"Responsive ACP Tutorial\" created by<a href=\"https://community.mybb.com/user-84715.html\" target=\"_blank\"><b>iAndrew</b></a>.</p></div>&nbsp;&amp;&nbsp;<a href=\"http://community.mybb.com/user-6029.html\" target=\"_blank\"><b>Vintagedaddyo</b></a>\n";
		if($mybb->debug_mode)
		{
			echo $db->explain;
		}
		echo "</div>\n";
		echo "</body>\n";
		echo "</html>\n";

		if($quit != false)
		{
			exit;
		}
	}
}

class SidebarItem extends DefaultSidebarItem
{
}

class PopupMenu extends DefaultPopupMenu
{
}

class Table extends DefaultTable
{
}

class Form extends DefaultForm
{
}

class FormContainer extends DefaultFormContainer
{
}
(2019-08-19, 12:52 AM)vintagedaddyo Wrote: [ -> ]
(2019-07-28, 03:14 AM)iAndrew Wrote: [ -> ]Upload style.php in your FTP > Admin > Default folder

Just an observation but fyi, I was wondering if you have noticed yet that the way you have included your partial header, successfully breaks the modal in acp?

* but adding the entire header inside the function rather than outside the function with only a partial does not:

class Page extends DefaultPage
 code -
}

I hadn't noticed it. The last time I tested this the modal worked fine on my tablet and phone.

Is the code above for style.php? I did update the CSS so now it works much better than the original code so maybe something from that broke it.
(2019-08-19, 01:01 AM)iAndrew Wrote: [ -> ]
(2019-08-19, 12:52 AM)vintagedaddyo Wrote: [ -> ]
(2019-07-28, 03:14 AM)iAndrew Wrote: [ -> ]Upload style.php in your FTP > Admin > Default folder

Just an observation but fyi, I was wondering if you have noticed yet that the way you have included your partial header, successfully breaks the modal in acp?

* but adding the entire header inside the function rather than outside the function with only a partial does not:

class Page extends DefaultPage
 code -
}

I hadn't noticed it. The last time I tested this the modal worked fine on my tablet and phone.

Is the code above for style.php? I did update the CSS so now it works much better than the original code so maybe something from that broke it.


it breaks because it is not in the actual default page class function at least in the file you suggest to download, it is included outside of it  ie: outside of {} rather than {inside}
so yeah it does load but it is only loading what you told it too, ie: not modal.css i do not know if it is only because it is outside the brackets or also because it is only echoing part of the header, I did not take the time to mess with it and simple, said hmm, why not add the full header inside the brackets to see if that solves that, of which it quickly did, hence why I figured to let you know

As you can see from your style.php provided:
<?php
/**
 * This is an example style file for Admin CP styles.
 *
 * It allows you to override our existing layout generation
 * classes with your own to further customise the Admin CP
 * layout beyond CSS.
 *
 * Your class name      Should extend
 * ---------------      -------------
 * Page                 DefaultPage
 * SidebarItem          DefaultSidebarItem
 * PopupMenu            DefaultPopupMenu
 * Table                DefaultTable
 * Form                 DefaultForm
 * FormContainer        DefaultFormContainer
 *
 * For example, to output your own custom header:
 *
 * class Page extends DefaultPage
 * {
 *   function output_header($title)
 *   {
 *      echo "<h1>{$title}</h1>";
 *   }
 * }
 *
 */

// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

class Page extends DefaultPage
{
	function _generate_breadcrumb()
	{
		if(!is_array($this->_breadcrumb_trail))
		{
			return false;
		}
		$trail = "";
		foreach($this->_breadcrumb_trail as $key => $crumb)
		{
			if($this->_breadcrumb_trail[$key+1])
			{
				$trail .= "<a href=\"".$crumb['url']."\">".$crumb['name']."</a>";
				if($this->_breadcrumb_trail[$key+2])
				{
					$trail .= " &raquo; ";
				}
			}
			else
			{
				$trail .= " &raquo; <span class=\"active\">".$crumb['name']."</span>";
			}
		}
		return $trail;
	}
}

		echo "<!DOCTYPE html>\n";
		echo "<html>\n";
		echo "<head>\n";
		echo "	<title>".$title."</title>\n";
        echo "  <meta charset=\"UTF-8\">\n";
        echo "  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n";
		echo "	<meta name=\"author\" content=\"MyBB Group\">\n";
		echo "	<meta name=\"copyright\" content=\"Copyright ".COPY_YEAR." MyBB Group.\">\n";

class SidebarItem extends DefaultSidebarItem
{
}

class PopupMenu extends DefaultPopupMenu
{
}

class Table extends DefaultTable
{
}

class Form extends DefaultForm
{
}

class FormContainer extends DefaultFormContainer
{
}
* as you can see it is outside the default page function and causes the modal to break and load on bottom the minute the partial header is loaded

But when I  change your style.php like so:

<?php
/**
 *
 * MyBB: Responsive - Admin CP (Tutorial)
 *
 * Filename: style.php
 *
 * Style Author: iAndrew & Vintagedaddyo
 *
 * iA Site: https://community.mybb.com/user-84715.html
 * V Site: http://community.mybb.com/user-6029.html
 *
 * MyBB Version: 1.8.x
 *
 * Style Version: 1.0
 * 
 */

// Disallow direct access to this file for security reasons

if(!defined("IN_MYBB"))
{
	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

class Page extends DefaultPage
{

	/**
	 * Output the page breadcrumb.
	 *
	 */

	function _generate_breadcrumb()
	{
		if(!is_array($this->_breadcrumb_trail))
		{
			return false;
		}
		$trail = "";
		foreach($this->_breadcrumb_trail as $key => $crumb)
		{
			if($this->_breadcrumb_trail[$key+1])
			{
				$trail .= "<a href=\"".$crumb['url']."\">".$crumb['name']."</a>";
				if($this->_breadcrumb_trail[$key+2])
				{
					$trail .= " &raquo; ";
				}
			}
			else
			{
				$trail .= " &raquo; <span class=\"active\">".$crumb['name']."</span>";
			}
		}
		return $trail;
	}

	/**
	 * Output the page header.
	 *
	 */
	
	function output_header($title="")
	{
		global $mybb, $admin_session, $lang, $plugins;

		$args = array(
			'this' => &$this,
			'title' => &$title,
		);

		$plugins->run_hooks("admin_page_output_header", $args);

		if(!$title)
		{
			$title = $lang->mybb_admin_panel;
		}

		$rtl = "";
		if($lang->settings['rtl'] == 1)
		{
			$rtl = " dir=\"rtl\"";
		}

		echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
		echo "<html xmlns=\"http://www.w3.org/1999/xhtml\"{$rtl}>\n";
		echo "<head profile=\"http://gmpg.org/xfn/1\">\n";
		echo "	<title>".$title."</title>\n";
        echo "  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n";		
		echo "	<meta name=\"author\" content=\"MyBB Group\" />\n";
		echo "	<meta name=\"copyright\" content=\"Copyright ".COPY_YEAR." MyBB Group.\" />\n";
		echo "	<link rel=\"stylesheet\" href=\"styles/".$this->style."/main.css?ver=1813\" type=\"text/css\" />\n";
		echo "	<link rel=\"stylesheet\" href=\"styles/".$this->style."/modal.css?ver=1813\" type=\"text/css\" />\n";

		// Load stylesheet for this module if it has one

		if(file_exists(MYBB_ADMIN_DIR."styles/{$this->style}/{$this->active_module}.css"))
		{
			echo "	<link rel=\"stylesheet\" href=\"styles/{$this->style}/{$this->active_module}.css\" type=\"text/css\" />\n";
		}

		echo "	<script type=\"text/javascript\" src=\"../jscripts/jquery.js?ver=1821\"></script>\n";
		echo "	<script type=\"text/javascript\" src=\"../jscripts/jquery.plugins.min.js?ver=1821\"></script>\n";
		echo "	<script type=\"text/javascript\" src=\"../jscripts/general.js?ver=1821\"></script>\n";
		echo "	<script type=\"text/javascript\" src=\"./jscripts/admincp.js?ver=1821\"></script>\n";
		echo "	<script type=\"text/javascript\" src=\"./jscripts/tabs.js\"></script>\n";

		echo "	<link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.min.css\" />\n";
		echo "	<link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.structure.min.css\" />\n";
		echo "	<link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.theme.min.css\" />\n";
		echo "	<script src=\"jscripts/jqueryui/js/jquery-ui.min.js?ver=1813\"></script>\n";

		// Stop JS elements showing while page is loading (JS supported browsers only)
		echo "  <style type=\"text/css\">.popup_button { display: none; } </style>\n";
		echo "  <script type=\"text/javascript\">\n".
				"//<![CDATA[\n".
				"	document.write('<style type=\"text/css\">.popup_button { display: inline; } .popup_menu { display: none; }<\/style>');\n".
                "//]]>\n".
                "</script>\n";

		echo "	<script type=\"text/javascript\">
//<![CDATA[
var loading_text = '{$lang->loading_text}';
var cookieDomain = '{$mybb->settings['cookiedomain']}';
var cookiePath = '{$mybb->settings['cookiepath']}';
var cookiePrefix = '{$mybb->settings['cookieprefix']}';
var cookieSecureFlag = '{$mybb->settings['cookiesecureflag']}';
var imagepath = '../images';

lang.unknown_error = \"{$lang->unknown_error}\";
lang.saved = \"{$lang->saved}\";
//]]>
</script>\n";
		echo $this->extra_header;
		echo "</head>\n";
		echo "<body>\n";
		echo "<div id=\"container\">\n";
		echo "	<div id=\"logo\"><h1><span class=\"invisible\">{$lang->mybb_admin_cp}</span></h1></div>\n";
		$username = htmlspecialchars_uni($mybb->user['username']);
		echo "	<div id=\"welcome\"><span class=\"logged_in_as\">{$lang->logged_in_as} <a href=\"index.php?module=user-users&amp;action=edit&amp;uid={$mybb->user['uid']}\" class=\"username\">{$username}</a></span> | <a href=\"{$mybb->settings['bburl']}\" target=\"_blank\" class=\"forum\">{$lang->view_board}</a> | <a href=\"index.php?action=logout&amp;my_post_key={$mybb->post_code}\" class=\"logout\">{$lang->logout}</a></div>\n";
		echo $this->_build_menu();
		echo "	<div id=\"page\">\n";
		echo "		<div id=\"left_menu\">\n";
		echo $this->submenu;
		echo $this->sidebar;
		echo "		</div>\n";
		echo "		<div id=\"content\">\n";
		echo "			<div class=\"breadcrumb\">\n";
		echo $this->_generate_breadcrumb();
		echo "			</div>\n";
		echo "           <div id=\"inner\">\n";
		if(isset($admin_session['data']['flash_message']) && $admin_session['data']['flash_message'])
		{
			$message = $admin_session['data']['flash_message']['message'];
			$type = $admin_session['data']['flash_message']['type'];
			echo "<div id=\"flash_message\" class=\"{$type}\">\n";
			echo "{$message}\n";
			echo "</div>\n";
			update_admin_session('flash_message', '');
		}

		if(!empty($this->extra_messages) && is_array($this->extra_messages))
		{
			foreach($this->extra_messages as $message)
			{
				switch($message['type'])
				{
					case 'success':
					case 'error':
						echo "<div id=\"flash_message\" class=\"{$message['type']}\">\n";
						echo "{$message['message']}\n";
						echo "</div>\n";
						break;
					default:
						$this->output_error($message['message']);
						break;
				}
			}
		}

		if($this->show_post_verify_error == true)
		{
			$this->output_error($lang->invalid_post_verify_key);
		}
	}

	/**
	 * Output the page footer.
	 */
	
	function output_footer($quit=true)
	{
		global $mybb, $maintimer, $db, $lang, $plugins;

		$args = array(
			'this' => &$this,
			'quit' => &$quit,
		);

		$plugins->run_hooks("admin_page_output_footer", $args);

		$memory_usage = get_friendly_size(get_memory_usage());

		$totaltime = format_time_duration($maintimer->stop());
		$querycount = $db->query_count;

		if(my_strpos(getenv("REQUEST_URI"), "?"))
		{
			$debuglink = htmlspecialchars_uni(getenv("REQUEST_URI")) . "&amp;debug=1#footer";
		}
		else
		{
			$debuglink = htmlspecialchars_uni(getenv("REQUEST_URI")) . "?debug=1#footer";
		}

		echo "			</div>\n";
		echo "		</div>\n";
		echo "	<br style=\"clear: both;\" />";
		echo "	<br style=\"clear: both;\" />";
		echo "	</div>\n";
		echo "<div id=\"footer\"><p class=\"generation\">".$lang->sprintf($lang->generated_in, $totaltime, $debuglink, $querycount, $memory_usage)."</p><p class=\"powered\">Powered By <a href=\"http://www.mybb.com/\" target=\"_blank\">MyBB</a>, &copy; 2002-".COPY_YEAR." <a href=\"http://www.mybb.com/\" target=\"_blank\">MyBB Group</a> All Rights Reserved.&nbsp;&nbsp;Theme \"Responsive ACP Tutorial\" created by<a href=\"https://community.mybb.com/user-84715.html\" target=\"_blank\"><b>iAndrew</b></a>.</p></div>&nbsp;&amp;&nbsp;<a href=\"http://community.mybb.com/user-6029.html\" target=\"_blank\"><b>Vintagedaddyo</b></a>\n";
		if($mybb->debug_mode)
		{
			echo $db->explain;
		}
		echo "</div>\n";
		echo "</body>\n";
		echo "</html>\n";

		if($quit != false)
		{
			exit;
		}
	}
}

class SidebarItem extends DefaultSidebarItem
{
}

class PopupMenu extends DefaultPopupMenu
{
}

class Table extends DefaultTable
{
}

class Form extends DefaultForm
{
}

class FormContainer extends DefaultFormContainer
{
}

* the issue with the modal now corrects itself
Pages: 1 2