MyBB Community Forums

Full Version: nCode Image Resizer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Plugin Name: nCode Image Resizer
Plugin Description: This plugin enables you to automatically resize every user-posted image which is larger than given dimensions.
Plugin Author: Bomfile

Installation
[attachment=20531]
  • Download the attached files.
    ncode> home directory.
    inc> home directory.

  • inc/class_parser.php edit:
    Find:
    <img src=\"{$url}\" border=\"0\" alt=\"{$alt}\"{$css_align} />
    Change:
    return "<img src=\"{$url}\" border=\"0\" alt=\"{$alt}\"{$css_align} onload=\"NcodeImageResizer.createOn(this);\"/>";

    Find:
    return "<img src=\"{$url}\" width=\"{$dimensions[0]}\" height=\"{$dimensions[1]}\" border=\"0\" alt=\"{$alt}\"{$css_align} />";
    Change:
    return "<img src=\"{$url}\" width=\"{$dimensions[0]}\" height=\"{$dimensions[1]}\" border=\"0\" alt=\"{$alt}\"{$css_align} onload=\"NcodeImageResizer.createOn(this);\" />";

    Find:
    $nestable_mycode['align']['replacement'] = "<div style=\"text-align: $1;\">$2</div>";
    Change:
    $nestable_mycode['align']['replacement'] = "<div align=\"$1\">$2</div>";

  • Admin Cp>Configuration>Plugins>nCode Image Resizer>Activate.
  • Admin Cp>Configuration>Settings>nCode Image Resizer Settings.

[Image: 71780403.png]
[Image: 69949250.png]

DOWNLOAD:
http://mods.mybb.com/view/ncode-image-resizer
Thread approved.
(2010-11-15, 09:52 PM)bomfile Wrote: [ -> ][*]inc/class_parser.php edit:
Find:
<img src=\"{$url}\" border=\"0\" alt=\"{$alt}\"{$css_align} />
Change:
return "<img src=\"{$url}\" border=\"0\" alt=\"{$alt}\"{$css_align} onload=\"NcodeImageResizer.createOn(this);\"/>";

this is correct?

not will be
<img src=\"{$url}\" border=\"0\" alt=\"{$alt}\"{$css_align} onload=\"NcodeImageResizer.createOn(this);\"/>
?