Keyword

K2 items database call

  • Jerzy Z Gierzy
  • Jerzy Z Gierzy's Avatar Topic Author
  • Offline
  • New Member
More
8 years 2 months ago #157518 by Jerzy Z Gierzy
K2 items database call was created by Jerzy Z Gierzy
Hi!
Im building a custom RSS feed containing K2 items.
-At what point in the code does com_K2 make a database call? I want to be able to order results by a `extra_field` containing end or start date of an event.
-Same goes for items showing in user `add event` panel: i want to query events based on date.
-At what point does com_K2 construct it's feed items? in components/com_k2/views/itemlist/view.feed.php the feed object has already a 'description' property - which is inconvinent for me and i want to split it back into 'K2IntroText' and 'K2FeedImage'
- I noticed there are issues with utf8 encoding if you don't use proper database methods. Which methods should I use?

Thanks in advance, Jerzy

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #157519 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 items database call
I would approach this a bit differently.
Personally I would use JSON feeds which provide all of the available data.

Now if you want to create a new view which produces RSS, I would copy /view.feed.php and create the view based on that.

The ordering is set by the params in the settings.
                    // Set ordering
                    if ($params->get('singleCatOrdering'))
                    {
                        $ordering = $params->get('singleCatOrdering');
                    }
                    else
                    {
                        $ordering = $params->get('catOrdering');
                    }

This is the ordering for the category, depending on the case, the ordering is set differently.

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