Sorry there were some bugs in the BOLTMfontstyles function
Here is the correct markup rule: (markups.php ~63)
MarkUp('style', 'fontstyles',
'/(\*|\/|>|<|\_|\||\^|@|#)(\1+)(.+?)(\1\1|$)/me',
'BOLTMfontstyles("$2", "$3")'); // Misc shortcuts...
Here is the correct function: Watch out for line breaks inserted by
the email... (starting markups.php ~186)
function BOLTMfontstyles($type, $text) {
## SIMPLE SCRIPT USED TO GENERATE BOLD, ITALICS, SMALL&LARGE FONTS,
UNDERLINES, HIGHLIGHTS, SUPERSCRIPTS, AND THE BOX SHORTCUT
$type = str_replace(Array('>', '<'), Array('>', '<'), $type);
while (preg_match('/(\*|\/|>|<|\_|\||\^|@|#)(\1+)(.+?)(\1\1|$)/e',
$text) == 1) $text =
preg_replace('/(\*|\/|>|<|\_|\||\^|@|#)(\1+)(.+?)(\1\1|$)/e',
'BOLTMfontstyles("$1", "$3")', $text);
if (strlen($type) > 2) {
if (substr($type, 0, 1) != '>' && substr($type, 0, 1) != '<')
$text
= substr($type, 2) . $text;
}
$text = stripslashes($text);
switch (substr($type, 0, 1)) {
case '*' : return "<strong>$text</strong>";
case '/' : return "<em>$text</em>";
case '>' :
$len = strlen($type);
$size = 100;
for ($i=0; $i<$len; $i++) $size = $size * .9;
return "<font style='font-size: $size%'>$text</font>";
case '<' :
$size = 100 + (5 * strlen($type));
return "<font style='font-size: $size%'>$text</font>";
case '_' : return "<u>$text</u>";
case '|' : return "<span class='highlight'>$text</span>";
case '^' : return "<sup>$text</sup>";
case '@' : return "<font style='font-family:
monospace'>$text</font>";
case '#' : return BOLTMcode($text, 'box');
}
}
Cheers,
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---