The code which produces the main admin content is the following, within administrator/index2.php:
ob_start();
if ($path = $mainframe->getPath( 'admin' )) {
require_once ( $path );
} else {
?>
<img src="images/joomla_logo_black.jpg" border="0" alt="" />
<br />
<?php
}
$_MOS_OPTION['buffer'] = ob_get_contents();
ob_end_clean();
Output buffering is started, which is used to save the output in $_MOS_OPTION['buffer'], a global array. The output buffer is cleared (ie erased, without being sent to the browser) with ob_end_clean().
All the mosMainBody_Admin() function does is echo the contents of $_MOS_OPTION['buffer'].
For the main admin page, the $path variable is set to administrator/components/com_admin/admin.admin.php. For the virtuemart main page, it is set to /administrator/components/com_virtuemart/admin.virtuemart.php.
So, will it be possible to merge the above two files, to create a single admin interface?
When the admin first logs in, you have a grid of square buttons on the left, and some stats on the right. The page shows as index2.php in the address bar.
index2.php has the following structure:
- includes
- start session
- get option and task request params
- create mainframe object as new mosMainFrame
- get act, section, no_html and id request params
- use selected template's index.php
- show SQL queries if in debug mode
- if task param is 'save' or 'apply' redo session check
compton
11:24 am, Monday, 20 November 06
The home page should be the VirtueMart options normally displayed by clicking Store > Summary. To achieve this, I need to set appropriate default values for querystring parameters:
- pshop_mode=admin
- page=store.index
- option=com_virtuemart
As we know, the administrator/index2.php page is responsible for the content of the admin side. The index.php file which is chosen by the current template does the following actions: