function theme_imceimage_image($s, $w='', $h='', $a='', $id='') {
$s = 'src="' . $s . '" ';
$a = 'alt="'.$a.'" ';
$id = !empty($id)?'id="'.$id.'" ':'';
return 'Only local images are allowed.';
}

Comments

hedgehog.zx’s picture

sorry
right code:

function theme_imceimage_image($s, $w='', $h='', $a='', $id='') {
  $s = 'src="' . $s . '" ';
  $a = 'alt="'.$a.'" ';
  $id = !empty($id)?'id="'.$id.'" ':'';
  return '<img '.$s.$a.$id.'/>';
}
panis’s picture

hedgehog, pardon my ignorance here - but what is the nature of the problem this fixes and is there a reason why you are ignoring the width and height arguments?

hedgehog.zx’s picture

because this is fast fix :)

function theme_imceimage_image($s, $w='', $h='', $a='', $id='') {
  $s = 'src="' . $s . '" ';
  $a = 'alt="'.$a.'" ';
  $id = !empty($id)?'id="'.$id.'" ':'';
  $w = !empty($w)?'width="'.$w.'" ':'';
  $h = !empty($h)?'height="'.$h.'" ':'';
  return '<img '.$s.$a.$w.$h.$id.'/>';
}
panis’s picture

I am being dense.. What is the problem with the original code - is it slow? or is it not compliant HTML?

hedgehog.zx’s picture

XHTML requires / before > in tags that dosn`t require end tag

hedgehog.zx’s picture

additionally return "text $a another text"; works slower then return 'text '.$a.' another text';

panis’s picture

thanks!! that makes it clear.

hedgehog.zx’s picture

np, mate :)

panis’s picture

Status: Needs review » Fixed

fixed in head.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.