Most Downloaded Files
-
- Phoca Newbie
- Posts: 4
- Joined: 09 Oct 2012, 09:03
Most Downloaded Files
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.
Thank you for help.
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Most Downloaded Files
Hi, most downloaded files are displayed only in Categories View (see the description of this parameter)
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 1
- Joined: 20 Feb 2013, 17:37
Re: Most Downloaded Files
Is there a way to point the link directly to the file instead of the category?
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Most Downloaded Files
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
instead of: PhocaDownloadHelperRoute::getCategoryRoute in
components\com_phocadownload\views\categories\tmpl\default.php
you should add the link directly to file.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 26
- Joined: 23 Aug 2009, 01:22
Re: Most Downloaded Files
"you should add the link directly to file."
Jan, what is the code to link directly to the file?
Thanks!
Jan, what is the code to link directly to the file?
Thanks!
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Most Downloaded Files
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
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 26
- Joined: 23 Aug 2009, 01:22
Re: Most Downloaded Files
Hi Jan,
Thanks, that got me part of the way.
I changed this:
To this:
The only thing that does not seem to work is the alias part. Any ideas?
Thanks, that got me part of the way.
I changed this:
Code: Select all
JRoute::_(PhocaDownloadHelperRoute::getCategoryRoute($value->categoryid,$value->categoryalias))
Code: Select all
JRoute::_(PhocaDownloadHelperRoute::getFileRoute($value->id,$value->alias))
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Most Downloaded Files
Hi, the second parameter is not alias but category id, see the function:
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
1 ... file idfunction getFileRoute($id, $catid = 0, $idAlias = '', $catidAlias = '', $sectionid = 0, $type = 'file')
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
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 26
- Joined: 23 Aug 2009, 01:22
Re: Most Downloaded Files
Thanks! I changed it to this and it worked:
Code: Select all
JRoute::_(PhocaDownloadHelperRoute::getFileRoute($value->id,$value->categoryid,$value->alias))
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact: