Seite 1 von 1

Thumbnails in Post anzeigen

Verfasst: 27.03.2006 15:18
von xtazzy
Ic hmöchte das ich Images(thumbnails) in einem Post anzeigen kann. Vorher habe ich das Image bei einem Imagehoste rhochgeladen. Der gibt mir nun verschiedene Codes aus. Leider funzt das ganze net so wie ich will.
Ic hwill das das Image als Link angezeigt wird und bei click zum imagehoster in originalgöße angezeigt wird.

habe schon alles gecheckt-nix gefunden...
Bitte helft mir

Verfasst: 27.03.2006 16:18
von gloriosa
Hallo,
Du kannst auch folgendes Snippet

Code: Alles auswählen

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

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

#
#-----[ REPLACE WITH ]-----
#
<!-- BEGIN img --><img src="{URL}" onLoad="scaleImage(this)" border="0" /><!-- END img -->

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

#
#-----[ FIND ]-----
#
</head>

#
#-----[ BEFORE, ADD ]-----
#
<script type="text/javascript">
<!--
var maxImageWidth = 400;
function unscaleImage()
{
     if(maxImageWidth > 0)
         this.width = this.width == maxImageWidth ? this.orgwidth : maxImageWidth;
 }

 function scaleImage(im)
 {
     if (maxImageWidth > 0 && im.width > maxImageWidth)
     {
         im.orgwidth = im.width;
         im.width = maxImageWidth;
         im.onclick = unscaleImage;
         im.title = "Click for fullsize view";
         im.style.cursor = 'pointer';
     }
 }

 //-->
 </script>

 <script language="JavaScript" type="text/javascript">unscaleImage();</script>

#
#-----[ SAVE/CLOSE ALL FILES ]-----
#
# EoM
einbauen, welches dafür sorgt, dass das mit [IMG]-Tags eingebundene Bild erst klein und nach dem Anklicken in Originalgröße dargestellt wird. Siehe hier ein Beispiel ! :D

Verfasst: 28.03.2006 17:56
von yks
ui :grin:
auch ein großes dankeschön beisteuer :grin:

Verfasst: 29.03.2006 16:05
von kbdcalls
Das sieht zwar ganz nett aus, Ich lade meine Billder immer hier hoch .

http://www.imageshack.us/

Und füge dann so einen Link als Beispiel ein.

Code: Alles auswählen

[URL=http://img59.imageshack.us/my.php?image=bildschirmphoto325qo.png][IMG]http://img59.imageshack.us/img59/108/bildschirmphoto325qo.th.png[/IMG][/URL]
[ externes Bild ]

Was mich allerdings mehr nervt das man als Editor Fenster nur so ein Guckloch hat. Die Größe müßte konfigurierbar sein. PS. bei phpBB 3 ist es etwas besser , aber Optimal ist das auch nicht.

Verfasst: 31.03.2006 02:27
von yks
hallo,

übrigens noch ein snippet gefunden habe (aber selbst noch nicht ausprobiert habe). nun aber ka habe, welche vor-/nachteile nun gloriosas, dieses oder das darüber hat. wäre vllt manchmal auch noch ganz interessant.

übrigens gloriosa, manchmal nach dem neu laden werden die bilder nicht verkleinert - aber ka woran das liegt.

Code: Alles auswählen

###############################################
## Mod Title:       Simple Image Resize
## Mod Version:    1.0.0 Final
## Author:       likeatim < admin@essential-freebies.de > < http://www.efb.nu >
## Description:
## Orginal Code by opa@invisionpower.de
## This adds a simple Image resize code so your tables won't get screwed by oversized images.
## Works dynamically with every screen resolution.
## Uses Javascript, so resizing might not work if people have adblocker (Proxomitron etc.) installed.
## Solution: Users should then add your site to their trusted sites within the adblocker.
##
## Installation Level:    Easy
## Installation Time:    1 Minute
## Files To Edit:    bb.code.tpl
## Included Files: n/a
###############################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
###############################################
##
## Author Note:
## No Notes.
##
## the phpBB Group Reserves The Right To Remove/Edit Author Notes,
## Should It Be Warranted
##
###############################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
###############################################

#
#-----[ 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
viele grüße, yks