'date',
'TIME' => 'time',
'TITLE'=> 'title',
'DESCRIPTION' => 'description',
'DESCRIPTION2' => 'description2',
'LOCATION' => 'location',
'MARKER' => 'marker'
);
public $values;
protected $layout;
protected $layouts = array(
'toc' => 'view_in_toc',
'archive' => 'view_archive',
'archive_no_link' => 'view_archive_without_link',
'with_marker' => 'view_with_marker',
'short_reference' => 'only_name',
'header' => 'view_as_page_header',
'secondary' => 'rather_small',
'name_as_link' => 'view_name_as_link'
);
function __construct($keys,$config) {
parent::__construct($keys,$config);
}
function view_in_toc() {
$v = (object) $this->values;
$TS = strtotime($v->date);
$href = $this->href;
$date = sprintf("%s"
."%s",
$this->month_name(date('n',$TS)),
date('d', $TS)
);
$description = sprintf("
"
."%s"
."",
$href,
$v->title,
$v->description,
$this->week_day_name(date('N',$TS)),
$v->time
);
if (is_object($v->location)) {
$v->location->set_layout("humble_two_liner");
}
return sprintf("",
$date,
$description,
$v->location
);
}
function view_with_marker() {
$v = (object) $this->values;
$TS = strtotime($v->date);
$href = $this->href;
$date = sprintf("%s"
."%s",
$this->month_name(date('n',$TS)),
date('d', $TS)
);
$description = sprintf(""
."%s"
."",
$href,
$v->title,
$v->marker,
$v->description,
$this->week_day_name(date('N',$TS)),
$v->time
);
if (is_object($v->location)) {
$v->location->set_layout("humble_two_liner");
}
return sprintf("",
$date,
$description,
$v->location
);
}
function view_archive_without_link() {
$v = (object) $this->values;
$TS = strtotime($v->date);
$date = sprintf("%s"
."%s",
$this->month_name(date('n',$TS)),
date('d', $TS)
);
$description = sprintf("%s
"
."%s"
."",
$v->title,
$v->description,
$v->description2
);
if (is_object($v->location)) {
$v->location->set_layout("humble_two_liner");
}
return sprintf("",
$date,
$description,
$v->location
);
}
function view_archive() {
$v = (object) $this->values;
$TS = strtotime($v->date);
$date = sprintf("%s"
."%s",
$this->month_name(date('n',$TS)),
date('d', $TS)
);
$description = sprintf(""
."%s"
."",
$this->href,
$v->title,
$v->description,
$v->description2
);
if (is_object($v->location)) {
$v->location->set_layout("humble_two_liner");
}
return sprintf("",
$date,
$description,
$v->location
);
}
function view_as_page_header() {
$v = (object) $this->values;
$TS = strtotime($v->date);
$time = sprintf("%s, %s - %s",
$this->week_day_name(date('N',$TS)),
date('d.m.y',$TS),
$v->time
);
if (is_object($v->location)) {
$v->location->set_layout('one_liner');
}
return sprintf(""
."
%s
"
."%s
"
."%s"
."%s"
."",
$v->title,
$v->description,
$time,
$v->location
);
}
function rather_small() {
$v = (object) $this->values;
$TS = strtotime($v->date);
$v->location->set_layout("town");
$town = strip_tags(sprintf("%s",$v->location));
$v->location->set_layout('collected_entry');
return sprintf("",
date("d.m.", $TS),
$town,
$v->time,
$v->location,
$this->href,
$v->title
);
}
function only_name() {
$v = (object) $this->values;
return sprintf("",
$this->href,
$v->title
);
}
function view_name_as_link() {
$v = (object) $this->values;
return sprintf("%s",
$this->href,
$v->title
);
}
}