OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Messing with RSS-Feed

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Messing with RSS-Feed

Postby cabotine » Mon Dec 30, 2013 6:18 am

Hi everyone,
after I finally managed to update to 2.4.3 today, I started messing around with the RSS-Feed.
I am trying two things. First of all I want all articles to be in the feed and not only the last issue. And second I want to point the link directly to the full-text of the article in the printer-friendly version.


Code: Select all
  <link>{url page="rt" op="printerFriendly" path=$article->getBestArticleId($currentJournal)}</link>



But this line creates only the current journal and only the links to the abstract pages. :(
It seems this could be the line where I need to change stuff.
Would be glad if anyone could help.
Thank you very much
Frank J.

Well I found the option to change the number of feed items.
So it is only the question of the right link (preferably a fulltext version like the printerfriendly without the sidebar).
cabotine
 
Posts: 39
Joined: Tue Feb 19, 2008 1:25 pm

Re: Messing with RSS-Feed

Postby asmecher » Mon Dec 30, 2013 10:21 am

Hi Frank,

Are you looking for a URL to use for an article that links directly to the PDF? Since OJS supports multiple galley files per article (often used to present an article in HTML, PDF, and potentially other formats) you'll have to figure out a way to determine what file to offer. Are you always publishing in a single format, or do you offer e.g. both HTML and PDF?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8305
Joined: Wed Aug 10, 2005 12:56 pm

Re: Messing with RSS-Feed

Postby cabotine » Tue Dec 31, 2013 4:23 am

Hi Alec,
we have only html to offer and I would love to offer the print version of that (without the sidebar div).
Thank you very much
Frank J.
cabotine
 
Posts: 39
Joined: Tue Feb 19, 2008 1:25 pm

Re: Messing with RSS-Feed

Postby asmecher » Fri Jan 03, 2014 7:18 am

Hi Frank,

You're missing the galley ID in the URL you added above. You would need to use something like...
Code: Select all
{foreach from=$article->getGalleys() item=galley}
  <link>{url page="rt" op="printerFriendly" path=$article->getBestArticleId($currentJournal)|to_array:$galley->getId()}</link>
{/foreach}
This is untested, but should give you the general idea.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8305
Joined: Wed Aug 10, 2005 12:56 pm

Re: Messing with RSS-Feed

Postby cabotine » Fri Jan 03, 2014 8:48 am

Hi Alec,
thx. Is it possible to get the whole html-file to use <content:encoded> and the <![CDATA[ and ]> for creating a feed that also carries the content?
The feedreader I want to use seems to have some problem fetching it from the URL itself.
Thanks and regards
Frank J.
cabotine
 
Posts: 39
Joined: Tue Feb 19, 2008 1:25 pm

Re: Messing with RSS-Feed

Postby asmecher » Fri Jan 03, 2014 8:55 am

Hi Frank,

Hmm, that sounds like a kludge that's likely to have greater compatibility ramifications than debugging your reader's behavior in the first place. Have you compared this behavior with other readers?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8305
Joined: Wed Aug 10, 2005 12:56 pm

Re: Messing with RSS-Feed

Postby cabotine » Fri Jan 03, 2014 9:11 am

Hi Alec,
well its Googles Newsstand Producer (https://www.google.com/producer/) and it seems to have some problems with my RSS.20-feed (http://www.inklusion-online.net/index.p ... lugin/rss2).
I am not sure why. One thing is that it only shows 4 articles (the ones with an empty description tag are missing) and it doesnt show the complete article but only the abstract.
But the ideas is to allow readers to subcribe to our journal on their tablet as well and therefore it would be useful to make it available for Google Newsstand.
So if its possible I would love to try. Is it?
We can offer a regular rss-feed as an alternative.
Best
Frank J.
cabotine
 
Posts: 39
Joined: Tue Feb 19, 2008 1:25 pm

Re: Messing with RSS-Feed

Postby asmecher » Fri Jan 03, 2014 9:18 am

Hi Frank,

I haven't used Newsstand Producer, so I can only speculate. However, the reason only the abstract is visible, not the full-text, is that the description field is what it's using to present content, not the link tag. Our approach is consistent with the use of CSS in general; I don't see why it wouldn't be possible to modify the feed to present fulltext in the description field rather than just the abstract, but it'll take some hacking on your part.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8305
Joined: Wed Aug 10, 2005 12:56 pm

Re: Messing with RSS-Feed

Postby cabotine » Fri Jan 03, 2014 9:28 am

Hi Alec,
well I try contacting the Google people and then report back.
Thx for your help so far
Best
Frank J.
cabotine
 
Posts: 39
Joined: Tue Feb 19, 2008 1:25 pm

Re: Messing with RSS-Feed

Postby cabotine » Fri Jan 03, 2014 3:26 pm

Hi Alec,
could you give me a hint, how to find the URL of a html-file of an article. Or how to include the content of this html file via the template.
Thank you
Best
Frank J.
cabotine
 
Posts: 39
Joined: Tue Feb 19, 2008 1:25 pm

Re: Messing with RSS-Feed

Postby asmecher » Fri Jan 03, 2014 3:43 pm

Hi Frank,

As above, there's not necessarily a single HTML file -- you can upload as many different HTML galleys as you want to represent an article, and each will have a different URL. That's why I proposed a {foreach} loop above go to through each potential; if there's only one uploaded, only a single result will be generated.

As for getting the HTML contents, you can get those from the galley object once you've found it using the getHTMLContents() function.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8305
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: mbria, newbies and 6 guests