I modified PWAutoCenter to not count html & bbcode tags when centering
Code:
sub PWAutoCenter{
$Cent = $_[0];
$len = $_[0];
$len =~ s!<(?:[^>]+)>([^<]+)</(?:[^>]+)>!$1!gi;
$len =~ s!\[(?:[\]]+)\]([^\[]+)\[/(?:[\]]+)\]!$1!gi;
$SendCharLength = $_[1];
if($SendCharLength != 2){
$CentLength = length($len);
$IC = (53 - ($CentLength * .80) - 4);
}
else{
$IC = $Cent;
}
my $n = 0;
my $Result = "";
while ($n < $IC){
$Result .= " ";
$n++;
}
if(!$SendCharLength){
return "$Result $Cent";
my $CentLength = 0;
}
elsif($SendCharLength == 2){
return "$Result";
}
else{
return "There are $IC characters in this phrase, use this arguement for Option 2 in Arguement 2";
}
my $SendCharLenghth = undef;
my $CentLenght = undef;
}
if you don't need the BBCode [..]..[/..] remove the third $len. This will center links.
hope this helps someone