Resize Images with BB Code Tags

  • Thread starter Thread starter AdminAdmin is verified member.
  • Start date Start date
Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
This new BBcode allows images to be resized to any allowed size. The tags work like this:

[noparse][RESIZE=100][/noparse][noparse]View attachment 2621[/noparse][noparse][/RESIZE][/noparse]

or

[noparse][RESIZE=100][/noparse][noparse]
picture.jpg
[/noparse][noparse][/RESIZE][/noparse]


This will set the image width to 100px. The tags create a span with the specified width around the image and a CSS script sets the image width to inherit from the span

Title: Resize Images

BB Code Tag Name: resize

Replacement:

<style type="text/css">.resize img{width:inherit;}</style>
<span style="width:{option}px;" class="resize">
{param}
</span>


Example: [resize=100]View attachment 2621[/resize]

Description: Allows image resizing.

Use{option}: Yes

Button Image: [noparse]http://www.myforum.com/forum/images/editor/resize.png[/noparse] (Create a link to your actual forum)

Remove Tag If Empty: Yes

Disable BB Code Within This BB Code: No

Disable Smilies Within This BB Code: No

Disable Word Wrapping Within This BB Code: No

Disable Automatic Link Parsing Within This BB Code: No

Download the button then upload to forum/images/editor. Create the proper link for the button image. Fill in the rest of the BB Code settings and you are done. This should work on all vB4 and vB3 versions.
 

Facebook Comments

Similar threads

Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
669
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
D
Replies
0
Views
944
dgtupltn95
D
Admin
Replies
3
Views
1K
boy94
boy94
Admin
Replies
2
Views
880
AdminAdmin is verified member.
Admin
Back
Top