1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-15 02:57:15 +02:00

Fixed imageselector to work in both admin->prefs and admin->newspost. Now uses it's own preview shortcode.

This commit is contained in:
CaMer0n
2008-03-18 00:39:02 +00:00
parent 089d734839
commit 99b74405d9
5 changed files with 40 additions and 17 deletions

View File

@@ -0,0 +1,15 @@
// $Id: imagepreview.sc,v 1.1 2008-03-18 00:39:02 e107coders Exp $
global $tp;
list($name,$width,$height,$img_path) = explode("|",$parm);
if(!$width)
{
$width = "32px";
}
if(!$height)
{
$height = "32px";
}
$path = ($_POST[$name] && $_POST['ajax_used']) ? $img_path.$tp->replaceConstants($_POST[$name]) : e_IMAGE_ABS."generic/blank.gif";
return "<img src='".$path."' alt=\"\" style='border: 0px; width: {$width}; height: {$height}' />";