Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
BBCode: Resize Image with Text Wrap Details »
BBCode: Resize Image with Text Wrap
Mod Version: 1.01, by midnz (Coder) midnz is offline
Developer Last Online: Mar 2021 I like it Show Printable Version Email this Page

vB Version: 4.0.6 Rating: (7 votes - 5.00 average) Installs: 30
Released: 18 Aug 2010 Last Update: Never Downloads: 0
Not Supported Re-usable Code Translations  

Resize Image with Text Wrap BBCode

I created this BB Code for my own forum and thought I'd share it with the community.
This BB Code allows images to be posted at 200px Wide with text wrapping. Double-clicking the image enlarges it to 600px Wide. Single-clicking reduces the image size back to 200px Wide. The size/resize dimensions can easily be altered to suit your individual requirements. Just change the width= dimensions in the code below.

Demo Here

Instructions:
Open the BBCode Manager/Add New BBCode

Title: Resize Image

BB Code Tag Name: RI

Replacement:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



Example:
[RI]image web address goes here[/RI]

Description: Post image at 200px Wide with text wrap. Double-click to enlarge to 600px Wide. Single-click to reduce back to 200px Wide.

Use {option}: No
Button Image (Optional): images/editor/ri.png (upload the attached image via FTP to /images/editor folder) Kindly supplied by VonDoom Post#6
Remove Tag If Empty: Yes
Disable BB Code Within This BB Code: Yes
Disable Smilies Within This BB Code: Yes
Disable Word Wrapping Within This BB Code: Yes
Disable Automatic Link Parsing Within This BB Code: Yes


Please mark as installed if you use this

________________________________________________________________

V. 1.01
  • Removed height attributes to maintain image proportions (Thanks to djbaxter )

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	Image Resize 1.JPG
Views:	565
Size:	170.7 KB
ID:	120971   Click image for larger version

Name:	Image Resize 2.JPG
Views:	571
Size:	121.1 KB
ID:	120972  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 18 Aug 2010, 14:21
Dr.osamA's Avatar
Dr.osamA Dr.osamA is offline
 
Join Date: Aug 2004
Location: Syrie
Real name: Dr.osama
The following BB Code replacement may not be properly formed. All HTML attributes should be enclosed within double quotes.

* <img src="{param}" width="200" height="150" ondblclick="this.src='{param}';this.height=450;this.width=600" onclick="this.src='{param}';this.height=150;this.width=200" align="left" hspace="10"><!{param}>
installed but ithing i do something rwong

any help plzzz

thanxxxx
__________________
Reply With Quote
  #3  
Old 18 Aug 2010, 15:49
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
I get that same error message for several custom BBCode entries. All of those BBCodes work fine. It's the error message itself that is in error.
Reply With Quote
  #4  
Old 18 Aug 2010, 17:32
Juggernaut's Avatar
Juggernaut Juggernaut is offline
 
Join Date: Dec 2009
I got same error message with some bbcodes, they work fine however. I use vBulletin 4.0.6
Reply With Quote
  #5  
Old 18 Aug 2010, 20:35
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Real name: Wayne
Originally Posted by Destron View Post
I got same error message with some bbcodes, they work fine however. I use vBulletin 4.0.6
Thanks for that guys .

Last edited by midnz; 13 Jun 2011 at 01:32.
Reply With Quote
  #6  
Old 18 Aug 2010, 22:26
VonDoom's Avatar
VonDoom VonDoom is offline
 
Join Date: Dec 2008
This is going to be my most frequently used BB code. This really give a nice clean and pro feel. Installed and rated. Thanks a ton for this.. My staff is already running around editing our news forums.

I also quick jammed out a button for this, just add it to your Images/Editor folder via FTP and add the Img url to the Button Image (Optional) location when creating your new custom BB code.
Attached Images
File Type: png ri.png (3.5 KB, 1759 views)
__________________
Reply With Quote
  #7  
Old 18 Aug 2010, 22:36
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Real name: Wayne
Originally Posted by VonDoom View Post
This is going to be my most frequently used BB code. This really give a nice clean and pro feel. Installed and rated. Thanks a ton for this.. My staff is already running around editing our news forums.

I also quick jammed out a button for this, just add it to your Images/Editor folder via FTP and add the Img url to the Button Image (Optional) location when creating your new custom BB code.
Awesome! I'm glad you like it . Is it okay for me to add your button image to my release post above?

Last edited by midnz; 18 Aug 2010 at 23:48.
Reply With Quote
  #8  
Old 18 Aug 2010, 23:04
VonDoom's Avatar
VonDoom VonDoom is offline
 
Join Date: Dec 2008
Is it okay for me to add your button image my release post above?
Sure thing!

