Phoca
Phoca Seal

Most Downloaded Files

Most Downloaded Files

Postby Hottinger on 09 Oct 2012, 09:31

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.
Hottinger
Phoca Newbie
Phoca Newbie
 
Posts: 3
Joined: 09 Oct 2012, 09:03

Google Ads


Re: Most Downloaded Files

Postby Jan on 10 Oct 2012, 23:28

Hi, most downloaded files are displayed only in Categories View (see the description of this parameter)

Jan
If you find some Phoca extensions useful, please vote for them on: extensions.joomla.org
User avatar
Jan
Phoca Hero
Phoca Hero
 
Posts: 33202
Joined: 10 Nov 2007, 18:23
Location: Czech Republic

Re: Most Downloaded Files

Postby escalderon on 20 Feb 2013, 17:40

Is there a way to point the link directly to the file instead of the category?
escalderon
Phoca Newbie
Phoca Newbie
 
Posts: 1
Joined: 20 Feb 2013, 17:37

Re: Most Downloaded Files

Postby Jan on 21 Feb 2013, 13:27

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
If you find some Phoca extensions useful, please vote for them on: extensions.joomla.org
User avatar
Jan
Phoca Hero
Phoca Hero
 
Posts: 33202
Joined: 10 Nov 2007, 18:23
Location: Czech Republic

Re: Most Downloaded Files

Postby brentwilliams2 on 19 Oct 2013, 01:36

"you should add the link directly to file."

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

Thanks!
brentwilliams2
Phoca Member
Phoca Member
 
Posts: 23
Joined: 23 Aug 2009, 01:22

Re: Most Downloaded Files

Postby Jan on 21 Oct 2013, 18:26

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
If you find some Phoca extensions useful, please vote for them on: extensions.joomla.org
User avatar
Jan
Phoca Hero
Phoca Hero
 
Posts: 33202
Joined: 10 Nov 2007, 18:23
Location: Czech Republic

Re: Most Downloaded Files

Postby brentwilliams2 on 23 Oct 2013, 00:49

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?
brentwilliams2
Phoca Member
Phoca Member
 
Posts: 23
Joined: 23 Aug 2009, 01:22

Re: Most Downloaded Files

Postby Jan on 27 Oct 2013, 00:24

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
If you find some Phoca extensions useful, please vote for them on: extensions.joomla.org
User avatar
Jan
Phoca Hero
Phoca Hero
 
Posts: 33202
Joined: 10 Nov 2007, 18:23
Location: Czech Republic

Re: Most Downloaded Files

Postby brentwilliams2 on 28 Oct 2013, 21:00

Thanks! I changed it to this and it worked:

Code: Select all
JRoute::_(PhocaDownloadHelperRoute::getFileRoute($value->id,$value->categoryid,$value->alias))
brentwilliams2
Phoca Member
Phoca Member
 
Posts: 23
Joined: 23 Aug 2009, 01:22

Re: Most Downloaded Files

Postby Jan on 29 Oct 2013, 19:42

Ok
If you find some Phoca extensions useful, please vote for them on: extensions.joomla.org
User avatar
Jan
Phoca Hero
Phoca Hero
 
Posts: 33202
Joined: 10 Nov 2007, 18:23
Location: Czech Republic

Next

Return to Phoca Download

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests