Added editing function for pages (using tinymce).

Added editing pages for footer, banner, aside.
Added page overview.
Added public page.
Added settings page.
Added generator for embed pseudocodes.
This commit is contained in:
2018-06-13 20:07:24 +02:00
committed by Stefan Rohde-Enslin
parent 227c91963e
commit a49746ab10
114 changed files with 4422 additions and 47 deletions

43
inc/mdEmbeds.php Normal file
View File

@ -0,0 +1,43 @@
<?PHP
/**
* For embedding from museum-digital functions.
*
* @file
*
* @author Joshua Ramon Enslin <joshua@jrenslin.de>
*/
/**
* Function for checking a text for the existence of pseudocode
* for embedding from museum-digital.
*
* @param string $text Input string.
*
* @return string
*/
function checkForEmbeds(string $text):string {
$embedOptions = [
"eventCalendar"
];
foreach ($embedOptions as $option) {
if (strpos($text, $option) === false) continue;
$position = strpos($text, $option) - 1;
$nextTag = strpos($text, "<", $position);
$nextWhitespace = strpos($text, " ", $position);
$end = min($nextTag, $nextWhitespace, strlen($text));
$pseudocode = substr($text, $position, $position + $end);
echo $pseudocode;
}
return $text;
}
?>