Page 1 of 2

Most Downloaded Files

Posted: 09 Oct 2012, 09:31
by Hottinger
Hello, I have in Version 2.1.7 activated Most Downloaded Files, but I don't see the Files in my Kategoryview.
Thank you for help.

Re: Most Downloaded Files

Posted: 10 Oct 2012, 23:28
by Jan
Hi, most downloaded files are displayed only in Categories View (see the description of this parameter)

Jan

Re: Most Downloaded Files

Posted: 20 Feb 2013, 17:40
by escalderon
Is there a way to point the link directly to the file instead of the category?

Re: Most Downloaded Files

Posted: 21 Feb 2013, 13:27
by Jan
Hi, then you need to customize the link:

instead of: PhocaDownloadHelperRoute::getCategoryRoute in
components\com_phocadownload\views\categories\tmpl\default.php
you should add the link directly to file.

Jan

Re: Most Downloaded Files

Posted: 19 Oct 2013, 01:36
by brentwilliams2
"you should add the link directly to file."

Jan, what is the code to link directly to the file?

Thanks!

Re: Most Downloaded Files

Posted: 21 Oct 2013, 18:26
by Jan
Hi, directly means - you just copy the link from frontend and you will paste it there as link. Or you can try to change it to File view, from PhocaDownloadHelperRoute::getCategoryRoute to PhocaDownloadHelperRoute::getFileRoute (but File View needs to be enabled) and of course it depends on if the file should be displayed in file view or should be directly downloaded.

Jan

Re: Most Downloaded Files

Posted: 23 Oct 2013, 00:49
by brentwilliams2
Hi Jan,

Thanks, that got me part of the way.

I changed this:

Code: Select all

JRoute::_(PhocaDownloadHelperRoute::getCategoryRoute($value->categoryid,$value->categoryalias))
To this:

Code: Select all

JRoute::_(PhocaDownloadHelperRoute::getFileRoute($value->id,$value->alias))
The only thing that does not seem to work is the alias part. Any ideas?

Re: Most Downloaded Files

Posted: 27 Oct 2013, 00:24
by Jan
Hi, the second parameter is not alias but category id, see the function:
function getFileRoute($id, $catid = 0, $idAlias = '', $catidAlias = '', $sectionid = 0, $type = 'file')
1 ... file id
2 ... category id
3 ... file alias
4 ... category alias
5 ... 0 (set null as this is obsolete parameter) or leave empty
6 ... 'file' or leave empty

Jan

Re: Most Downloaded Files

Posted: 28 Oct 2013, 21:00
by brentwilliams2
Thanks! I changed it to this and it worked:

Code: Select all

JRoute::_(PhocaDownloadHelperRoute::getFileRoute($value->id,$value->categoryid,$value->alias))

Re: Most Downloaded Files

Posted: 29 Oct 2013, 19:42
by Jan
Ok