|
|
|
|
|
|
|
|
foreach($this->structs[$domain_key]['tpl'] as $key=>$file) { |
|
|
foreach($this->structs[$domain_key]['tpl'] as $key=>$file) { |
|
|
$str = \Template::instance()->render(substr($file,7)); |
|
|
$str = \Template::instance()->render(substr($file,7)); |
|
|
$str = self::linkify($str); |
|
|
$str = self::linkify($str); |
|
|
$this->content[$domain][$key."00tpl"] = sprintf( |
|
|
|
|
|
|
|
|
$this->content[$domain][$key."00.tpl"] = sprintf( |
|
|
"<div class=\"item %s %s\">%s</div>", |
|
|
"<div class=\"item %s %s\">%s</div>", |
|
|
'', |
|
|
'', |
|
|
$key, |
|
|
$key, |
|
|
|
|
|
|
|
|
$image_include_version = 2; |
|
|
$image_include_version = 2; |
|
|
switch ($image_include_version) { |
|
|
switch ($image_include_version) { |
|
|
case 1: |
|
|
case 1: |
|
|
$this->content[$domain][$key."10image"] = sprintf( |
|
|
|
|
|
|
|
|
$this->content[$domain][$key."10.image"] = sprintf( |
|
|
"<img class=\"bulkImportedImage $bulkIncludePic\" src=\"/$file\" />" |
|
|
"<img class=\"bulkImportedImage $bulkIncludePic\" src=\"/$file\" />" |
|
|
); |
|
|
); |
|
|
break; |
|
|
break; |
|
|
case 2: |
|
|
case 2: |
|
|
$module = new CEimage(['image',$file,$bulkIncludePic,'gallery']); |
|
|
$module = new CEimage(['image',$file,$bulkIncludePic,'gallery']); |
|
|
$this->content[$domain][$key."10image"] = $module->index(); |
|
|
|
|
|
|
|
|
$this->content[$domain][$key."10.image"] = $module->index(); |
|
|
unset($module); |
|
|
unset($module); |
|
|
break; |
|
|
break; |
|
|
case 3: |
|
|
case 3: |
|
|
|
|
|
|
|
|
; |
|
|
; |
|
|
if ($bulkIncludeAudio) { |
|
|
if ($bulkIncludeAudio) { |
|
|
foreach ($this->structs[$domain_key]['audio'] as $key=>$file) { |
|
|
foreach ($this->structs[$domain_key]['audio'] as $key=>$file) { |
|
|
$this->content[$domain][$key."20audio"] = sprintf( |
|
|
|
|
|
|
|
|
$this->content[$domain][$key."20.audio"] = sprintf( |
|
|
'<a href="%s" class="audio">%s</a><br>', |
|
|
'<a href="%s" class="audio">%s</a><br>', |
|
|
$file, $key |
|
|
$file, $key |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
$str .= sprintf("<tr>%s</tr>",$tmp); |
|
|
$str .= sprintf("<tr>%s</tr>",$tmp); |
|
|
} |
|
|
} |
|
|
$str.="</table>"; |
|
|
$str.="</table>"; |
|
|
$this->content[$domain][$key."30csv"] = $str; |
|
|
|
|
|
|
|
|
$this->content[$domain][$key."30.csv"] = $str; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$content_order = 2; |
|
|
|
|
|
switch ($content_order) { |
|
|
|
|
|
case 0: |
|
|
|
|
|
// don't do any processing |
|
|
|
|
|
// content types appear together |
|
|
|
|
|
// but are not enclosed in a div |
|
|
|
|
|
break; |
|
|
|
|
|
case 1; |
|
|
|
|
|
// all content files appear in alphabetical order |
|
|
|
|
|
ksort($this->content[$domain]); |
|
|
|
|
|
break; |
|
|
|
|
|
case 2: |
|
|
|
|
|
// all content files appear in alphabetical order |
|
|
|
|
|
// groups of same content types are enclosed in a div |
|
|
|
|
|
ksort($this->content[$domain]); |
|
|
|
|
|
|
|
|
|
|
|
$prev = null; |
|
|
|
|
|
foreach ($this->content[$domain] as $key=>$value) { |
|
|
|
|
|
$html = ""; |
|
|
|
|
|
$type = array_pop(explode('.',$key)); |
|
|
|
|
|
|
|
|
|
|
|
if ($type == $prev) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} elseif ($prev != null) { |
|
|
|
|
|
$html = "</div>"; |
|
|
|
|
|
} |
|
|
|
|
|
$html .= "<div class=\"source-file-type-$type-container\">"; |
|
|
|
|
|
|
|
|
|
|
|
$this->content[$domain][$key] = $html.$value; |
|
|
|
|
|
|
|
|
|
|
|
$prev = $type; |
|
|
|
|
|
} |
|
|
|
|
|
$this->content[$domain][] = "</div>"; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |