Resize aanpassing

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
ownageworld
Berichten: 252
Lid geworden op: 03 jun 2006, 17:35
Locatie: Brussel

Resize aanpassing

Bericht door ownageworld » 25 jul 2006, 14:00

Ik gebruik het huidige image resize MOD om plaatjes te vergroten en verkleinen... hij werkt fantastisch, maar zou wel graag een aanpassing daarvoor willen zien als dat kan!

Ik zou graag willen hebben dat hij op mijn portals alle plaatjes resized naar bijv 300*200 en dat hij alle andere plaatjes overal op het forum resized naar 580 zoals hieronder staat.... Is dit mogelijk?


Ook resized hij niet in IE! Hoe komt dit en wat kan ik er aan doen zodat hij het wel doet? Of doet hij het bij anderen wel?

Dit is de code:

Code: Selecteer alles


<!-- resize images by Gert en Hieronymus. http://gathering.tweakers.net/forum/list_messages/826648///Images,resizen,javascript -->
<style type="text/css">

img[onload] {
  max-width: 580px;
}

img.resized {
  border: 2px dashed red;
  cursor: pointer;
  cursor: hand;
}

</style>
<script type="text/javascript">

var maxWidth = 580;

function scaleImage(im) {

  if (typeof im.naturalWidth == 'undefined') im.naturalWidth = im.width;

  if (im.naturalWidth > maxWidth) {

    im.width = maxWidth;
    im.style.maxWidth = im.naturalWidth + 'px';
    im.className = 'resized';
    im.title = 'Klik voor originele grootte';
    im.onclick = unscaleImage;

  }

}

function unscaleImage() {

  if (this.width == maxWidth) {

    this.width = this.naturalWidth;
    this.style.borderWidth = '0px';
    this.title = 'Klik om te verkleinen';

  } else {

    this.width = maxWidth;
    this.style.borderWidth = '2px';
    this.title = 'Klik voor originele grootte';

  }

}

</script> 



Gesloten