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:
15
e107_files/shortcode/imagepreview.sc
Normal file
15
e107_files/shortcode/imagepreview.sc
Normal 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}' />";
|
Reference in New Issue
Block a user