Advertisement
Guest User

Untitled

a guest
Jan 27th, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. if ($imgMaxWidth>0)
  2. {
  3. if ($imgClic == TRUE) $texte = preg_replace_callback('/\[img\](.*?)\[\/img\]/i', create_function('$var', '$img = "<a href=\"" . checkimg($var[1]) . "\" class=\"thickbox\" alt=\"\"><img style=\"border: 0; overflow: auto; max-width: ' . $imgMaxWidth . 'px; width: expression(this.scrollWidth >= ' . $imgMaxWidth . '? \'' . $imgMaxWidth . 'px\' : \'auto\');\" src=\"" . checkimg($var[1]) . "\" alt=\"\" /></a>";return $img;'), $texte);
  4. else $texte = preg_replace_callback('/\[img\](.*?)\[\/img\]/i', create_function('$var', '$img = "<img style=\"border: 0; overflow: auto; max-width: ' . $imgMaxWidth . 'px; width: expression(this.scrollWidth >= ' . $imgMaxWidth . '? \'' . $imgMaxWidth . 'px\' : \'auto\');\" src=\"" . checkimg($var[1]) . "\" alt=\"\" />";return $img;'), $texte);
  5. }
  6. else
  7. {
  8. $texte = preg_replace_callback('/\[img\](.*?)\[\/img\]/i', create_function('$var', '$img = "<img style=\"border: 0;\" src=\"" . checkimg($var[1]) . "\" alt=\"\" />";return $img;'), $texte);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement