Page 1 of 2
File Link In Phoca Download Module RSS
Posted: 30 Apr 2018, 08:48
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>
Re: File Link In Phoca Download Module RSS
Posted: 02 May 2018, 15:09
by Jan
Hi, in module options, you can set if the link goes to category or file.
Jan
Re: File Link In Phoca Download Module RSS
Posted: 14 May 2018, 07:14
by evolution
Hi Jan
I'm using version 3.1.0 of the module and don't have that option.
Re: File Link In Phoca Download Module RSS
Posted: 14 May 2018, 22:32
by Jan
Hi, see image:
Jan
Re: File Link In Phoca Download Module RSS
Posted: 15 May 2018, 03:09
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>
Re: File Link In Phoca Download Module RSS
Posted: 17 May 2018, 00:38
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
Re: File Link In Phoca Download Module RSS
Posted: 17 May 2018, 03:51
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>
Re: File Link In Phoca Download Module RSS
Posted: 18 May 2018, 23:02
by Jan
Hi, it is just standard link to file view. Did you enable displaying File View in Phoca Download Options?
Jan
Re: File Link In Phoca Download Module RSS
Posted: 20 May 2018, 03:35
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.
Re: File Link In Phoca Download Module RSS
Posted: 23 May 2018, 03:42
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.