ancora non sono riuscito a risolvere il problema e torno ad implorare aiuto, stavolta sarò pero piu diretto perche se no non ci capiamo allora
posto il codice che ho modificato fino ad adesso di form.php ovvero il componente che permette di inviare articoli all'utente dal lato sito
<?php // no direct access
defined('_JEXEC') or die('Restricted access');
$config =& JFactory::getConfig();
$publish_up =& JFactory::getDate($this->article->publish_up);
$publish_up->setOffset($config->getValue('config.offset'));
$publish_up = $publish_up->toFormat();
$datamorte =& JFactory::getDate($this->article->datamorte);
$datamorte->setOffset($config->getValue('config.offset'));
$datamorte = $datamorte->toFormat();
if (! isset($this->article->publish_down) || $this->article->publish_down == 'Never') {
$publish_down = JText::_('Never');
} else {
$publish_down =& JFactory::getDate($this->article->publish_down);
$publish_down->setOffset($config->getValue('config.offset'));
$publish_down = $publish_down->toFormat();
}
?>
<script language="javascript" type="text/javascript">
<!--
function setgood() {
// TODO: Put setGood back
return true;
}
var sectioncategories = new Array;
<?php
$i = 0;
foreach ($this->lists['sectioncategories'] as $k=>$items) {
foreach ($items as $v) {
echo "sectioncategories[".$i++."] = new Array( '$k','".addslashes( $v->id )."','".addslashes( $v->title )."' );\n\t\t";
}
}
?>
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
try {
form.onsubmit();
} catch(e) {
alert(e);
}
// do field validation
var text = <?php echo $this->editor->getContent( 'text' ); ?>
if (form.title.value == '') {
return alert ( "<?php echo JText::_( 'Article must have a title', true ); ?>" );
} else if (text == '') {
return alert ( "<?php echo JText::_( 'Article must have some text', true ); ?>");
} else if (parseInt('<?php echo $this->article->sectionid;?>')) {
// for articles
if (form.catid && getSelectedValue('adminForm','catid') < 1) {
return alert ( "<?php echo JText::_( 'Please select a category', true ); ?>" );
}
}
<?php echo $this->editor->save( 'text' ); ?>
submitform(pressbutton);
}
//-->
</script>
<?php if ($this->params->get('show_page_title', 1)) : ?>
<div class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>"><?php echo $this->escape($this->params->get('titolo articolo nn visualizzato')); ?></div>
<?php endif; ?>
<form action="<?php echo $this->action ?>" method="post" name="adminForm" onSubmit="setgood();">
<fieldset>
<legend><?php echo JText::_('Ricorda il tuo Caro'); ?></legend>
<table class="" width="100%">
<tr>
<td>
<div style="float: left;">
<label for="title"> Nome e Cognome defunto
</label>
<input class="inputbox" type="text" id="title" name="title" size="50" maxlength="100" value="<?php echo $this->escape($this->article->title); ?>" />
<input class="inputbox" type="hidden" id="alias" name="alias" value="<?php echo $this->escape($this->article->alias); ?>" />
</div>
</td>
</tr>
</table>
<td class="key">
<label for="datanascita">
<?php echo JText::_( 'Inserisci la data di nascita del defunto' ); ?>
</label>
</td>
<td>
<?php echo JHTML::_('calendar', $datanascita, 'datanascita', 'datanascita', '%Y-%m-%d ', array('class'=>'inputbox', 'size'=>'25', 'maxlength'=>'19')); ?>
</td>
<br>
<td class="key">
<label for="datamorte">
<?php echo JText::_( 'Inserisci la data di morte del defunto' ); ?>
</label>
</td>
<td>
<?php echo JHTML::_('calendar', $datamorte, 'datamorte', 'datamorte', '%Y-%m-%d ', array('class'=>'inputbox', 'size'=>'25', 'maxlength'=>'19')); ?>
</td>
<p>
<?php
echo $this->editor->display('text', $this->article->text, '100%', '400', '70', '15');
?>
</p>
<p><div style="float: right;">
<button type="button" onclick="submitbutton('save')">
<?php echo JText::_('Inserisci') ?>
</button>
<button type="button" onclick="submitbutton('cancel')">
<?php echo JText::_('Rimuovi') ?>
</button>
</div></p>
</fieldset>
<fieldset>
<label for="sectionid">
</label>
<?php echo $this->get('id'); ?>
<label for="catid">
</label>
<?php echo $this->get('id'); ?>
<?php if ($this->user->authorize('com_content', 'publish', 'content', 'all')) : ?>
<label for="state">
</label>
<?php echo $this->get('id'); ?>
<?php endif; ?>
<label for="publish_up">
<?php JText::_( 'Start Publishing' ); ?></label>
<?php JHTML::_('calendar', $publish_up, 'publish_up', 'publish_up', '%Y-%m-%d %H:%M:%S', array('class'=>'inputbox', 'size'=>'25', 'maxlength'=>'19')); ?>
<label for="publish_down">
<?php JText::_( 'Finish Publishing' ); ?></label>
<?php JHTML::_('calendar', $publish_down, 'publish_down', 'publish_down', '%Y-%m-%d %H:%M:%S', array('class'=>'inputbox', 'size'=>'25', 'maxlength'=>'19')); ?>
<label for="access">
</label>
<?php echo $this->get('id'); ?>
</fieldset>
<input type="hidden" name="option" value="com_content" />
<input type="hidden" name="id" value="<?php echo $this->article->id; ?>" />
<input type="hidden" name="version" value="<?php echo $this->article->version; ?>" />
<input type="hidden" name="created_by" value="<?php echo $this->article->created_by; ?>" />
<input type="hidden" name="referer" value="<?php echo str_replace(array('"', '<', '>', "'"), '', @$_SERVER['HTTP_REFERER']); ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
<input type="hidden" name="task" value="" />
</form>