PHP Classes

File: Examples/UnParsing_Example.php

Recommend this page to a friend!
  Classes of Mohammed Yousef   BBEngine   Examples/UnParsing_Example.php   Download  
File: Examples/UnParsing_Example.php
Role: Example script
Content type: text/plain
Description: Example for UnParsing a given Html String into BBCode
Class: BBEngine
Dynamically Extendable BBCode Parser/UnParser
Author: By
Last change: fixed a bug
Date: 15 years ago
Size: 1,809 bytes
 

Contents

Class file image Download
<?php
/**
 * This is a some examples about common operations of class
 * In order for Parsing & UnParsing examples to be useful
 * you must import the DB Backup given in DB Stated in your
 * Config file
 * @package Examples
 * @author Mohammed Yousef Bassyouni <harrrrpo@gmail.com>
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 */
/**
 * Parsing using BBEngine Library
 */
require ("../Config.php");
require (
"../UnParse.php");
$p=new UnParser();
$str='<!-- Block_List --><ul></li><li>One<!-- Block_List --><ol type="1"></li><li>One/One<!-- Block_List --><ol type="A"></li><li>One/One</li><li>One/Two</ol></!-- Block_List --></li><li>One/Two</ol></!-- Block_List --></ul></!-- Block_List --><!-- Block_List --><ul></li><li>Two<!-- Block_List --><ol type="1"></li><li>Two/One</li><li>Two/Two</ol></!-- Block_List --></ul></!-- Block_List --><br><img style="vertical-align: middle;" emoid=":D" src="http://arabteam2000-forum.com/style_emoticons/default/biggrin.gif" border="0"> <!-- Block_Parsed Url --><a href="http://arabteam2000-forum.com/">My Forum</a></!-- Block_Parsed Url --><br><!-- Block_Email --><a href="mailto:harrrrpo@gmail.com">My Email</a></!-- Block_Email --><br><!-- Block_Image --><img src="http://www.google.com.eg/intl/en_com/images/logo_plain.png"></!-- Block_Image --><br><!-- Block_Text Size --><span style="font-size: 20px;">Big <!-- Block_Text Size --><span style="font-size: 40px;">Big Label</span></!-- Block_Text Size --> Label</span></!-- Block_Text Size --><br><!-- Block_Google Video --><embed style="width: 400px; height: 325px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=3966673435136338279&amp;hl=en"></!-- Block_Google Video -->';
print
$p->UnParse($str);
?>