Keyword

Extra Fields on RSS feed

  • Carlos Caires
  • Carlos Caires's Avatar Topic Author
  • Offline
  • New Member
More
6 years 10 months ago #166164 by Carlos Caires
Extra Fields on RSS feed was created by Carlos Caires
Hi,

I need to get extra fields contents on k2 RSS feed (I don't know why they aren't there by default, I think they should be...).
Does anyone already solved this issue?
I guess the file that needs to be changed is this -> components/com_k2/views/itemlist/view.feed.php

Thanks

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 10 months ago #166176 by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra Fields on RSS feed

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Carlos Caires
  • Carlos Caires's Avatar Topic Author
  • Offline
  • New Member
More
6 years 10 months ago #166195 by Carlos Caires
Replied by Carlos Caires on topic Extra Fields on RSS feed
Hi,

I know that thread, I've read it. Even so, I couldn't, by myself, implement what I was looking for (I tried). That's Why I was looking for help, if is there someone around wiling to do it...
Thanks

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 10 months ago #166203 by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra Fields on RSS feed
Which file did you edit and which additions did you make?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Carlos Caires
  • Carlos Caires's Avatar Topic Author
  • Offline
  • New Member
More
6 years 10 months ago #166224 by Carlos Caires
Replied by Carlos Caires on topic Extra Fields on RSS feed
components/com_k2/views/itemlist/view.feed.php
I think this file is the one

also probably the file "components/com_k2/models/item.php", should be changed as described here-> (www.joomlaworks.net/forum/k2-en/47198-replace-k2-rss-image-with-an-extra-field-value).
Anyway, implementing this feature is something way beyond my skills... I´ll look for help elsewhere. Meanwhile I would suggest JW considering including extra fields on RSS feeds as a core feature.
Thanks

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago #166228 by JoomlaWorks
Replied by JoomlaWorks on topic Extra Fields on RSS feed
You can always use K2's JSON API and make things far simpler to work with ;)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Carlos Caires
  • Carlos Caires's Avatar Topic Author
  • Offline
  • New Member
More
6 years 10 months ago #166239 by Carlos Caires
Replied by Carlos Caires on topic Extra Fields on RSS feed
"You can always use K2's JSON API and make things far simpler to work with ;)"
You must be probably right, but I have no idea what you're talking about...

Apparently this is an old issue that nobody seems to be able to solve (these olds posts remain unanswered)

www.joomlaworks.net/forum/k2-en/24884-please-help-need-to-display-extra-fields-in-rss-feed#90423
www.joomlaworks.net/forum/k2-en/24884-please-help-need-to-display-extra-fields-in-rss-feed#90424

(Yes, I "search the forum before posting a question!" :-)

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 10 months ago #166245 by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra Fields on RSS feed
Revert any changes you have made to any core files.
Follow the directions as described here:
www.joomlaworks.net/forum/k2-en/47198-replace-k2-rss-image-with-an-extra-field-value#159910
The file is mentioned in the beginning /components/com_k2/models/item.php

Now do you want to add specific extrafields or all of them?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Carlos Caires
  • Carlos Caires's Avatar Topic Author
  • Offline
  • New Member
More
6 years 10 months ago #166249 by Carlos Caires
Replied by Carlos Caires on topic Extra Fields on RSS feed
I've already added

$item->extra_fields = $this->getItemExtraFields($item->extra_fields, $item);

to the mentioned file, at the end of "function prepareFeedItem", and the feed still doesn't include the extra fields, so I guess something is still missing somewhere...

I would like to have all extra fields (group) attached to that category

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 10 months ago #166284 by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra Fields on RSS feed
This is where the fields need to be rendered ->
github.com/getk2/k2/blob/master/components/com_k2/models/item.php#L284-L286

The $item->description should contain the extrafields loop as well.

An example loop can be found here -> github.com/getk2/k2/blob/master/components/com_k2/models/item.php#L762-L789

Another alternative would be to try using this method
github.com/getk2/k2/blob/master/components/com_k2/models/item.php#L158

Where you would still have to add
$item->description .= $item->extrafields;
in line 285 (check the first link);

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum