I'm posting a new question on this as the other one is long and I have printed it out, but it relates to image field which does not have the upload ability as yet.
As I need my users to upload the file, I would of necessity have to work with uploads field. I need, however, for this to display as an image in the article, with preset sizes.
I have copied the output file as follows with my reasoning on each aspect, and I would appreciate it if you could advise whether I'm correct or not.
files AS $i => $file):?>
**<tr class="cat-list-row<?php echo $k = 1 - $k; ?>">
<td width="1%"><?php echo $i+1;?></td>
<td>**
As I do not need a list of files I assume I can delete the above lines?
<a
<?php
$class = '';
**if($this->params->get('params.show_in_browser', 0))
**
I'm assuming that the above is actually where it begins the output instruction, and below offers the various options?
{
switch ($this->params->get('params.show_target', 0))
{
case 0:
echo ' target="_blank" ';
echo ' href="'.$file->url.'"';
break;
case 1:
echo ' onclick="popUpFile'.$this->id.'(\''.$file->url.'\');return false;" ';
echo ' href="javascript:void(0);"';
break;
case 2:
echo ' href="'.$file->url.'"';
$class = ' class="modal"';
break;
case 3:
echo ' href="'.$file->url.'"';
break;
}
}
else
{
echo ' target="_blank" ';
echo ' href="'.$file->url.'"';
}
?>
>
As the above options relate to showing the file once the link is clicked in the list, am I correct in saying that I do not need these?
My thought is that I should be rewriting echo ' href="'.$file->url.'"';
with whatever is needed to "convert" the attachment into an article image??
I have once again Googled extensively and cannot find the php needed to output an attachment (upload) file as an image and so once again I need a little assistance when you have a moment.
Again, as I do not need title, description, hits, etc, I suppose I could just delete the rest?
<?php echo ($this->params->get('params.allow_edit_title', 0) && $file->title ? $file->title : $file->realname);?>
</a>
<?php if($this->descr && $file->description):?>
<p><?php echo $file->description;?></p>
<?php endif;?>
</td>
<?php if($this->hits):?>
<td width="1%"><?php echo (int)$file->hits?></td>
<?php endif;?>
<?php if($this->size):?>
<td width="1%" nowrap="nowrap"><?php echo HTMLFormatHelper::formatSize($file->size);?></td>
<?php endif;?>
I'm posting a new question on this as the other one is long and I have printed it out, but it relates to image field which does not have the upload ability as yet.
As I need my users to upload the file, I would of necessity have to work with uploads field. I need, however, for this to display as an image in the article, with preset sizes.
I have copied the output file as follows with my reasoning on each aspect, and I would appreciate it if you could advise whether I'm correct or not.
files AS $i => $file):?>As I do not need a list of files I assume I can delete the above lines?
**
I'm assuming that the above is actually where it begins the output instruction, and below offers the various options?
As the above options relate to showing the file once the link is clicked in the list, am I correct in saying that I do not need these?
My thought is that I should be rewriting echo ' href="'.$file->url.'"';
with whatever is needed to "convert" the attachment into an article image??
I have once again Googled extensively and cannot find the php needed to output an attachment (upload) file as an image and so once again I need a little assistance when you have a moment.
Again, as I do not need title, description, hits, etc, I suppose I could just delete the rest?