I wanted to also add it works perfectly on the Blogs and CMS to. Actually is a great CMS product enhancement.. haha i just cant stop editing every other article on my home page now. I have nominated this little bad ass mambo jambo
__________________

Last edited by VonDoom; 18 Aug 2010 at 23:43.
Reply With Quote
  #9  
Old 19 Aug 2010, 00:00
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Real name: Wayne
Originally Posted by VonDoom View Post
Sure thing!

I wanted to also add it works perfectly on the Blogs and CMS to. Actually is a great CMS product enhancement.. haha i just cant stop editing every other article on my home page now. I have nominated this little bad ass mambo jambo
Thank-you very much for the button. I've added it to the first post in this thread and am also using it on my own forum now. Cheers for the great feedback and the nomination. I'm glad I released it now. I almost didn't .
Reply With Quote
  #10  
Old 19 Aug 2010, 01:04
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Nice mod there midnz
thanks for your efforts
Seemed interesting so I test it out..

seems if you add the image to a post with a couple lines. ..
it over laps down wards into the sig area..
Not sure if any one noticed it yet
I sure will use it if this could be fixed ..
Reply With Quote
  #11  
Old 19 Aug 2010, 03:24
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Real name: Wayne
Originally Posted by Hippy View Post
Nice mod there midnz
thanks for your efforts
Seemed interesting so I test it out..

seems if you add the image to a post with a couple lines. ..
it over laps down wards into the sig area..
Not sure if any one noticed it yet
I sure will use it if this could be fixed ..
Thanks for noticing that issue. I'll have a look at fixing the problem tonight when I get back from my travels.

EDIT: I've spent a few hours trying different remedies with limited results so far. It seems that images and tables with align=left or align=right don't appear to work in posts any more without interfering with signatures whereas using align=center, align=top & align=bottom do work without interfering with signatures. I'll have to ask over at vB.com to look further in to the problem. Problem solved.

Last edited by midnz; 20 Aug 2010 at 02:15.
Reply With Quote
  #12  
Old 20 Aug 2010, 01:57
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Real name: Wayne
Originally Posted by Hippy View Post
Nice mod there midnz
thanks for your efforts
Seemed interesting so I test it out..

seems if you add the image to a post with a couple lines. ..
it over laps down wards into the sig area..
Not sure if any one noticed it yet
I sure will use it if this could be fixed ..
If you view the demo link posted in the first post of this thread you'll see that the second post of my demo thread shows that this BBCode works with minimal text added and without interfering with the posted signature.

The problem of signature interference appears to arise when you use image or table align="left or right" after editing your postbit.css with the instructions placed in this mod.

I've replaced

Admin CP -> Style & Templates -> Style Manager -> CSS Templates -> Postbit.css


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

with

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

...and your reported signature interference error has vanished.
Reply With Quote
  #13  
Old 20 Aug 2010, 16:57
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
FYI, the warning message isn't 'bogus' at least not in this case... for various security reasons it's better to always enclose the {param} tags in double quotes rather then single quotes... while I highly doubt anyone will have a problem the following codes will not display the error and is technically a bit safer. (I swapped the single and double quotes):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Also I'm not sure what the purpose of "<!{param}>" is- I don't know what it does and it seems to work fine for me without it.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #14  
Old 20 Aug 2010, 17:37
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
I meant to come back and comment on this, too. In fact, the errors I was receiving with a couple of other BBCodes were valid errors - some I could fix and some I couldn't.

As Bird of Prey says, don't ignore such errors - they do mean something and may create a vulnerability if ignored.
Reply With Quote
  #15  
Old 20 Aug 2010, 21:18
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Real name: Wayne
Originally Posted by BirdOPrey5 View Post
FYI, the warning message isn't 'bogus' at least not in this case... for various security reasons it's better to always enclose the {param} tags in double quotes rather then single quotes... while I highly doubt anyone will have a problem the following codes will not display the error and is technically a bit safer. (I swapped the single and double quotes):

Also I'm not sure what the purpose of "<!{param}>" is- I don't know what it does and it seems to work fine for me without it.
Thanks very much for the advice and assistance. I've edited in the double quotes where they should have been. The "<!{param}>" was unnecessary and should've been removed after I'd finished testing. That's done now, cheers .

Originally Posted by djbaxter View Post
I meant to come back and comment on this, too. In fact, the errors I was receiving with a couple of other BBCodes were valid errors - some I could fix and some I couldn't.

As Bird of Prey says, don't ignore such errors - they do mean something and may create a vulnerability if ignored.
Thanks for that advice. All fixed .
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:14.

Layout Options | Width: Wide Color: