Niente nemmeno cosi

posto il codice di tutta la pagina.

codice:
<?php


// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );


jimport( 'joomla.plugin.plugin' );


 */#Parametri delle Impostazioni Plugin
$address = $params->get('address');
$text = $params->get('text');

class plgButtonReadmore2 extends JPlugin
{
	/**
	 * Constructor
	function plgButtonReadmore2(& $subject, $config)
	{
		parent::__construct($subject, $config);
	}

	/**
	 * readmore button
	 * @return array A two element array of ( imageName, textToInsert )
	 */
	function onDisplay($name)
	{
		global $mainframe;

		$doc 		=& JFactory::getDocument();
		$template 	= $mainframe->getTemplate();

		// button is not active in specific content components
		$getContent = $this->_subject->getContent($name);
		$present = JText::_('ALREADY EXISTS', true) ;
		$js = "
			function insertReadmore2(editor) {
				var content = $getContent;
				var address = "<?php echo $address; ?>";
				var text = "<?php echo $text; ?>";

				jInsertEditorText('{pub}
"'+text+'"{/pub}', editor);

				
			}
			
			";

		$doc->addScriptDeclaration($js);

		$button = new JObject();
		$button->set('modal', false);
		$button->set('onclick', 'insertReadmore2(\''.$name.'\');return false;');
		$button->set('text', JText::_('Testo Pub'));
		$button->set('name', 'readmore2');
		// TODO: The button writer needs to take into account the javascript directive
		//$button->set('link', 'javascript:void(0)');
		$button->set('link', '#');

		return $button;
	}
}