Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: By default sort by Date registered

By default sort by Date registered 13 years 3 months ago #14170

  • mygun2big4u
  • mygun2big4u's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
I and my users in the registrants list want to see users sorted by Date registered. Please make possibility to select how results will be shown on Frontend by default.

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

By default sort by Date registered 13 years 3 months ago #14220

  • steve30000
  • steve30000's Avatar
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 106
  • Thank you received: 0
+1

For my events, it is all about seeing who registered in what order. There is a certain prestige to being #1 on the registration list.

I've used the following work around to have my initial display show by registration date instead of name. I do not use the group registration option, so I do not know if this would work for that situation or not.

In the file /components/com_dtregister/controllers/event.php, around line 587 (it is in the "function registrant()" section), you can change the filter order variable to initially sort by date:
$order = JRequest::getVar('filter_order','register_date');

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

By default sort by Date registered 13 years 3 months ago #14223

  • mygun2big4u
  • mygun2big4u's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
I tried this but no change. All is the same. Registrants is still filtered by name. :(
here is my link to registrants
http://www.npsa.lt/index.php?option=com ... mid=200780

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

By default sort by Date registered 13 years 3 months ago #14224

  • steve30000
  • steve30000's Avatar
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 106
  • Thank you received: 0
If you notice, it is sorting your first page by the date but then it reverts to name when you move to other pages. I actually have my registration list displaying all the names on one page so I do not have any pages to worry about. You should be able to solve it by changing the following file as well: com_dtregister/views/event/tmpl/registrant.php

Around line 366, change the filter order to 'register_date' on the following line:
<input type="hidden" name="filter_order" value="<?php echo Jrequest::getVar('filter_order','register_date');?>" />

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

By default sort by Date registered 13 years 3 months ago #14225

  • mygun2big4u
  • mygun2big4u's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Thank you very much for help. Now works fine.
I have other question. Where I can make changes length of list of registrants. As I informed dt_register use default value of joomla settings, but joomla have only 100 and I need 200.

Thank you steve30000 for fast help again. :D

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

By default sort by Date registered 13 years 3 months ago #14226

  • steve30000
  • steve30000's Avatar
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 106
  • Thank you received: 0
Once again, I hacked my way around this problem by changing the "event.php" file around line 595. The following will show all registrations. You may run into problems if you try to hard code a number such as 200 in there and have more than 200 registrations. I have no idea what that will do to the pagination (when you go to page 2, I'm not sure if will keep the 200 limit or go back to the joomla default of 5).

After these lines (which are basically getting your list limit):
$listLimit = $mainframe->getCfg( 'list_limit', 10 );
$limit=JRequest::getInt('limit',$listLimit);
I just added the following line to override that default and display all registrations (0 = all):
$limit = 0;

so mine looks like:
$listLimit = $mainframe->getCfg( 'list_limit', 10 );
$limit=JRequest::getInt('limit',$listLimit);
$limit = 0;   // Steve add - remove limit so it lists all registrants
(I try to comment all my code changes so that I can easily find them since I have to reinsert them every time an update comes along.)

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

  • Page:
  • 1
  • 2
Time to create page: 0.161 seconds