Browse Source

two new content modules devide & page

dev01
parent
commit
6edb55f536
1 changed files with 24 additions and 0 deletions
  1. +24
    -0
      app/modules/filesinfolders.php

+ 24
- 0
app/modules/filesinfolders.php View File

@@ -449,7 +449,31 @@ class FilesInFolders {
$new=self::warn("image \"$key\" not found");
}
break;
case 'devide':
$new = "<div>";
$contents = explode($request[1],implode("\n",$body));
$counter=0;
foreach($contents as $part) {
$counter++;
if (count($request) >= 4) {
$part=str_replace([$request[2],$request[3]],["{|","|}"],$part);
$part=$this->content_element_dispatcher($part);
}
$new .= sprintf("<div>%s</div>",
$md->text($part)
);
}
$new.="</div>";
break;

case 'page':
$folder = $this->folder.$request[1]."/";
$f = new \Modules\FilesInFolders($folder);
$f->prepare_files();
$f->fill_content();
$new = implode("\n",$f->content['default']);
break;
case 'youtube':
if( in_array($request[2],array('left','right','full'))) {

Loading…
Cancel
Save