Hi,
Currently im working with event details categories. Refer to the coding in editor :
<div class="gkEvent">
<h3>Event Details:</h3>
<ul>
<li><strong>Venue:</strong>Temerloh, Kuala Krau & Maran</li>
<li><strong>Date :</strong>5 January 2015</li>
<!--<li><strong>Date:</strong> <span class="gkEventPeriod"><time class="gkEventDateStart" datetime="05-01-2015">5 January 2015</time> </span></li>-->
</ul>
</div>
How do i pass the variable for Venue to other php file to grab that value same as the way it grab the date/time value? Below is the coding in other php file which display date/time taken from this above coding.
function output() {
// main wrapper
echo '<div class="gkNspPM gkNspPM-EventsList" data-cols="'.$this->parent->config['portal_mode_events_list_cols'].'">';
// render images
for($i = 0; $i < count($this->parent->content); $i++) {
$title = $this->parent->content[$i]['title'];
$text = $this->parent->content[$i]['text'];
// parse event data
$event_info = array(
"date" => '',
"when" => '',
"timestamp" => '',
"counter_timestamp" => ''
);
$event_data = array();
$event_data_count = preg_match('@<div class="gkEvent">.*?</div>@mis', $text, $event_data);
if($event_data_count > 0) {
$event_datetimes = array();
$event_datetimes_count = preg_match_all('@<time.*?datetime="(.*?)".*?>(.*?)</time>@', $event_data[0], $event_datetimes);
if($event_datetimes_count > 0) {
$event_timestamp = strtotime($event_datetimes[1][0]);
$event_info['timestamp'] = date(DATE_W3C, $event_timestamp);
$event_info['counter_timestamp'] = date(DATE_W3C, strtotime($event_datetimes[1][4]));
$event_info['date'] = strftime('%a', $event_timestamp) . '<small>' . strftime('%b %e', $event_timestamp) . '</small>';
$event_info['when'] = $event_datetimes[2][0] . ' @ ' . $event_datetimes[2][2];
}
}
Hope someone can help me on this...
Thank you