Пример #1
0
 function getParsedDescription()
 {
     if (empty($this->pkg_description)) {
         return '';
     }
     // Switching markup types
     switch ($this->markup) {
         case 'wiki':
             include_once 'Text/Wiki.php';
             $wiki = new Text_Wiki();
             $wiki->disableRule('wikilink');
             $description = $wiki->transform($this->pkg_description);
             break;
         case 'bbcode':
         default:
             include_once 'HTML/BBCodeParser.php';
             $bbparser = new HTML_BBCodeParser(array('filters' => 'Basic,Images,Links,Lists,Extended'));
             $description = $bbparser->qparse(nl2br(htmlentities($this->pkg_description)));
             break;
     }
     return $description;
 }
 /**
  * Quick static method to do setText(), parse() and getParsed at once
  *
  * @return   none
  * @access   public
  * @see      parse()
  * @see      $_text
  * @author   Stijn de Reede  <*****@*****.**>
  */
 function staticQparse($str)
 {
     $p = new HTML_BBCodeParser();
     $str = $p->qparse($str);
     unset($p);
     return $str;
 }
Пример #3
0
            </tr>
            <tr><td align="right"><?php 
    $form->showLabel('Subject');
    ?>
</td>
                <td align="left"><?php 
    echo $message->message_title;
    ?>
</td></tr>
            <tr><td align="right" valign="top"><?php 
    $form->showLabel('Previous Message');
    ?>
</td>
                <td align="left">
            <?php 
    $messageBody = $bbparser->qparse($last_message->message_body);
    $messageBody = nl2br($messageBody);
    echo $messageBody;
    ?>
</td></tr>
            <tr><td colspan="2" align="left"><hr /></td></tr>
            <?php 
}
//end of if-condition
?>
        <tr>
            <td align="right"><?php 
$form->showLabel('Subject');
?>
</td>
            <td>
Пример #4
0
if ($changelog = @ppComment::getAll($proposal->id, 'package_proposal_changelog')) {
    echo "<ul>\n";
    include_once 'pear-database-user.php';
    foreach ($changelog as $comment) {
        if (!isset($userinfos[$comment->user_handle])) {
            $userinfo[$comment->user_handle] = user::info($comment->user_handle);
        }
        echo '<li><p style="margin: 0em 0em 0.3em 0em; font-size: 90%;">';
        echo htmlspecialchars($userinfo[$comment->user_handle]['name']);
        echo '<br />[' . format_date($comment->timestamp) . ']</p>';
        switch ($proposal->markup) {
            case 'wiki':
                require_once 'Text/Wiki.php';
                $wiki =& new Text_Wiki();
                $wiki->disableRule('wikilink');
                echo $wiki->transform($comment->comment);
                break;
            case 'bbcode':
            default:
                require_once 'HTML/BBCodeParser.php';
                $bbparser = new HTML_BBCodeParser(array('filters' => 'Basic,Images,Links,Lists,Extended'));
                echo nl2br($bbparser->qparse($comment->comment));
                break;
        }
        echo "</li>\n";
    }
    echo "</ul>\n";
}
echo "  </td>\n </tr>\n";
echo "</table>\n";
response_footer();