*/
- static function replaceImgURLS($html)
+ static function replaceImageURLS($html)
{
$ff = HTML_FlexyFramework::get();
- if (!isset($ff->Pman_Image['public_baseURL'])) {
+ if (!isset($ff->Pman_Images['public_baseURL'])) {
return $html;
}
- $baseURL = $ff->Pman_Image['public_baseURL'];
+ //var_dump($ff->Pman_Images['public_baseURL']);
+ $baseURL = $ff->Pman_Images['public_baseURL'];
- preg_match_all('/<img\w[^>]+>/i',$html, $result);
-
+ preg_match_all('/<img\s+[^>]+>/i',$html, $result);
+ //print_r($result);
$matches = array_unique($result[0]);
foreach($matches as $img) {
$imatch = array();
}
$result = array();
- preg_match_all('/<a\w[^>]+>/i',$html, $result);
+ preg_match_all('/<a\s+[^>]+>/i',$html, $result);
$matches = array_unique($result[0]);
foreach($matches as $img) {
if (count($type) > 2 && $type[1] == 'Thumb') {
$thumbsize = $type[2];
- $provider = 'Images/Thumb';
+ $provider = '/Images/Thumb';
} else {
- $provider = $umatch[1];
+ $provider = '/'.$umatch[1];
}
if (!empty($attr['width']) || !empty($attr['height']) )
(empty($attr['width']) ? '0' : $attr['width'] * 1) .
'x' .
(empty($attr['height']) ? '0' : $attr['height'] * 1);
-
+ $provider = '/Images/Thumb';
}
// finally replace the original TAG with the new version..
$new_tag = str_replace(
- $attr_name. '="'. $attr['src'] . '"',
+ $attr_name. '="'. $attr_url . '"',
$attr_name .'="'. htmlspecialchars($img->URL($thumbsize, $provider, $baseURL)) . '"',
$tag
);