OK, quick write up on changing list layout.
Disclaimer: I'm no developer, my code aint pretty!
Locations Column in Event List
Files:
/components/com_dtregister/views/event/tmpl/list.php
/components/com_dtregister/views/event/tmpl/list_row.php
First create HTML override for your template (skip if already done):
Navigate to:
/components/com_dtregister/views/event/
Copy the /tmpl folder to /templates/yourtemplate/html/com_dtregister
(you will need to create the /com_dtregister sub folder first)
Rename the tmpl folder to "event"
OK, now override is in place, let's change things.
The code in most of these files is all over the place in terms of white space, so line numbers may vary..don't change if you can't find exact lines.
in file: list.php
Near line 342, you should find this line:<th class="coltitle" align="left" width="<?php echo $config->getGlobal('event_field_width',0); ?>"><?php echo JText::_( 'DT_EVENT' );?></th>
And then this line:
I added this line in between those two:<th class="coltitle" align="left" width="150px"><?php echo JText::_( 'DT_LOCATION' );?></th>
I then changed <?php $j=2; to <?php $j=3;
because $j is counting columns and we just added another one.
Then in file: list_row.php
At around line 249 you should find:<?php if($config->getGlobal('event_date_show')){ ?>
Immediately before this, I added:<td align="left" class="eventlist">
<?php
if($row->location_id !="" && $row->location_id > 0 && $config->getGlobal('showlocation',0)){
$locationTable->load($row->location_id);
if($locationTable->name !=""){?>
<a rel="rokbox[545 490]" href="<?php echo JRoute::_("index.php?option=com_dtregister&controller=location&task=show&id=".$row->location_id."&tmpl=component&type=rokboxy",$xhtml_url,false) ?>" ><?php echo stripslashes($locationTable->name);?>
<?php
}
}
?>
</td>
I'm using rokbox for my popups, much nicer
. You'll need to edit this url to suite your setup. The original url is rem'd out below (starts from <a> after " ", copy upto . Best to use that if you're not sure.
Around line 111 you should find:<td align="left" class="eventlist"><span class="event_title"><?php echo $row->title;?></span>
and then:
I rem'd out everything from the next line starting
<?php
All this:<?php
if($row->location_id !="" && $row->location_id > 0 && $config->getGlobal('showlocation',0)){
$locationTable->load($row->location_id);
if($locationTable->name !=""){
echo "<br /> ".JText::_('DT_LOCATION'); ?>: <a class="colorbox" href="<?php echo JRoute::_("index.php?option=com_dtregister&controller=location&task=show&id=".$row->location_id."&tmpl=component",$xhtml_url,false) ?>" ><?php echo stripslashes($locationTable->name);?>
<?php
if($config->getGlobal('linktogoogle')==1){
?>
<?php
}
}
}
echo $this->loadTemplate('moderator');
Stop before:
The moderator entry I didn't need, I think you can disable this in configuration but at the time it seemed to hang around, so I removed it here...
That was it I think. I stupidly forgot to write this up for myself so I've had to recreate this from scratch. If it doesn't work, PM me and we'll work it out.
The result should look like my attached image.
Hope it's of use
Gary