Back to vBulletin 3.8 Add-ons

Simple [img] word wrap bbcode
Mod Version: 1.00, by smokey

vB Version: 3.8.x Rating: (2 votes - 5.00 average) Installs: 31
Released: 11 Aug 2009 Last Update: Never Downloads: 113
Not Supported Template Edits Re-usable Code  

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

File Type: %1$s imgbuttons.zip (468 Bytes, 130 downloads)

Screenshots

Click image for larger version
Name:	screenshot.jpg
Views:	568
Size:	229.6 KB
ID:	103074  


vblts.ru supports vBulletin®, 2022-2024