ทดสอบ ultraviolet highlight plugin
<typo:uvcode lang="php"> <?php require 'DB.php';
$dsn = 'mysql://root:bank24@localhost/vhcs2';
$dbh = DB::connect($dsn);
if(DB::isError($dbh)){
die ($dbh->getMessage());
} $result = $dbh->query("select * from admin"); if(DB::isError($result)) { die($result->getMessage());}
while($row = $result->fetchRow()){
print $row[0]."\n";
}
$result = $dbh->query("select * from admin");
if(DB::isError($result)) { die($result->getMessage());}
while($result->fetchInto($row)){
print $row[0]."\n";
}
$row = $dbh->getAll("select * from admin"); print_r($row); ?> </typo:uvcode>
ใช้กับ textile ไม่ได้แหะ ลองอีก code
<typo:uvcode lang="ruby_on_rails"> def self.macrofilter(blog,content,attrib,params,text="")
lang = attrib['lang'] || "plain_text"
title = attrib['title']
cssclass = attrib['class'] || 'iplastic'
linenumber = attrib['linenumber'] || false
text = text.to_s.gsub(/\r/,'').gsub(/\A\n/,'').chomp
convertor = Uv
text = convertor.parse(text, "xhtml", lang, linenumber, cssclass)
"<div class=\"typocode\">#{text}</div>"
end
</typo:uvcode>













