File Link In Phoca Download Module RSS

Phoca Download - download manager
evolution
Phoca Member
Phoca Member
Posts: 10
Joined: 10 Apr 2012, 09:52

File Link In Phoca Download Module RSS

Post by evolution »

Hi Jan

I am using the Phoca Download Latest FIle Module on the following site and the client has asked me for the RSS feed to connect to an app they are using. However the RSS Feed links to the category and no to the file itself. Is there a way for the RSS Feed to contain the link to the pdf file and not the category page?

Cheers
Module on this page with RSS
yss.wa.edu.au/our-school/playgroup.html

RSS Link
yss.wa.edu.au/administration/documents/feed/291.feed?type=rss

Item in RSS
<item>
<title>YSS Newsletter 2018 Term 1 Wk 11 (YSS Newsletter 2018 Term 1 Wk 11 10.04.18.pdf)</title>
<link>yss.wa.edu.au/administration/documents/category/15-2018.html</link>
<guid isPermaLink="true">yss.wa.edu.au/administration/documents/category/15-2018.html</guid>
<description><![CDATA[<div><img src="yss.wa.edu.au/media/com_phocadownload/images/phoca-download.png" alt="" /></div>]]></description>
<category>2018</category>
<pubDate>Tue, 10 Apr 2018 23:18:41 +0800</pubDate>
</item>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File Link In Phoca Download Module RSS

Post by Jan »

Hi, in module options, you can set if the link goes to category or file.

Jan
If you find Phoca extensions useful, please support the project
evolution
Phoca Member
Phoca Member
Posts: 10
Joined: 10 Apr 2012, 09:52

Re: File Link In Phoca Download Module RSS

Post by evolution »

Hi Jan

I'm using version 3.1.0 of the module and don't have that option.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File Link In Phoca Download Module RSS

Post by Jan »

Hi, see image:
Image

Jan
If you find Phoca extensions useful, please support the project
evolution
Phoca Member
Phoca Member
Posts: 10
Joined: 10 Apr 2012, 09:52

Re: File Link In Phoca Download Module RSS

Post by evolution »

Hi Jan

Yes, I have it set to Yes for file link type already.

Files in the module go direct to download but the RSS link goes to the category page:
https://yss.wa.edu.au/administration/do ... -2018.html

You can see the module here:
https://yss.wa.edu.au/yallingup-steiner ... namic.html

And here is the RSS

<item>
<title>YSS Newsletter 2018 Term 2 Week 2 (YSS Newsletter 2018 Term 2 Wk 2 8.05.18.pdf)</title>
<link>https://yss.wa.edu.au/administration/do ... html</link>
<guid isPermaLink="true">https://yss.wa.edu.au/administration/do ... html</guid>
<description><![CDATA[<div><img src="https://yss.wa.edu.au/media/com_phocado ... wnload.png" alt="" /></div>]]></description>
<category>2018</category>
<pubDate>Tue, 08 May 2018 22:12:50 +0800</pubDate>
</item>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File Link In Phoca Download Module RSS

Post by Jan »

Hi, now I understand, sorry for misunderstanding. In RSS there is only one method - to category view and can be changed only with modification in this file:
components\com_phocadownload\views\feed\view.feed.php

FROM:

Code: Select all

$link 				= PhocaDownloadRoute::getCategoryRoute($valueDoc->categoryid, $valueDoc->categoryalias);
TO:

Code: Select all

$link 				= PhocaDownloadRoute::getFileRoute($valueDoc->id, $valueDoc->alias, $valueDoc->categoryid, $valueDoc->categoryalias);
Jan
If you find Phoca extensions useful, please support the project
evolution
Phoca Member
Phoca Member
Posts: 10
Joined: 10 Apr 2012, 09:52

Re: File Link In Phoca Download Module RSS

Post by evolution »

Hi Jan

I've made the change but it produces the following error.
YSS Newsletter 2018 Term 2 Week 3
File
You have no rights to access this category
All categories and files are set to public.

Is there a way to link directory to the file without going to the download file page?

Code: Select all

$link 				= PhocaDownloadRoute::getFileRoute($valueDoc->id, $valueDoc->alias, $valueDoc->categoryid, $valueDoc->categoryalias);
						$item->link 		= JRoute::_($link);

Code: Select all

<item>
			<title>YSS Newsletter 2018 Term 2 Week 3 (YSS Newsletter 2018 Term 2 Wk 3 15.05.18.pdf)</title>
			<link>https://yss.wa.edu.au/administration/documents/file/292-15.html</link>
			<guid isPermaLink="true">https://yss.wa.edu.au/administration/documents/file/292-15.html</guid>
			<description><![CDATA[<div><img src="https://yss.wa.edu.au/media/com_phocadownload/images/phoca-download.png" alt="" /></div>]]></description>
			<category>2018</category>
			<pubDate>Tue, 15 May 2018 22:33:30 +0800</pubDate>
		</item>
		<item>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File Link In Phoca Download Module RSS

Post by Jan »

Hi, it is just standard link to file view. Did you enable displaying File View in Phoca Download Options?

Jan
If you find Phoca extensions useful, please support the project
evolution
Phoca Member
Phoca Member
Posts: 10
Joined: 10 Apr 2012, 09:52

Re: File Link In Phoca Download Module RSS

Post by evolution »

Thanks Jan

It was selected but it appears my client has been changing settings as well! Why raise a ticket if they're going to then mess with it themselves???

Thanks for your help.
evolution
Phoca Member
Phoca Member
Posts: 10
Joined: 10 Apr 2012, 09:52

Re: File Link In Phoca Download Module RSS

Post by evolution »

Hi Jan

Unfortunately running into more problems. Enabling the download file view takes all existing links to that page and then they come up with a 404 when the user tries to download. Yet when I disable it the rss, the link gives the "You have no rights to access this category" message. At this stage I can only have one or the other.
Post Reply