- Posts: 10
COMMUNITY FORUM
Extra Fields on RSS feed
- Carlos Caires
-
Topic Author
- Offline
- New Member
Less
More
7 years 4 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
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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 4 months ago #166176
by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra Fields on RSS feed
Hello Carlos,
You will find this thread useful www.joomlaworks.net/forum/k2-en/44723-modify-k2-rss-feed-output-add-extra-fields
You will find this thread useful www.joomlaworks.net/forum/k2-en/44723-modify-k2-rss-feed-output-add-extra-fields
Please Log in or Create an account to join the conversation.
- Carlos Caires
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 10
7 years 4 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
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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 4 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?
Please Log in or Create an account to join the conversation.
- Carlos Caires
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 10
7 years 4 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
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.
- JoomlaWorks
-
- Offline
- Admin
Less
More
- Posts: 6227
7 years 4 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 ;)
Please Log in or Create an account to join the conversation.
- Carlos Caires
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 10
7 years 4 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!" :-)
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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 4 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?
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?
Please Log in or Create an account to join the conversation.
- Carlos Caires
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 10
7 years 4 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
$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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 4 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 addin line 285 (check the first link);
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;
Please Log in or Create an account to join the conversation.
- Carlos Caires
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 10
7 years 3 months ago #166345
by Carlos Caires
Replied by Carlos Caires on topic Extra Fields on RSS feed
Hi Krikor and Fotis,
I'm not a programmer.
When I posted this topic on this forum I was looking for an answer from some really nice guy willing to post here the modified file, since this feature has been requested so many times in the past...
I appreciate all your help, but even with your suggestions I don't have the knowledge to modify the file by myself.
I'll look for help elsewhere
Best
I'm not a programmer.
When I posted this topic on this forum I was looking for an answer from some really nice guy willing to post here the modified file, since this feature has been requested so many times in the past...
I appreciate all your help, but even with your suggestions I don't have the knowledge to modify the file by myself.
I'll look for help elsewhere
Best
Please Log in or Create an account to join the conversation.