hab nen Porblem mit dem image resize der nicht greifen will:
Code: Alles auswählen
// mod img size add
function makeimgsize ( $width, $height )
{
global $board_config;
$size = '';
// check for smallness
if ( $width < $board_config['postimg_width'] && $height < $board_config['postimg_height'] )
{
return 'SMALL';
}
elseif ( $width > $height )
{
if ( $board_config['postimg_width'] < $width )
{
$size = 'width="' . $board_config['postimg_width'] . '"';
}
}else
{
if ( $board_config['postimg_height'] < $height )
{
$size = 'height="' . $board_config['postimg_height'] . '"';
}
}
return $size;
}
function image_parse ( $post, $uid )
{
global $board_config, $lang, $bbcode_tpl;
preg_match_all( "/\[img(.*?):$uid\](.*?)\[\/img:$uid\]/i", $post, $matches);
foreach ( $matches[0] as $i => $img )
{
$stuff = $matches[1][$i];
$stuff = explode( ':', $stuff );
if ( count( $stuff ) != 4 )
{ // old image or something
$post = preg_replace( "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i", $bbcode_tpl['img'], $post );
}
switch($stuff[0])
{
case '=right':
$align = $lang['RIGHT'];
break;
case '=center':
$align = 'center';
break;
case '=left':
default:
$align = $lang['LEFT'];
break;
}
$width = $stuff[1];
$height = $stuff[2];
$size = makeimgsize( $width, $height );
if ( $size != 'SMALL' )
{
$replace = $bbcode_tpl['thmbimg'];
$seek = array( '{IMAGE}', '{WIDTH}', '{HEIGHT}', '{SIZE}', '{NOTICE}', '{ALIGN}' );
$with = ( !empty( $size ) ) ? array( $matches[2][$i] , $width, $height, $size, $lang['postimg_clickme'], $align ) : array( $matches[2][$i] , $width, $height, $size, '', $align );
$replace = str_replace( $seek, $with, $replace );
}
else
{
$replace = str_replace( '\1', $matches[2][$i], $bbcode_tpl['img'] );
}
$post = str_replace( $img, $replace, $post );
}
return $post;
}
// mod img size end
---------
$bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']);
// BEGIN Resize Images
$bbcode_tpl['resized_img'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['resized_img']);
$bbcode_tpl['resized_img'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['resized_img']);
$bbcode_tpl['resized_img'] = str_replace('{URL}', '\\3', $bbcode_tpl['resized_img']);
// END Resize Images
Das Problem ist folgendes:
Wenn ich den Zugriff auf Gallery Bilder nicht allen Benutzern zugänglich machen will sondern nur registrierten, so funktioniert der image resize nicht mehr. Ja ich habe das ganze so abgeändert, dass man gallery bilder posten kann.. funktioniert auch super.
Hat wer ne idee was ich abändern muss, damit der auch bei "geschützten Bildern" greift ?