OK, quick write up on changing list layout.
Disclaimer: I'm no developer, my code aint pretty!
Locations Column in Event ListFiles:/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.phpNear line 342, you should find this line:- Code: Select all
<th class="coltitle" align="left" width="<?php echo $config->getGlobal('event_field_width',0); ?>"><?php echo JText::_( 'DT_EVENT' );?></th>
And then this line:- Code: Select all
<?php $j=2;
I added this line in between those two:- Code: Select all
<th class="coltitle" align="left" width="150px"><?php echo JText::_( 'DT_LOCATION' );?></th>
I then changed - Code: Select all
<?php $j=2; to <?php $j=3;
because $j is counting columns and we just added another one.
Then in file: list_row.phpAt around line 249 you should find:- Code: Select all
<?php if($config->getGlobal('event_date_show')){ ?>
Immediately before this, I added:- Code: Select all
<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);?></a>
<?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 </a>. Best to use that if you're not sure.
Around line 111 you should find:- Code: Select all
<td align="left" class="eventlist"><span class="event_title"><?php echo $row->title;?></span>
and then:- Code: Select all
<?php } ?>
I rem'd out everything from the next line starting
<?phpAll this: - Code: Select all
<?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);?></a>
<?php
if($config->getGlobal('linktogoogle')==1){
?>
<?php
}
}
}
echo $this->loadTemplate('moderator');
Stop before:- Code: Select all
4br = false;
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