vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - BBCode: Resize Image with Text Wrap (https://vborg.vbsupport.ru/showthread.php?t=248863)

midnz 08-17-2010 10:00 PM

BBCode: Resize Image with Text Wrap
 
1 Attachment(s)
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 :))

Dr.osamA 08-18-2010 12:21 PM

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

djbaxter 08-18-2010 01:49 PM

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.

Juggernaut 08-18-2010 03:32 PM

I got same error message with some bbcodes, they work fine however. I use vBulletin 4.0.6

midnz 08-18-2010 06:35 PM

Quote:

Originally Posted by Destron (Post 2085827)
I got same error message with some bbcodes, they work fine however. I use vBulletin 4.0.6

Thanks for that guys :).

VonDoom 08-18-2010 08:26 PM

1 Attachment(s)
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.

midnz 08-18-2010 08:36 PM

Quote:

Originally Posted by VonDoom (Post 2085976)
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?

VonDoom 08-18-2010 09:04 PM

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 ;)

midnz 08-18-2010 10:00 PM

Quote:

Originally Posted by VonDoom (Post 2085994)
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 :eek:.

Hippy 08-18-2010 11:04 PM

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 ..


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01091 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete