예제 #1
0
 function fonttag($fontoptions, $text)
 {
     $tags = array('font' => 'face=', 'size' => 'size=', 'color' => 'color=');
     $prependtags = $appendtags = '';
     foreach ($tags as $bbcode => $locate) {
         $optionvalue = $this->fetchoptionvalue($locate, $fontoptions);
         if ($optionvalue) {
             $prependtags .= "[{$bbcode}={$optionvalue}]";
             $appendtags = "[/{$bbcode}]{$appendtags}";
         }
     }
     parsestyle($fontoptions, $prependtags, $appendtags);
     return $prependtags . $this->recursion('font', $text, 'fonttag') . $appendtags;
 }
예제 #2
0
function spantag($spanoptions, $text)
{
    $prependtags = $appendtags = '';
    parsestyle($spanoptions, $prependtags, $appendtags);
    return $prependtags . recursion('span', $text, 'spantag') . $appendtags;
}
예제 #3
0
function ptag($poptions, $text)
{
    $align = getoptionvalue('align', $poptions);
    switch ($align) {
        case 'left':
        case 'center':
        case 'right':
            break;
        default:
            $align = '';
    }
    $prepend = $append = '';
    parsestyle($poptions, $prepend, $append);
    if ($align) {
        $prepend .= "[align={$align}]";
        $append .= "[/align]";
    }
    $append .= "\n";
    return $prepend . recursion('p', $text, 'ptag') . $append;
}