Markus Wandel hat geschrieben:HI 2003,
hab da ne kleine Korrektur für dich:
Jetzt im Forum Regestrieren!
Sollte wohl
heißen.
bye
Markus
Heheh THX ist mir bislang nicht aufgefallen der schreibfehler!
EDT: Das liegt nicht daran das die Bilder als Link angezeigt werden, das muss an diesen Mod liegen:
Code: Alles auswählen
##############################################################
## MOD Title: Post Image Size
## MOD Author: Swizec < swizec@swizec.com > (N/A) http://www.swizec.com
## MOD Description: Admin can set the maximum size of images displayed in posts. Images bigger than that are shrunk and turned into a link to the normal sized version.
## MOD Version: 1.1.4
##
## Installation Level: Easy
## Installation Time: ~3 Minutes
## Files To Edit:
## includes/bbcode.php
## admin/admin_board.php
## templates/subSilver/bbcode.tpl
## templates/subSilver/admin/board_config_body.tpl
## language/lang_english/lang_main.php
## language/lang_english/lang_admin.php
## Included Files: N/A
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## demo board: http://www.swizec.com/forum
##
##############################################################
## MOD History:
##
## 2005-04-17 - Version 1.0.0
## - working mod
##
## 2005-04-17 - Version 1.0.1
## - oops, small bug in the .mod file
##
## 2005-04-17 - Version 1.0.2
## - omg I'm so fucken hasty
##
## 2005-05-01 - Version 1.0.3
## - fixed a bug
##
## 2005-05-01 - Version 1.0.4
## - some slashes got left behind
##
## 2005-05-02 - Version 1.0.5
## - added "this is thumbnail" notice wished by MaddoxX
##
## 2005-05-24 - Version 1.0.6
## - use of bbcode.tpl added
##
## 2005-05-31 - Version 1.0.7
## - getting closer :)
##
## 2005-05-31 - Version 1.1.0
## -fixed a bug
## -implemented image aligning by pichirichi
##
## 2005-06-23 - Version 1.1.1
## - fixed XHTML compliancy
##
## 2005-11-05 - Version 1.1.2
## - fixed for 2.0.18
##
## 2005-11-11 - Version 1.1.3
## - forgot to change the license and security warning before
##
## 2005-11-23 - Version 1.1.4
## - small mistake in the HTML
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
INSERT INTO phpbb_config( config_name, config_value ) VALUES ( 'postimg_width', '800' );
INSERT INTO phpbb_config( config_name, config_value ) VALUES ( 'postimg_height', '600' );
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
$bbcode_tpl = null;
#
#-----[ AFTER, ADD ]------------------------------------------
#
// mod img size add
function makeimgsize ( $width, $height ) {
global $board_config;
$size = '';
if ( $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=right:$uid|img=left:$uid)\](\S+)\[\/(img:$uid)\]/i", $post, $matches);
foreach ( $matches[2] as $k => $img ) {
if ( !$size = @getimagesize( $img ) ) break;
$width = $size[0]; $height = $size[1];
$size = makeimgsize ( $size[0], $size[1] );
$img_align = strtok( $matches[1][$k], ":" );
switch($img_align)
{
case "img=right":
$align = $lang['RIGHT'];
break;
case "img=left":
case "img":
default:
$align = $lang['LEFT'];
break;
}
$first = $matches[1][$k];
$secnd = $matches[3][$k];
$find = '[' . $first . ']' . str_replace( '', '/', $img ) . '[/' . $secnd . ']';
if ( !empty( $size ) )
{
$replace = $bbcode_tpl['thmbimg'];
$seek = array( '{IMAGE}', '{WIDTH}', '{HEIGHT}', '{SIZE}', '{NOTICE}', '{ALIGN}' );
$with = array( $img, $width, $height, $size, $lang['postimg_clickme'], $align );
$replace = str_replace( $seek, $with, $replace );
$post = str_replace( $find, $replace, $post );
}
}
return $post;
}
// mod img size end
#
#-----[ FIND ]------------------------------------------
#
$patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i";
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// mod img size replace with call to image parsing function
$text = image_parse ( $text, $uid );
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
$namechange_no = ( !$new['allow_namechange'] ) ? "checked="checked"" : "";
#
#-----[ AFTER, ADD ]------------------------------------------
#
// mod img size add
$postimg_width = $new['postimg_width'];
$postimg_height = $new['postimg_height'];
// mod img size end
#
#-----[ FIND ]------------------------------------------
#
"L_RESET" => $lang['Reset'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
// mod img size add
"L_POSTIMG_SIZE" => $lang['postimg_size'],
"POSTIMG_WIDTH" => $postimg_width,
"POSTIMG_HEIGHT" => $postimg_height,
// mod img size end
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- END email -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN thmbimg --><div align="{ALIGN}"><a href="#" onclick="javascript: window.open( '{IMAGE}', 'imgpop', 'width={WIDTH},height={HEIGHT},status=no,toolbar=no,menubar=no' );"><img src="{IMAGE}" align="center" border="0" {SIZE} /></a><br /><span class="gensmall"><i>{NOTICE}</i></span></div><!-- END thmbimg -->
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_ENABLE_PRUNE}</td>
<td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES} <input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_POSTIMG_SIZE}</td>
<td class="row2"><input type="text" size="5" maxlength="5" name="postimg_width" value="{POSTIMG_WIDTH}" /> X <input type="text" size="5" maxlength="5" name="postimg_height" value="{POSTIMG_HEIGHT}" /></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// mod img size add
$lang['postimg_clickme'] = 'Thumbnail, click to enlarge.';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// mod img size add
$lang['postimg_size'] = 'Maximum size of images in posts';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Den ein Kumpel hat auch ein Forum, da werden Mega Große Bilder gepostet und die seite steht trotzdem sofort, da glaube ich meines wissen das forum mit den Bilder nix am hut hat.
Es wird das Forum geladen bzw der Thread und die Bilder werden dann generiert.