Преглед на файлове

make automatic inclusion of images and audio optional

master
Dom SP преди 3 години
родител
ревизия
cd3425839c
променени са 3 файла, в които са добавени 15 реда и са изтрити 3 реда
  1. +12
    -3
      app/modules/filesinfolders.php
  2. +2
    -0
      main.cfg.sample
  3. +1
    -0
      rsc/sass/_freaCMSfeatures.scss

+ 12
- 3
app/modules/filesinfolders.php Целия файл

@@ -120,6 +120,7 @@ class FilesInFolders {
// prepare content as per the struct //
///////////////////////////////////////
function fill_content() {
$f3 = \Base::instance();
$md = new \freaParsedown();
$md->deactivate_ol();
//var_dump($md->get_BlockTypes());
@@ -151,14 +152,22 @@ class FilesInFolders {
$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) {
$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) {
$this->content[$domain][$key] = sprintf(
'<a href="%s" class="audio">%s</a><br>',

+ 2
- 0
main.cfg.sample Целия файл

@@ -32,6 +32,8 @@ color3=#bbb
[globals]
title=Title of new Page
hideFromSearchEngines=true
bulkIncludePic=false
bulkIncludeAudio=false

;; (multilingual) content configuration
;; ------------------------------------

+ 1
- 0
rsc/sass/_freaCMSfeatures.scss Целия файл

@@ -61,6 +61,7 @@ a.content_element_box {
}

// image
.bulkImportedImage,
.content_element_image {
width: 60%;

Loading…
Отказ
Запис