jDownloadsownloads.com


Author Topic: {file_pic} to act as the {url_download}  (Read 2917 times)

0 Members and 1 Guest are viewing this topic.

Offline cbaugher

  • Newbie
  • *
  • Posts: 10
{file_pic} to act as the {url_download}
« on: 07.01.2014 05:26:22 »
I am using the content plugin and I would like the have the {file_pic} linked so that it causes a direct download. This works in the category view with the component but not when I use the plugin to place it in an article. If possible I would like it to work when it is just the icon without and text as well. I only have the {file_pic} tag in my layout.

This was posted a couple of years ago but the attachment is no longer available and it was for Joomla 1.5.

Offline Arno

  • Administrator
  • ***
  • Posts: 12.305
    • jDownloads.com
Re: {file_pic} to act as the {url_download}
« Reply #1 on: 08.01.2014 11:32:48 »
Hi,
have you activated in the components configuration, to use the download title for the 'download' link? And also the direct download option?
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline cbaugher

  • Newbie
  • *
  • Posts: 10
Re: {file_pic} to act as the {url_download}
« Reply #2 on: 09.01.2014 14:25:13 »
Yes I have and it still does not link the icon in the content plugin. I do not know if this is the right way of doing it but I found a way to make it work. If there is a better way please let me know.

In the plugin/content/jdownloads/jdownloads.php file on line 855

changed:
$jd_file_pic = '<img src="'.JURI::base().$jDFPsfolders['file'].$p_Frow->file_pic.'" style="vertical-align:middle;" border="0" height="'.$jlistConfigM['file.pic.size'].'" width="'.$jlistConfigM['file.pic.size'].'" alt="" title="" />';

to:
$jd_titel_link = jd_SefRel('index.php?option=com_jdownloads&amp;Itemid='.$cat_itemid.'&amp;view=finish&catid='.$p_Frow->cat_id.'&cid='.$p_Frow->file_id);
$jd_file_pic = '<a href="'.$jd_titel_link.'"><img src="'.JURI::base().$jDFPsfolders['file'].$p_Frow->file_pic.'" style="vertical-align:middle;" border="0" height="'.$jlistConfigM['file.pic.size'].'" width="'.$jlistConfigM['file.pic.size'].'" alt="" title="" /></a>';