Events in administrator list order by date desc

  • Addlink
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 3 months ago #25535 by Addlink
Hi,

Is there any way to by default have the events in admin listings displayed chronologically newest --> oldest? (date desc) (by modifying the code?)

Re-ordering in the column require too many clicking

Thanks

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

More
12 years 3 months ago #25537 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Events in administrator list order by date desc
Yes. Please follow the instructions below :

1. Open the file administrator/components/com_eventbooking/models/events.php

2. Find the code below :
Code:
$filter_order = $mainframe->getUserStateFromRequest($option . 'event_filter_order', 'filter_order', 'a.ordering', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', '', 'word');

3. Change it to :
Code:
$filter_order = $mainframe->getUserStateFromRequest($option . 'event_filter_order', 'filter_order', 'a.event_date', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', 'DESC', 'word');

4. Open the file Open the file administrator/components/com_eventbooking/views/events/view.html.php

5. Find the code below:
Code:
$filter_order = $mainframe->getUserStateFromRequest($option . 'event_filter_order', 'filter_order', 'id', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', '', 'word');

6. Change it to :
Code:
$filter_order = $mainframe->getUserStateFromRequest($option . 'event_filter_order', 'filter_order', 'a.event_date', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', 'DESC', 'word');

After that, it will work as expected.

Tuan
The following user(s) said Thank You: Addlink

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

  • Addlink
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 3 months ago #25540 by Addlink
Many thanks, it was very fast :)

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

More
12 years 3 months ago #25541 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Events in administrator list order by date desc
Hehe, you was lucky enough. I just come back to office from new year holiday.

Tuan

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

Moderators: Tuan Pham Ngoc