Joomla media doc link

Goal : display link to doc uploaded in Joomla media component to help copy/paste into article

Edit this file :administrator/components/com_media/views/medialist/tmpl/thumbs_doc.php

Put this :

<?php defined(‘_JEXEC’) or die(‘Restricted access’); ?>
<?php $params =& JComponentHelper::getParams(‘com_media’); ?>
<div>
<div>
<div align=”center”>
<a style=”display: block; width: 100%; height: 100%”>
<img border=”0″ src=”<?php echo $this->_tmp_doc->icon_32 ?>” alt=”<?php echo $this->_tmp_doc->name; ?>” />
</a>
</div>
<div>
<?php //echo “/”.$params->get($path, ‘images/stories’).’/’.$this->_tmp_doc->path_relative; ?>
</div>
</div>
<div>
<a href=”index.php?option=com_media&amp;task=file.delete&amp;tmpl=component&amp;<?php echo JUtility::getToken(); ?>=1&amp;folder=<?php echo $this->state->folder; ?>&amp;rm[]=<?php echo $this->_tmp_doc->name; ?>” rel=”<?php echo $this->_tmp_doc->name; ?>”><img src=”components/com_media/images/remove.png” width=”16″ height=”16″ border=”0″ alt=”<?php echo JText::_( ‘Delete’ ); ?>” /></a>
<input type=”checkbox” name=”rm[]” value=”<?php echo $this->_tmp_doc->name; ?>” />
</div>
<div>
<a href=”<?php echo “/”.$params->get($path, ‘images’).’/’.$this->_tmp_doc->path_relative; ?>”><?php echo $this->_tmp_doc->name; ?></a>
</div>

</div>

Leave a Reply

Your email address will not be published. Required fields are marked *