newbie is stuck on module.xml format
Posted: Tue Aug 28, 2007 5:08 am
I'm running myself in circles. I've followed the hello world example and the one thing it leaves out is what to do with images that you need to place.
How does it know where to put them. I ASSUME you must tell it to put them using the directive followed by the path/filename then
but thats just a guess.
What I'm trying to do is create a secondary set of "quickicons" that will be a subset of the main set. In otherwords the original quickicons will still be there but mine will follow afterwards. I've modified my .xml and .php to account for this.
I think I've got everything worked out but still am confused on this point.
Could someone please help me out.
The only other option I know of would be to unpublish the original mod_quickicon.php file and publish mine all during the install.
Please give me some pointers.
Here is my code....
.xml file =
and then my .php is...
Again, thanks in advance. I anxiously awaity your guidance.
How does it know where to put them. I ASSUME you must tell it to put them using the
but thats just a guess.
What I'm trying to do is create a secondary set of "quickicons" that will be a subset of the main set. In otherwords the original quickicons will still be there but mine will follow afterwards. I've modified my .xml and .php to account for this.
I think I've got everything worked out but still am confused on this point.
Could someone please help me out.
The only other option I know of would be to unpublish the original mod_quickicon.php file and publish mine all during the install.
Please give me some pointers.
Here is my code....
.xml file =
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<mosinstall type="module" client="administrator">
<name>VM Quick Icons</name>
<author>N6REJ</author>
<creationDate>August 27, 2007</creationDate>
<copyright>(C) 2005 Open Source Matters. All rights reserved.</copyright>
<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.n6rej.com</authorUrl>
<version>1.0.0</version>
<description>This module shows the Virtuemart quickicon buttons in the Admin homepage or `Control Panel`</description>
<files>
<filename module="mod_vmquickicon">mod_vmquickicon.php</filename>
<filename images/shop_customers.png</filename>
<filename images/shop_products.png</filename>
<filename images/shop_orders.png</filename>
</files>
<params>
<param name="securitycheck" type="radio" default="1" label="Security Check" description="Select whether to show the Security Check warning">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
</params>
</mosinstall>
and then my .php is...
Code: Select all
<?php
/**
* @version $Id: mod_quickicon.php 5571 2006-10-26 05:20:13Z Saka $
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
if (!defined( '_JOS_VMQUICKICON_MODULE' )) {
/** ensure that functions are declared only once */
define( '_JOS_VMQUICKICON_MODULE', 1 );
function quickiconButton( $link, $image, $text ) {
?>
<div style="float:left;">
<div class="icon">
<a href="<?php echo $link; ?>">
<?php echo mosAdminMenus::imageCheckAdmin( $image, '/administrator/images/', NULL, NULL, $text ); ?>
<span><?php echo $text; ?></span>
</a>
</div>
</div>
<?php
}
$securitycheck = intval( $params->get( 'securitycheck', 1 ) );
?>
<div id="cpanel">
<?php
$link = 'index2.php?option=com_joomlaxplorer';
quickiconButton( $link, 'jxplorer.png', 'JoomlaXplorer' );
$link = 'index2.php?option=com_virtuemart';
quickiconButton( $link, 'vm_logo.gif', 'Store' );
$link = 'index2.php?pshop_mode=admin&page=admin.user_list&option=com_virtuemart';
quickiconButton( $link, 'shop_users.png', 'Customers' );
$link = 'index2.php?pshop_mode=admin&page=order.order_list&option=com_virtuemart';
quickiconButton( $link, 'shop_orders.png', 'Orders' );
$link = 'index2.php?pshop_mode=admin&page=product.product_list&option=com_virtuemart';
quickiconButton( $link, 'shop_products.png', 'Products' );
$link = 'index2.php?pshop_mode=admin&page=product.product_category_list&option=com_virtuemart';
quickiconButton( $link, 'shop_categories.png', 'Categories' );
if ($securitycheck) {
// show security setting check
josSecurityCheck('88%');
}
?>
</div>
<div style="clear:both;"> </div>
<?php
}
?>
Again, thanks in advance. I anxiously awaity your guidance.