absPath.'site/pictures/'; # get a list of those folders $folders = filesys_get_wanted_children($pictures_path,'files'); # make each folder a full path foreach($folders as $key => $value) { $folders[$key] = $pictures_path.$value; } $image = images_get_random($folders,1,"/thumb_/"); $image = str_replace($this->absPath,'',$image[0]); $children = filesys_get_wanted_children($this->templates,'folders',"/ourfamilies_/"); $text = ''; foreach($children as $child) { $name = preg_replace('/ourfamilies_(\w+)\.php/','$1',$child); if(strstr($image,$name)) { $text = file_get_contents($this->templates.$child); $first_p = strpos($text,'

') + 3; # we want the second paragraph $open_p = strpos($text,'

',$first_p) + 3; $num_chars = strpos($text,'

',$open_p) - $open_p; $text = preg_replace('//','',substr($text,$open_p,$num_chars)); $text = substr(strip_tags($text),0,170).'...'; break; } } ?>


mehr lesen

Internationale Jairus Verein