Seite 1 von 1

Image resizer geht nicht richtig

Verfasst: 06.12.2004 22:24
von Sgt. Absolom
Hallo ich habe den Mod eingebaut und ich meine in der Testphase lief der auch. Nur jetzt funktioniert er nicht mehr 100%.

Wenn ich nun ein Bild verlinke das größer ist als es ins Forum passt und ich dann auch Vorschau gehe, gleicht er das perfekt an. Wenn ich aber nun auf absenden drücke dann habe ich das Bild zwar verkleinert aber trotzdem noch einen kleinen Scrollbalken.

Hier mal der Link damit ihr euch das anschauen könnt was ich meine. Wäre für schnelle Hilfe dankbar denn ich möchte das Forum nachdem ich endlich ein Banner habe endlich verlinken :)

http://www.world-of-miniatures.de/phpBB ... hp?p=31#31

Verfasst: 07.12.2004 01:10
von Angela Goldig
ich vermisse in deiner overall_header.tpl javascript das zu diesem mod gehört. schau mal ob du auch alles richtig eingefügt hast.

Verfasst: 07.12.2004 08:04
von Sgt. Absolom
In der Installationsdatei zu dem Skript steht aber doch nur folgendes

Code: Alles auswählen

#
#-----[ OPEN ]------------------------------------------
#
templates/subsilver (or whatever you use/bbcode.tpl



#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->

#
#-----[ REPLACE WITH ]------------------------------------------
#
<!-- BEGIN img --><img src='{URL}' border='0' onload="javascript:if(this.width > screen.width-300)this.width = (screen.width-300)" onclick="javascript:window.open('{URL}','','scrollbars=1,toolbar=0,resizable=1,menubar=0,directories=0,status=0')" alt="Posted Image, might have been reduced in size. Click Image to view fullscreen." title="Posted Image, might have been reduced in size. Click Image to view fullscreen." /><!-- END img -->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Fehlt da jetzt noch was?

Verfasst: 07.12.2004 11:40
von marino
ich hatte mit dem auch riesen probleme , wo mir hier keiner weiterhelfen konnte .. auf phpbb.com war die einzigste antwort die ich bekam dem mod wieder rauszuschmeissen ( weil wohl fehlerhaft) und einen "manual image resize" einzubauen

der funktionierte absolut fehlerfrei ( ist allerdings bissel umständlicher zu handhaben da du da im imagecode [img] auch die werte für höhe und breite jedesmal eintragen musst .. allerdings .. er funktioniert eben fehlerfrei ....

hier bei phpbb.de findest du den code hier..
http://www.phpbb.de/moddb/mod.php?id=87

Verfasst: 07.12.2004 20:36
von Sgt. Absolom
So also ich habe mich eben mal hingesetzt und ein wenig probiert. Wenn man folgendes ändert gehts:


Man ändere:

Code: Alles auswählen

<!-- BEGIN img --><img src='{URL}' border='0' onload="javascript:if(this.width > screen.width-300)this.width = (screen.width-300)" 
IN:

Code: Alles auswählen

<!-- BEGIN img --><img src='{URL}' border='0' onload="javascript:if(this.width > screen.width-300)this.width = (screen.width-400)" 
Dann ist der Balken weg.

Verfasst: 09.12.2004 01:29
von Angela Goldig
also ich hab den

Code: Alles auswählen

############################################################## 
## MOD Title: Downsize Any Larges Images 
## MOD Author: rossmcclymont < rossmcclymont@gmail.com > (Ross McClymont) http://www.xboxelite.co.uk
## MOD Description: This simple script will downsize ANY image on any page of your forum with the full header included. Admin configurable.
## MOD Version: 1.0.0
## 
## Installation Level: (Easy) 
## Installation Time: ~5 Minutes (~1 minute with Nutty99's great EasyMOD!) 
## Files To Edit: 
##               admin_board.php
##               board_config_body.tpl
##               lang_admin.php
##               page_header.php
##               overall_header.tpl
## Included Files: N/A 
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
##    - This script will downsize ANY images on any page with the full header on it.
##    - That includes your logo if it's bigger than your specified maximum!
##    - I've defaulted the maximum width to 500px.
##    - If you don't want it to be 500, you can change it on the Admin Config page.
############################################################## 
## MOD History: 
## 
##   2004-11-08 - Version 1.0.0
##      - Submitted into phpBB.com's MOD Database - first official release!
## 
##   2004-11-07 - Version 0.1.0
##      - Made maximum width configurable through Admin Panel. 
##
##   2004-10-27 - Version 0.0.3 
##      - Added full-sized images in pop-up functionality. 
## 
##   2004-10-26 - Version 0.0.2 
##      - Fixed a rather important bug. :D 
## 
##   2004-10-25 - Version 0.0.1 
##      - Initial testing release! 
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ SQL ]--------------------------------- 
#
INSERT INTO `phpbb_config` VALUES ('imagewidth', '500');

# 
#-----[ OPEN ]--------------------------------- 
# 
admin/admin_board.php 

# 
#-----[ FIND ]--------------------------------- 
# 
	"L_ENABLE_PRUNE" => $lang['Enable_prune'],

# 
#-----[ AFTER, ADD ]--------------------------------- 
# 
	"L_IMAGEWIDTH" => $lang['imagewidth'],
	"L_IMAGEWIDTH_EXPLAIN" => $lang['imagewidth_explain'],

# 
#-----[ FIND ]--------------------------------- 
# 
	"PRUNE_NO" => $prune_no, 

# 
#-----[ AFTER, ADD ]--------------------------------- 
#
	"IMAGEWIDTH" => $new['imagewidth'],

# 
#-----[ 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}&nbsp;&nbsp;<input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
	</tr>

# 
#-----[ AFTER, ADD ]--------------------------------- 
#
	<tr>
		<td class="row1">{L_IMAGEWIDTH}<br /><span class="gensmall">{L_IMAGEWIDTH_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" maxlength="3" size="5" name="imagewidth" value="{IMAGEWIDTH}" /></td>
	</tr>

# 
#-----[ OPEN ]------------------------------------------------ 
# 
language/lang_english/lang_admin.php

# 
#-----[ FIND ]------------------------------------------------
#
//
// That's all Folks!

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
$lang['imagewidth'] = "Maximum Image Width (pixels)"; 
$lang['imagewidth_explain'] = "Make sure none of your template files are bigger than this width!";

# 
#-----[ OPEN ]--------------------------------- 
# 
includes/page_header.php

# 
#-----[ FIND ]--------------------------------- 
# 
	'PRIVMSG_IMG' => $icon_pm, 

# 
#-----[ AFTER, ADD ]--------------------------------- 
# 
	'IMAGEWIDTH' => $board_config['imagewidth'],

# 
#-----[ OPEN ]--------------------------------- 
# 
templates/subSilver/overall_header.tpl 

# 
#-----[ FIND ]--------------------------------- 
# 
<!-- END switch_enable_pm_popup --> 

# 
#-----[ AFTER, ADD ]--------------------------------- 
# 
<script> 
window.onload = resizeimg; 
function resizeimg() 
{ 
   if (document.getElementsByTagName) 
   { 
      for (i=0; i<document.getElementsByTagName('img').length; i++) 
      { 
         im = document.getElementsByTagName('img')[i]; 
         if (im.width > {IMAGEWIDTH}) 
         { 
            im.style.width = '{IMAGEWIDTH}px'; 
            eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")"); 
            eval("im.onclick = pop" + String(i) + ";"); 
            if (document.all) im.style.cursor = 'hand'; 
            if (!document.all) im.style.cursor = 'pointer'; 
            im.title = 'Click to enlarge'; 
         } 
      } 
   } 
} 

</script> 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
der klappt prima und man kann die größe der bilder im acp einstellen.

Verfasst: 09.12.2004 07:42
von Sgt. Absolom
Danke werde den mal lokal ausprobieren. Vielleicht ersetze ich meinen dann damit

Verfasst: 29.02.2008 17:28
von distanzcheck
hat das schonmal jemand erfolgreich getestet ?

Dirk