Login   Register  
PHP Classes
elePHPant
Icontem

File: testUBBCode.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of L  >  UBBCode  >  testUBBCode.php  >  Download  
File: testUBBCode.php
Role: Example script
Content type: text/plain
Description: example
Class: UBBCode
Replaces the ubb tags with HTML, and vice versa
Author: By
Last change: updated example
Date: 11 years ago
Size: 507 bytes
 

Contents

Class file image Download
<html>
<head>
    <style type="text/css">
<!--
    pre.ubb_def    { 
        color:blue;
        font-family:Courir;
    }
-->
    </style>
</head>

<body>

<?php
require_once "UBBCode.php";

$class = new UBBCode;

$text ="<B>Hello, this a [i][b][color=green]UBB[/color] Code[/b] Test[/i]...\n...end</B>";
$encode $class->encode($text);

$class->listCodes();

echo 
$encode;
echo 
"<p>\n";
echo 
$class->decode($encode);
echo 
"<p>\n";
echo 
$class->strip($text);
?>

</body>
</html>