Esempio n. 1
0
function parse_message( $p )
{
  $p = htmlspecialchars($p,ENT_QUOTES);
  $p = bbencode($p,true);
  $p = nl2br($p);
  $p = preg_replace_callback("/<code>(.*?)<\/code>/ims",function($s){
    return str_replace("<br />","",$s[0]);
  },$p);
  $p = better_wordwrap($p,80," ");
  return $p;
}
  function RenderBody() {
    echo "<ul class='boxlist'>\n";
    $data = array_slice($this->data,-1 * $this->limit,NULL,true);
    foreach ($data as $r) {
      if (!$r->user) continue;
      echo "<li>\n";
      if ($this->showTimestamps)
        echo "<time datetime='".$r->addedDate."' title='".$r->addedDate."'>".date("H:i",strtotime($r->addedDate))."</time> ";
      echo $r->user->PrintLinkedAvatar()."\n";

      $p = $r->message;
      $p = _html($p);
      //$p = bbencode($p,true);
      //$p = nl2br($p);
      $p = preg_replace("/([a-z]+:\/\/\S+)/","<a href='$1'>link me beautiful</a>",$p);
      $p = better_wordwrap($p,40," ");

      echo $p;
      echo "</li>\n";
//      if ($n == get_setting("indexoneliner")) break;
    }
    echo "</ul>\n";
    ?>
    <script type="text/javascript">
    document.observe("dom:loaded",function(){ Youtubify($("pouetbox_latestoneliner")); });
    </script>
    <?
  }