[SOLVED] Problem using Phoca D. File Module with GDrive link
-
- Phoca Member
- Posts: 24
- Joined: 15 Oct 2011, 16:03
Re: Problem using Phoca Download File Module with GDrive lin
Is this file in PD 2? Because I can't find it
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem using Phoca Download File Module with GDrive lin
Hi, no, the file I have added is Phoca Download 3 file, this is the place where you can remove the checking.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 24
- Joined: 15 Oct 2011, 16:03
Re: Problem using Phoca Download File Module with GDrive lin
And in PD 2, how can I do it?
-
- Phoca Member
- Posts: 24
- Joined: 15 Oct 2011, 16:03
Re: Problem using Phoca Download File Module with GDrive lin
I solved using this code in com_phocadownload/helpers/phocadownload.php from line 50
But for the Feed RSS/Atom, the feed item link is not the download link but is is the category link. Is there a way for setting the download link?
Thanks
Code: Select all
$errorAllowed = preg_match("/PhocaError/i", $allowedMimeType);
$errorDisallowed = preg_match("/PhocaError/i", $disallowedMimeType);
$errorAllowed = false;
$errorDisallowed = true;
Thanks
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem using Phoca Download File Module with GDrive lin
Hi, as written above, for PD this needs to be customized (as example how it works in PD 3, I have pasted the file here)
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 24
- Joined: 15 Oct 2011, 16:03
Re: Problem using Phoca Download File Module with GDrive lin
Ok solved. I edited the com_phocadownload/views/feed/view.feed.php, replacing the code with the following:
if you want the download link you should use instead:
Code: Select all
$link = JRoute::_( PhocaDownloadHelperRoute::getFileRoute( $valueDoc->id, $valueDoc->categoryid, $valueDoc->alias, $valueDoc->categoryalias, $valueDoc->sectionid ) );
$item->link = $link;
Code: Select all
$link = JRoute::_( PhocaDownloadHelperRoute::getFileRoute( $valueDoc->id, $valueDoc->categoryid, $valueDoc->alias, $valueDoc->categoryalias, $valueDoc->sectionid, 'download' ) );
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [SOLVED] Problem using Phoca D. File Module with GDrive
Ok, thank you for the guide.
Jan
Jan
If you find Phoca extensions useful, please support the project