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

TOPIC: [SOLVED] Errors in Event Display

[SOLVED] Errors in Event Display 11 years 2 months ago #20219

  • trinitywebhosting
  • trinitywebhosting's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
I'm setting up DT Register in Joomla 3.0 on taylor-edu.cloudaccess.net and I encountered 3 errors in the event display.

First in the com_dtregister/views/event/tmpl/list_row.php file in the line <tr <?php echo 'class="'.$bgRow.'"'; ?>><td colspan="<?php echo ++$j; ?>"><?php echo stripslashes($row->event_describe); ?></td></tr> the value for colspan was one less than it should be when the event image was displayed. So I added if($show_event_image) {$j++;} below the line $j=2; if($config->getGlobal('price_column')){$j++;}if($config->getGlobal('capacity_column')){$j++;}if($config->getGlobal('registered_column')){$j++;} .

Second listing the events in Start Date order didn't work all the way. I'm not sure what the issue was here, it seemed to be related to the event categories.

Third listing when an event was in multiple categories, it would show up multiple times on the listing for all events.

I previously listed these errors in a forum topic, but I didn't get a response, so I made some changes to the code since I had to show the site to a customer. Today when I looked for the forum topic, it wasn't here, so I must have done something wrong in posting it.

In any case I've added this to the code of com_dtregister/views/event/tmpl/list.php.

$array = $rows;
$uniqueids = array();
foreach($array as $value) {
$curid = $value->slabId;
if (!(in_array($curid, $uniqueids))) {
$uniqueids[] = $curid;
$thiskey = $value->dtstart;
$newarray[$thiskey] = $value;
}
}
ksort ($newarray);
$rows = $newarray;

this code comes after this line

$rows = $eventTable->findAllByCategoryTree($categories,array_filter($where)," c.lft asc, b.ordering ASC ");

I also had to change this line for($i=0,$n=count($rows);$i<$n;$i++){

to this foreach ($rows as $key=>$value){

and this $row=$rows[$i];

to this $row=$rows[$key];

I'm sure there was a better way to go about this than changing the code, but, as I said, I was in a hurry to get it working for the customer. Please let me know if there are other solutions.

thank you,
Sam Drew

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

[SOLVED] Errors in Event Display 10 years 6 months ago #21915

  • nathan.dth
  • nathan.dth's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1857
  • Karma: 19
  • Thank you received: 218
Hello. I know this is an old thread, but updating for two reasons.

1) To state that the minor issue of the column count being off (only when event description was used) was updated in the new 3.0.5 release.

2) The other two items you mentioned were not errors or bugs. DT Register has always listed events first by category, as can be seen in the demo sites. However, as of the new 3.0.5 release, there is a primary and secondary ordering option. So you can NOW order completely separate from categories if you'd like.

Also, the events showing in each category that they are assigned to... of course that is how they SHOULD show. How else would DT Register know which ONE category you wanted the event to show in when you assigned it to multiple ones? Based on the new release, if you choose to still list by category first, you'll see that same result. If you order something other than category, the event will only show one time. Thanks!

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

Nathan is no longer affiliated with DTH since the recent acquisition. You can connect with him and get any type of Joomla website help at www.JoomlaEmployee.com .
  • Page:
  • 1
Time to create page: 0.103 seconds