* @license http://www.contenido.org/license/LIZENZ.txt * @link http://www.4fb.de * @link http://www.contenido.org * * $Id: functions.include.php 450 2016-07-20 11:11:12Z oldperl $: */ if(!defined('CON_FRAMEWORK')) { die('Illegal call'); } function getTeaserImage ($text,$return = 'path') { $regEx = "/]*?>.*?/i"; $match = array(); preg_match($regEx, $text, $match); $regEx = "/(src)(=)(['\"]?)([^\"']*)(['\"]?)/i"; $img = array(); preg_match($regEx, $match[0], $img); if ($return == 'path') { return $img[4]; } else { return $match[0]; } } ?>