Allora io sto usando joomla 1.5.18 e ho scritto questo:
Nel .xml
<?xml version="1.0" encoding="utf-8"?>
<install type="module" version="1.5.18">
<name>Modulino Contatti</name>
<author>Arnica666</author>
<version>1.5.18</version>
<description>Il Modulino dei Contatti module.</description>
<files>
<filename module="mod_mocontact">mod_mcontact.php</filename>
<filename>index.html</filename>
<filename>helper.php</filename>
<filename>CSS/style.css</filename>
<filename>images/box.png</filename>
<filename>images/limail.png</filename>
<filename>images/header.png</filename>
<filename>tmpl/default.php</filename>
<filename>tmpl/index.html</filename>
</files>
<params>
<param name="count" type="text" default="5" label="Count" description="The number of items to display (default 5)" />
</params>
</install>
|________________________________________________________________________________|
Nel .php
<?php
/**
* Modulo che visualizza la stringa "Modulino Contatti!".
*
* @package Joomla.Tutorials
* @subpackage Modules
* @link
http://dev.joomla.org/component/option,com_jd-wiki/Itemid,31/id,tutorials:modules/ * @license GNU/GPL, see LICENSE.php
* mod_helloworld 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.
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only once
require_once (dirname(__FILE__).DS.'helper.php');
$list = modmcontanctHelper::getList($params);
require( JModuleHelper::getLayoutPath( 'mod_mcontact' ) );
|_____________________________________________________________________________|
Nel helper.php
<?php
/**
* Helper class for Hello World! module
*
* @package Joomla.Tutorials
* @subpackage Modules
* @link
http://dev.joomla.org/component/option,com_jd-wiki/Itemid,31/id,tutorials:modules/ * @license GNU/GPL, see LICENSE.php
* mod_helloworld 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.
*/
// no direct access
//defined('_JEXEC') or die('Restricted access');
//
//require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');
class modmcontanctHelper
{
/**
* Retrieves the hello message
*
* @param array $params An object containing the module parameters
* @access public
*/
function getList( $params )
{
return 'Modulino Contatti';
}
}
|______________________________________________________________________|
Grazie per la collaborazione!