Ci sono riuscito, ecco come, ma se voglio passare più parametri come faccio?
mod_myshoutbo.xml
<?xml version="1.0" encoding="utf-8"?>
<install type="module" version="1.5.0">
<name>MyShoutBox!</name>
<author>Enzo</author>
<version>1.5.0</version>
<description>MyShoutBox</description>
<files>
<filename module="mod_myshoutbox">mod_myshoutbox.php</filename>
<filename>index.html</filename>
<filename>helper.php</filename>
<filename>tmpl/default.php</filename>
<filename>tmpl/index.html</filename>
</files>
<params>
<param name="mycode" type="text" default="" label="Code" description="PARAMTEXT" />
</params>
</install>
mod_myshoutbo.php
<?php
/**
* Hello World! Module Entry Point
*
* @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' );
$mycode = $params->get('mycode', JText::_('search...'));
$myshoutbox = modMyShoutBoxHelper::getMyShoutBox( $mycode );
require( JModuleHelper::getLayoutPath( 'mod_myshoutbox' ) );
default.php su cartella tmpl
<?php // no direct access
defined( '_JEXEC' ) or die( 'Restricted access' ); ?>
<?php echo $myshoutbox; ?>
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.
*/
class modMyShoutBoxHelper
{
/**
* Retrieves the hello message
*
* @param array $params An object containing the module parameters
* @access public
*/
function getMyShoutBox( $mycode )
{
// Test Parametro echo "eeee".$mycode;
return '<iframe src="http://'.$mycode.'.myshoutbox.com/" width="160" height="600" frameborder="1" allowTransparency="true"></iframe>';
}
}