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
  #12  
Old 10-21-2009, 05:11 AM
segwayon segwayon is offline
 
Join Date: Mar 2008
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Trana View Post
Good mod, working on my 3.8.4 board, but can anyone help with the question above? We really need this.
This mod linked below ("Advanced BB Codes Toolbar") has some neat features, (but still not the image+caption alignment):

https://vborg.vbsupport.ru/showthread.php?t=220257
Reply With Quote
  #13  
Old 10-22-2009, 03:49 PM
ricardoNJ ricardoNJ is offline
 
Join Date: Sep 2008
Posts: 295
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone could be say, what's the 'example' in this BBcode, please???
Reply With Quote
  #14  
Old 10-23-2009, 04:53 PM
fta2k fta2k is offline
 
Join Date: Feb 2008
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ricardoNJ View Post
Anyone could be say, what's the 'example' in this BBcode, please???

I just put ALIGNLEFT and ALIGNRIGHT and it all worked fine.


The mod works great. Copied a random news article and added images. Here's a PrtSc:

http://www.fhqhosting.com/ui/20untitled.PNG
Reply With Quote
  #15  
Old 10-23-2009, 07:03 PM
ricardoNJ ricardoNJ is offline
 
Join Date: Sep 2008
Posts: 295
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can not do that.
Reply With Quote
  #16  
Old 10-25-2009, 03:30 PM
fta2k fta2k is offline
 
Join Date: Feb 2008
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ricardoNJ View Post
I can not do that.
Are you typing something in wrong?

Works great here... Here's a PrtSc of the settings

http://www.fhqhosting.com/ui/left.PNG
Reply With Quote
  #17  
Old 10-28-2009, 12:14 AM
ricardoNJ ricardoNJ is offline
 
Join Date: Sep 2008
Posts: 295
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fta2k View Post
Are you typing something in wrong?

Works great here... Here's a PrtSc of the settings

http://www.fhqhosting.com/ui/left.PNG
Nothing happened:



Reply With Quote
  #18  
Old 10-31-2009, 06:20 PM
Drocr Drocr is offline
 
Join Date: Nov 2007
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ I believe in needs to just be around the image code not text as well.
Reply With Quote
  #19  
Old 10-31-2009, 06:32 PM
ricardoNJ ricardoNJ is offline
 
Join Date: Sep 2008
Posts: 295
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Drocr View Post
^ I believe in needs to just be around the image code not text as well.
Same thing. I don't know how to do that !
Reply With Quote
  #20  
Old 10-31-2009, 06:41 PM
Drocr Drocr is offline
 
Join Date: Nov 2007
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

with that code he used try
[IMGLEFT]URLHERE[/IMGLEFT]
Reply With Quote
  #21  
Old 11-01-2009, 01:58 PM
ricardoNJ ricardoNJ is offline
 
Join Date: Sep 2008
Posts: 295
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Drocr View Post
with that code he used try
[IMGLEFT]URLHERE[/IMGLEFT]
I was using the icon []to place the image. It was only in the URL in the middle of the code. My bad!!!!! Thanks!! :up:
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:58 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.05296 seconds
  • Memory Usage 2,338KB
  • Queries Executed 26 (?)
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
  • (6)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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