JoomEXT:EventList

From Kb_JMY(晉明夷)

Jump to: navigation, search

JoomEXT:EventList


How to change the default sorting field?

  1. com_eventlist_1.0.1_schlu.zip
  2. Joomla_1.5.15-Stable-Full_Package.zip


  • Ans: The following files need to be modified:
  1. public_html/Joomla/components/com_eventlist/views/eventlist/view.html.php
  2. public_html/Joomla/components/com_eventlist/models/eventlist.php


  • views/eventlist/view.html.php
* Change the marking on which field is sorted, from 'a.dates' to 'l.city'
-> One Location need to changed: 
-> 1. function _buildSortLists() ---------- arroun line#183

-> Original line is:
   $filter_order	= JRequest::getCmd('filter_order', 'a.dates');

-> Change 'a.dates' to 'l.city'       
   $filter_order	= JRequest::getCmd('filter_order', 'l.city');


  • models/eventlist.php
* Change default sorting field from 'a.dates' to 'l.city'
-> Two functions need to changed 

-> 1. function __construct() --------------- Arround Line#79: change 'a.dates' to 'l.city'
      $this->setState('filter_order', JRequest::getCmd('filter_order', 'a.dates'));

-> 2. function _buildEventListOrderBy() ---- Around Line#196: change 'a.dates' to 'l.city'
      $orderby	= ' ORDER BY '.$filter_order.' '.$filter_order_dir.', a.dates, a.times';



Personal tools