Hi all
1- I want to show articles’ download link in rss feed, what should I do?
2- Is it possible to create another rss feed for archived articles? I mean with this rss users can watch our archives and then by clicking in each date see articles of that issue.
The plugin that implements web feed for issues is the WebFeed one, inside the generic folder. You would need to customize the WebFeedGatewayPlugin.inc.php file, inside the fetch method, assigning the article file object to the template manager so you could use it in the templates/rss.tpl, templates/rss2.tpl and templates/atom.tpl to build the url to download the file.
It’s not that hard to implement, but you need some programming skills.
The second question would require even more knowledge to implement, it’s not a trivial change. But basically you could use the WebFeed plugin as a base and create another one, so users could choose which one they wanted, or you could just extend the WebFeed plugin to implement archives also.
Hi Bruno
Sorry for late answer, I’m working on it but still can’t get any result.
Could you help me to add other meta info to RSS? I need to show paper’s pic and pdf link.
This is just an idea that will output article galleys links and names. Dont’ know anything about RSS so it may be not validated. Anyway, as you can see type= is set to application/pdf. Feel free to modify it as you need. Hope it helps.
I misunderstood what you were trying to get. To present the download links for the article galleys, check the templates/article/article.tpl file, starting at line 77. Basically you get the galleys from the article object, then you build the download url using both the article and galley id.
I just pointed out where in the code you have something like you need. Then you can look at it, learn how to do it and implement yourself into the RSS Feed.
I just pointed out to you some code to get the article galleys and to build the download url. But It will be hard to understand that if you have no coding skills, unfortunately. I also can’t code that to you, that’s an amount of time that I can’t spend on the support activity. What I can do is to help you while you’re doing the work and coming back with doubts and questions.
Thanks Bruno, You right.
I was a programmer so still I have some programming skill.
You said > you should try the getLocalizedFileName method, instead of the one you’re using.
I putted your method in my code instead of getFileName(), But the result is an image name!
The smarty {url} function is what creates the standard OJS address. The parameters “page”, “op”, and “path” correspond to the URL components after the base URL.
For example, if
generates
www . gmj . ir /gmj/public/journals/1/ article / view / $article_id
then
will generate
www . gmj . ir /gmj/public/journals/1/ article / view / $article_id / $galley_id