Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
BBCode: Resize Image with Text Wrap Details »»
BBCode: Resize Image with Text Wrap
Version: 1.01, by midnz midnz is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 4.0.6 Rating:
Released: 08-17-2010 Last Update: Never Installs: 31
Re-useable Code Translations  
No support by the author.

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:
Code:
<img src="{param}" width="200"  ondblclick='this.src="{param}";this.width=600' onclick='this.src="{param}";this.width=200' align="left" hspace="10">


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 )

Screenshots

File Type: jpg Image Resize 1.JPG (170.7 KB, 0 views)
File Type: jpg Image Resize 2.JPG (121.1 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-18-2010, 12:21 PM
Dr.osamA's Avatar
Dr.osamA Dr.osamA is offline
 
Join Date: Aug 2004
Location: Syrie
Posts: 979
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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;thi s.width=600" onclick="this.src='{param}';this.height=150;this.w idth=200" align="left" hspace="10"><!{param}>
installed but ithing i do something rwong

any help plzzz

thanxxxx
Reply With Quote
  #3  
Old 08-18-2010, 01:49 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 08-18-2010, 03:32 PM
Juggernaut Juggernaut is offline
 
Join Date: Dec 2009
Location: California
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got same error message with some bbcodes, they work fine however. I use vBulletin 4.0.6
Reply With Quote
  #5  
Old 08-18-2010, 06:35 PM
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Location: New Zealand
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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 .
Reply With Quote
  #6  
Old 08-18-2010, 08:26 PM
VonDoom's Avatar
VonDoom VonDoom is offline
 
Join Date: Dec 2008
Location: USA
Posts: 494
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 08-18-2010, 08:36 PM
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Location: New Zealand
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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?
Reply With Quote
  #8  
Old 08-18-2010, 09:04 PM
VonDoom's Avatar
VonDoom VonDoom is offline
 
Join Date: Dec 2008
Location: USA
Posts: 494
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Reply With Quote
  #9  
Old 08-18-2010, 10:00 PM
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Location: New Zealand
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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 08-18-2010, 11:04 PM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply


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

Forum Jump


All times are GMT. The time now is 02:44 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07970 seconds
  • Memory Usage 2,329KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete