![]() |
Simple [img] word wrap bbcode
1 Attachment(s)
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 { Second lets add the bbcodes: Title: Image Align Left BB Code Tag Name: IMGLEFT Replacement: Code:
<img class="alignleft" border="0" alt="" src="{param}" /> Use {option}: no Title: Image Align Right BB Code Tag Name: IMGRIGHT Replacement: Code:
<img class="alignright" border="0" alt="" src="{param}" /> Use {option}: no Lastly, lets edit the postbit templates for each style: Find: Code:
$template_hook[postbit_signature_start] Code:
<TABLE width="100%" style="border-collapse: collapse; border: none;"> Code:
$template_hook[postbit_controls] Code:
</td> Thats it! You're done. I'll attach some buttons I made which you can use when adding your new bbcode if you wish. |
thanks
|
doesn't work just replaces image with " />
|
Quote:
|
Quote:
|
Example?
|
Does this work?
|
Nice mod! Is there one which aligns an image as yours does, but also allows for a caption underneath?
|
Example?
|
Quote:
|
Quote:
https://vborg.vbsupport.ru/showthread.php?t=220257 |
Anyone could be say, what's the 'example' in this BBcode, please???
|
Quote:
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 |
I can not do that. :(
|
Quote:
Works great here... Here's a PrtSc of the settings http://www.fhqhosting.com/ui/left.PNG |
Quote:
http://img229.imageshack.us/img229/8859/left1l.jpg http://img12.imageshack.us/img12/652/left2p.jpg |
^ I believe in needs to just be around the image code not text as well.
|
Quote:
|
with that code he used try
[IMGLEFT]URLHERE[/IMGLEFT] |
Quote:
|
This works without doing the postbit template edits. What are the postpit template edits for?
|
Quote:
|
Yeah, it works in the default theme without the postbit template hack. Version 3.8.6
|
Worked without the postbit template portion on version 3.8.7 :up:
Here's a demo: State of Florida History |
All times are GMT. The time now is 03:28 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|