Simple [img] word wrap bbcode
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}" /> 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;"> <tr> <td class="alt1"> Code:
$template_hook[postbit_controls] <!-- / controls --> </div> 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
imgbuttons.zip (468 Bytes, 130 downloads) Screenshots |