|
|
|
|
|
|
|
|
// prepare content as per the struct // |
|
|
// prepare content as per the struct // |
|
|
/////////////////////////////////////// |
|
|
/////////////////////////////////////// |
|
|
function fill_content() { |
|
|
function fill_content() { |
|
|
|
|
|
$f3 = \Base::instance(); |
|
|
$md = new \freaParsedown(); |
|
|
$md = new \freaParsedown(); |
|
|
$md->deactivate_ol(); |
|
|
$md->deactivate_ol(); |
|
|
//var_dump($md->get_BlockTypes()); |
|
|
//var_dump($md->get_BlockTypes()); |
|
|
|
|
|
|
|
|
$str |
|
|
$str |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
if (false) { // TODO: make this configurable in main.cfg |
|
|
|
|
|
|
|
|
$bulkIncludePic = array_key_exists('bulkIncludePic',$this->config) |
|
|
|
|
|
? $this->config['bulkIncludePic'] |
|
|
|
|
|
: $f3->get('bulkIncludePic') ? : FALSE |
|
|
|
|
|
; |
|
|
|
|
|
if ($bulkIncludePic) { |
|
|
foreach($this->structs[$domain_key]['pic'] as $key=>$file) { |
|
|
foreach($this->structs[$domain_key]['pic'] as $key=>$file) { |
|
|
$this->content[$domain][$key] = sprintf( |
|
|
$this->content[$domain][$key] = sprintf( |
|
|
"<img class=\"direct\" src=\"/$file\" />" |
|
|
|
|
|
|
|
|
"<img class=\"bulkImportedImage $bulkIncludePic\" src=\"/$file\" />" |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (true) { |
|
|
|
|
|
|
|
|
$bulkIncludeAudio = array_key_exists('bulkIncludeAudio',$this->config) |
|
|
|
|
|
? $this->config['bulkIncludeAudio'] |
|
|
|
|
|
: $f3->get('bulkIncludeAudio') ? : FALSE |
|
|
|
|
|
; |
|
|
|
|
|
if ($bulkIncludeAudio) { |
|
|
foreach ($this->structs[$domain_key]['audio'] as $key=>$file) { |
|
|
foreach ($this->structs[$domain_key]['audio'] as $key=>$file) { |
|
|
$this->content[$domain][$key] = sprintf( |
|
|
$this->content[$domain][$key] = sprintf( |
|
|
'<a href="%s" class="audio">%s</a><br>', |
|
|
'<a href="%s" class="audio">%s</a><br>', |