39) {
$wrapTextOnceFlag = True;
} else {
$wrapTextOnceFlag = False;
}
if (strlen($inputText) > 78) {
$wrapTextTwiceFlag = True;
} else {
$wrapTextTwiceFlag = False;
}
// Now that we know how to process the speech bubble, we now need to process
// the input string.
if($wrapTextOnceFlag == True) {
$output.=" _________________________________________
";
if($wrapTextTwiceFlag == True) {
$textArray = str_split($inputText, 39);
$output.="/ ".$textArray[0]." \
";
$counter = 1;
while($counter < sizeof($textArray)-2) {
$output.="| ".$textArray[$counter]." |
";
//$output.="Adding line ".$counter." of ".sizeof($textArray)-2."
";
$output.=" -----------------------------------------
";
//$output.=$textArray[sizeof($textArray)-1];
} else {
$textArray = str_split($inputText, 39);
$output.="/ ".$textArray[0]." \
";
$output.="\ ".$textArray[1].str_repeat(' ', 39-strlen($textArray[1]))." /
";
$output.=" -----------------------------------------
";
}
} else {
$output.=" _".str_repeat("_", strlen($inputText))."_
";
$output.="< ".$inputText." >
";
$output.=" -".str_repeat("-", strlen($inputText))."-
";
}
if($skin == "tux") {
$output.=" \\ .--.
";
$output.=" \\ |_ |
";
$output.=" |:_/ |
";
$output.=" // \\ \\
";
$output.=" (| | )
";
$output.=" /'\\_ _/`\\
";
$output.=" \\___)=(___/";
/*
\ .--.
\ |_ |
|:_/ |
// \ \
(| | )
/'\_ _/`\
\___)=(___/
*/
} else {
$output.=" \\ ^__^
";
$output.=" \\ (oo)\\_______
";
$output.=" (__)\\ )\\/\\
";
$output.=" ||----w |
";
$output.=" || ||";
/*
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
*/
}
echo $output;
?>