jDownloadsownloads.com



Author Topic: Direct download in module  (Read 5202 times)

0 Members and 1 Guest are viewing this topic.

Offline manuelkuhs

  • Newbie
  • *
  • Posts: 16
Direct download in module
« on: 29.03.2013 11:27:22 »
Hi,

Currently the modules Latest, Top, etc allow either links to the detail page or to the category - but is it possible to make them direct download links instead? This would be really great!

Offline Arno

  • Administrator
  • ***
  • Posts: 12.239
    • jDownloads.com
Re: Direct download in module
« Reply #1 on: 30.03.2013 10:48:32 »
Hi,
only when you have used this option activated also for the component self - see jD configuration.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline manuelkuhs

  • Newbie
  • *
  • Posts: 16
Re: Direct download in module
« Reply #2 on: 30.03.2013 12:30:24 »
Hi Arno,

I have direct download links enabled in the component and that works perfectly fine. However, in modules I can only link to the category or to the detail page - but not to direct download link. In fact, with direct download links enabled in the configuration, the only way I get the download detail page is through the module - even though I don't want the download detail page to ever be seen!

Offline Arno

  • Administrator
  • ***
  • Posts: 12.239
    • jDownloads.com
Re: Direct download in module
« Reply #3 on: 02.04.2013 14:11:12 »
If so, then it seems that you must change the builded link in the module.

- activate the details view option in module settings
- open the default.php and search this:

Code: [Select]
// create the link
            if ($detail_view == '1'){
$link = 'index.php?option='.$option.'&Itemid='.$Itemid.'&view=viewdownload&catid='.$files[$i]->cat_id.'&cid='.$files[$i]->file_id; 

change it to:

Code: [Select]
// create the link
            if ($detail_view == '1'){
$link = 'index.php?option='.$option.'&Itemid='.$Itemid.'&view=finish&catid='.$files[$i]->cat_id.'&cid='.$files[$i]->file_id;
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline manuelkuhs

  • Newbie
  • *
  • Posts: 16
Re: Direct download in module
« Reply #4 on: 02.04.2013 14:47:16 »
Perfect that worked! Thank you!!

I presume that updates will remove this though?

Perhaps it would make sense to add a further line of code to the modules so that if Details page is disabled in the general JDownloads settings then the modules don't go to the Details page either but to the direct download?

Offline Arno

  • Administrator
  • ***
  • Posts: 12.239
    • jDownloads.com
Re: Direct download in module
« Reply #5 on: 02.04.2013 15:10:21 »
Quote
I presume that updates will remove this though?
Yes.

Quote
Perhaps it would make sense to add a further line of code to the modules so that if Details page is disabled in the general JDownloads settings then the modules don't go to the Details page either but to the direct download?
Yes, this is useful. But i have current not the time to change it for all the modules.  ::)
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline manuelkuhs

  • Newbie
  • *
  • Posts: 16
Re: Direct download in module
« Reply #6 on: 02.04.2013 15:16:36 »
OK thanks anyway!

Offline lovelycows

  • Newbie
  • *
  • Posts: 25
Re: Direct download in module
« Reply #7 on: 15.04.2014 10:34:09 »
If so, then it seems that you must change the builded link in the module.

- activate the details view option in module settings
- open the default.php and search this:

Code: [Select]
// create the link
            if ($detail_view == '1'){
$link = 'index.php?option='.$option.'&Itemid='.$Itemid.'&view=viewdownload&catid='.$files[$i]->cat_id.'&cid='.$files[$i]->file_id; 

change it to:

Code: [Select]
// create the link
            if ($detail_view == '1'){
$link = 'index.php?option='.$option.'&Itemid='.$Itemid.'&view=finish&catid='.$files[$i]->cat_id.'&cid='.$files[$i]->file_id;

I cannot find the default.php and there are no settings possible in my module in Joomla???

Thank you!

Offline Arno

  • Administrator
  • ***
  • Posts: 12.239
    • jDownloads.com
Re: Direct download in module
« Reply #8 on: 15.04.2014 10:49:08 »
You used a other jD version.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!