The 404 module has received a security update for any version below v1.6!
If you are using this module on your website you are advised to upgrade the module as soon as possible!

Sorry, this page is only available in one language


Suggested dropletname: ShowRandomWYSIWYG

Published by: dbs

Randomly display one WYSIWYG section from a given list

global $database;
$content = '';
if (isset($section)) {
 if( preg_match('/^[0-9]+(?:s*[,|-;:+#/]s*[0-9]+s*)*$/', $section)) {
 if (is_readable(WB_PATH.'/modules/wysiwyg/view.php')) {
 // if valid arguments given and module wysiwyg is installed
 // split and sanitize arguments
  $aSections = preg_split('/[s,|-;:+#/]+/', $section);
  $section_id = $aSections[array_rand($aSections)]; // get random element
  ob_start(); // generate output by wysiwyg module
  $content = ob_get_clean();
return $content;



possible Delimiters: [ ,;:|-+#/ ]


« Previous droplet | Overview | Next droplet »