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

Reply
 
Thread Tools
Simple [img] word wrap bbcode Details »»
Simple [img] word wrap bbcode
Version: 1.00, by smokey smokey is offline
Developer Last Online: Jul 2018 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.8.x Rating:
Released: 08-10-2009 Last Update: Never Installs: 30
Template Edits
Re-useable Code  
No support by the author.

I saw a few threads in the modification graveyard where you can add a bbcode to align an image left or right, did not see any newer threads that accomplish this correctly and without messing up the signature and other things.

This is what I've done:

First lets add some CSS entries to each style.
In admin cp, go to Styles & Templates -> Style Manager -> Main CSS Options
Scroll down to the Additional CSS Definitions and add the following at the bottom:
Code:
img.alignright {
	padding: 4px;
	margin: 0 0 2px 7px;
	display: inline;
	}

img.alignleft {
	padding: 4px;
	margin: 0 7px 2px 0;
	display: inline;
	}

.alignright {
	float: right;
	}

.alignleft {
	float: left
	}

Second lets add the bbcodes:

Title: Image Align Left
BB Code Tag Name: IMGLEFT
Replacement:
Code:
<img class="alignleft" border="0" alt="" src="{param}" />
Description: Simple left image alignment with text wrap
Use {option}: no

Title: Image Align Right
BB Code Tag Name: IMGRIGHT
Replacement:
Code:
<img class="alignright" border="0" alt="" src="{param}" />
Description: Simple right image alignment with text wrap
Use {option}: no


Lastly, lets edit the postbit templates for each style:

Find:
Code:
$template_hook[postbit_signature_start]
Right below it add:
Code:
<TABLE width="100%" style="border-collapse: collapse; border: none;">
        <tr>
        <td class="alt1">
Find:
Code:
            $template_hook[postbit_controls]
			<!-- / controls -->
		</div>
Right below it add:
Code:
            </td>
            </tr>
</table>

Thats it! You're done. I'll attach some buttons I made which you can use when adding your new bbcode if you wish.

Download Now

File Type: zip imgbuttons.zip (468 Bytes, 127 views)

Screenshots

File Type: jpg screenshot.jpg (229.6 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 08-11-2009, 12:44 AM
erel34's Avatar
erel34 erel34 is offline
 
Join Date: Dec 2007
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #3  
Old 08-27-2009, 01:40 AM
Tilly Tilly is offline
 
Join Date: Sep 2007
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

doesn't work just replaces image with " />
Reply With Quote
  #4  
Old 08-30-2009, 07:07 PM
smokey's Avatar
smokey smokey is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tilly View Post
doesn't work just replaces image with " />
That's odd. Did you copy all the code and follow the directions 100%? What version of vb?
Reply With Quote
  #5  
Old 10-05-2009, 11:33 PM
KrU$ty's Avatar
KrU$ty KrU$ty is offline
 
Join Date: Oct 2007
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tilly View Post
doesn't work just replaces image with " />
I'm getting the same issue. VB 3.8.4
Reply With Quote
  #6  
Old 10-09-2009, 02:16 PM
ricardoNJ ricardoNJ is offline
 
Join Date: Sep 2008
Posts: 295
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Example?
Reply With Quote
  #7  
Old 10-20-2009, 02:21 AM
Trana Trana is offline
 
Join Date: Apr 2005
Posts: 604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work?
Reply With Quote
  #8  
Old 10-20-2009, 03:50 AM
segwayon segwayon is offline
 
Join Date: Mar 2008
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice mod! Is there one which aligns an image as yours does, but also allows for a caption underneath?
Reply With Quote
  #9  
Old 10-20-2009, 11:24 AM
mbc100 mbc100 is offline
 
Join Date: Feb 2009
Location: K.S.A
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Example?
Reply With Quote
  #10  
Old 10-21-2009, 12:33 AM
Trana Trana is offline
 
Join Date: Apr 2005
Posts: 604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by segwayon View Post
Nice mod! Is there one which aligns an image as yours does, but also allows for a caption underneath?
Good mod, working on my 3.8.4 board, but can anyone help with the question above? We really need this.
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 11:27 AM.


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.05476 seconds
  • Memory Usage 2,321KB
  • 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
  • (7)bbcode_code
  • (3)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