1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Remove debug code

This commit is contained in:
e107steved
2009-09-05 08:23:55 +00:00
parent 945c714b4d
commit 3833516dea

View File

@@ -1,3 +1,5 @@
// $Id: img.bb,v 1.13 2009-09-05 08:23:55 e107steved Exp $
// General purpose image bbcode. As well as the obvious insertion of a picture: // General purpose image bbcode. As well as the obvious insertion of a picture:
// a) if filname begins with 'th_' or 'thumb_', creates link to main image opening in new window // a) if filname begins with 'th_' or 'thumb_', creates link to main image opening in new window
// b) If filename contains '*', treats it as a wildcard, and displays a random image from all matching file names found // b) If filename contains '*', treats it as a wildcard, and displays a random image from all matching file names found
@@ -80,7 +82,6 @@ if (strpos($img_file['basename'],'*') !== FALSE)
} }
} }
$pref['image_post_class'] = 0;
// Check for whether we can display image down here - so we can show image name if appropriate // Check for whether we can display image down here - so we can show image name if appropriate
if (!varsettrue($pref['image_post']) || !check_class($pref['image_post_class'])) if (!varsettrue($pref['image_post']) || !check_class($pref['image_post_class']))
@@ -99,21 +100,21 @@ if (!varsettrue($pref['image_post']) || !check_class($pref['image_post_class']))
// Check for link to main image if required // Check for link to main image if required
if (strpos($img_file['basename'],'th_') === 0) if (strpos($img_file['basename'],'th_') === 0)
{ {
$addlink = TRUE; $addlink = TRUE;
$main_name = $img_file['dirname']."/".substr($img_file['basename'],3); // delete the 'th' prefix from file name $main_name = $img_file['dirname']."/".substr($img_file['basename'],3); // delete the 'th' prefix from file name
} }
elseif (strpos($img_file['basename'],'thumb_') === 0) elseif (strpos($img_file['basename'],'thumb_') === 0)
{ {
$addlink = TRUE; $addlink = TRUE;
$main_name = $img_file['dirname']."/".substr($img_file['basename'],6); // delete the 'thumb' prefix from file name $main_name = $img_file['dirname']."/".substr($img_file['basename'],6); // delete the 'thumb' prefix from file name
} }
if ($addlink) if ($addlink)
{ {
return "<a href='".$main_name."' rel='external'><img src='".$code_text."' {$parmStr} /></a>"; return "<a href='".$main_name."' rel='external'><img src='".$code_text."' {$parmStr} /></a>";
} }
else else
{ {
return "<img src='".$code_text."' {$parmStr} />"; return "<img src='".$code_text."' {$parmStr} />";
} }