I'm trying to edit the Frontend-User File located in:
\components\com_phocadownload\views\user\tmpl\default_files.php
and the other File which i think it would to the Datebase-Save-Action located in:
\components\com_phocadownload\views\user\view.html.php
For me, I need the ability to add the Publish Date and Unpublish Date as 2 additional Fields in Frontend-Form for the Users.
I add the following lines in
default_files.php near line 270
Code: Select all
<tr>
<td><strong>Begin:</strong></td>
<td><input size="10" type="text" id="phocadownload-upload-publish_up" name="phocadownloaduploadpublishup" value="<?php echo $this->formdata->publish_up ?>" maxlength="10" /></td>
</tr>
<tr>
<td><strong>End:</strong></td>
<td><input size="10" type="text" id="phocadownload-upload-publish_down" name="phocadownloaduploadpublishdown" value="<?php echo $this->formdata->publish_down ?>" maxlength="10" /></td>
</tr>
Code: Select all
<form onsubmit="return OnUploadSubmitFile();" action="<?php echo $this->t['actionamp'] ?>task=upload&<?php echo $this->session->getName().'='.$this->session->getId(); ?>&<?php echo JSession::getFormToken();?>=1" name="phocadownloaduploadform" id="phocadownload-upload-form" method="post" enctype="multipart/form-data">
near Line 101:
Code: Select all
$formData->set('publish_up','');
$formData->set('publish_down','');
Code: Select all
$post['publish_up'] = $app->input->get( 'phocadownloaduploadpublishup', '', 'string' );
$post['publish_down'] = $app->input->get( 'phocadownloaduploadpublishdown', '', 'string' );
Code: Select all
if ($post['publish_up'] != '') {$formData->set('publish_up', $post['publish_up']);}
if ($post['publish_down'] != '') {$formData->set('publish_down', $post['publish_down']);}
Unfortunately the publish_up and the publish_down will be submitted correctly in form but not be changed in database table jos_phocadownload.
The field publish_up is filled with the upload-Date and the field puplish_down is empty (0000-00-00 00:00:00); Even when the Fields are filled with custom Dates
Where can I find the file which do the save action and which lines did i need to edit for this?
This would be really great, if you can help me

Spoint