This simply adds an optional parameter (border) to the [img][/img] tags so that you can have images with a border in posts.
It's a quick three edits, so lets get started!
First of all, lets add the parameter...
./Sources/Subs.php
The first of which, adds the actual parameter.
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
// SMF Modders; IMG BBC Border Parameter
'border' => array('optional' => true, 'value' => ' border="$1"', 'match' => '(\d+)'),
The second, adds the parameter to the tag, if specified.
'content' => '<img src="$1" alt="{alt}"{width}{height} class="bbc_img resized" />',
'content' => '<img src="$1" alt="{alt}"{width}{height}{border} class="resized" />',
Now that we have the IMG BBC Border Parameter set up...we need to remove SMF's default border which is defined to 0px. Without this edit, the border parameter will have no effect.
./Themes/default/css/index.css
.bbc_img
{
border: 0;
}
.bbc_img
{
/* border: 0; */
}
Please move this to the Tips and Tricks board if this is something useful.
As this is a quite small adaption, we are not going to submit it to the SMF Mod Site. However, for your ease of using this Tip/Trick we have attached a Package to complete these edits. Please note that the SMF Customization Team has not approved nor reviewed the attached package and the package comes without warranty for anyone who uses it.
Also note that this has only been tested and written directly for SMF 2.0 RC2 & RC3.
The SMF Modders Team
Submitted as a mod: http://custom.simplemachines.org/mods/index.php?mod=2771
Also a bug was fixed in doing so.