Event start time

Hi - anyone knows how to get start time to show on events?

When creating an event, you have to choose a start time, but this time is not displayed anywhere in the event info afterwards...

Quote · 22 Jun 2009

This worked for me in 6.1.6:

Edit inc/classes/BxDolEvents.php;

At line 606 you will see:

$sDateTime = LocaledDataTime($aResSQL['EventStart_UTS']);
$sEventsStart = $sDateTime." ("._format_when($aResSQL['sec']).")";

Insert the following after line 606

$tmpEventTime = date_parse($aResSQL['EventStart']);
$EventHour = $tmpEventTime['hour'];
$EventMin = $tmpEventTime['minute'];
$EventTimeMil = $EventHour . ":" . $EventMin;
$EventTime = date("g:i a", strtotime($EventTimeMil))

Then around line 655 you will see

<div class="cls_res_info_p">
{$sDateC}: <div class="clr3">{$sEventsStart}</div>
</div>

After this add the following

<div class="cls_res_info_p">
Time: <div class="clr3">{$EventTime} </div>
</div>

Repeat these steps 2 more times, at line 1215 you will see this again

$sEventsStart = _format_when($aEventData['sec']);
$sDateTime = LocaledDataTime($aEventData['EventStart_UTS'])

Add the following code (not the name of the array is different here, instead of aResSQL you will use aEventData

$tmpEventTime = date_parse($aEventData['EventStart']);
$EventHour = $tmpEventTime['hour'];
$EventMin = $tmpEventTime['minute'];
$EventTimeMil = $EventHour . ":" . $EventMin;
$EventTime = date("g:i a", strtotime($EventTimeMil));

After line 1235 add this (note the class is slightly different cls_res_info instead of cls_res_info_p)

</div>
<div class="cls_res_info">
Time: <div class="clr3">{$EventTime} </div>
</div>

And one more time after line 2115 add (note: we are back to the aResSQL array)

$tmpEventTime = date_parse($aResSQL['EventStart']);
$EventHour = $tmpEventTime['hour'];
$EventMin = $tmpEventTime['minute'];
$EventTimeMil = $EventHour . ":" . $EventMin;
$EventTime = date("g:i a", strtotime($EventTimeMil));

And finally after 2164 add (note we are back to the class cls_res_info_p)

<div class="cls_res_info_p">
Time: <div class="clr3">{$EventTime} </div>
</div>

If these line numbers don't match up with what you have just search for $sDateTime and you should be able to find the code lines your looking for.

Hope this helps.

Quote · 29 Jun 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.