Hi everyone,
This is my current code snippet:
{
function replaceImage( &$row, $autoresize, $maxchars, $width = 0, $height = 0 ) {
global $database, $_MAMBOTS, $current_charset;
$image = "";
$regex = "/\<img.+src\s*=\s*\"([^\"]*)\"[^\>]*\>/";
preg_match ($regex, $row->text, $matches);
$images = (count($matches)) ? $matches : array();
if (count($images)) $image = $images[1];
if ($image) {
if ($autoresize && function_exists('imagecreatetruecolor')
&& ($image1 = modJaSLWI::processImage ( $image, $width, $height ))) {
$image = 'background:url('.JURI::base().$image1.') no-repeat;';
} else {
$image = 'background:url('.JURI::base().$image.') no-repeat;';
}
I need to make it only process images which have a number in the file name, for example demo2.jpg and not demo.jpg. I think editing the regex and/or the preg_match may do it? It's a wild guess... am i totally wrong?
Thank in advance!