Login   Register  
PHP Classes
elePHPant
Icontem

File: Examples/Parsing_Example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mohammed Yousef  >  BBEngine  >  Examples/Parsing_Example.php  >  Download  
File: Examples/Parsing_Example.php
Role: Example script
Content type: text/plain
Description: Example for Parsing a given BBCode String
Class: BBEngine
Dynamically Extendable BBCode Parser/UnParser
Author: By
Last change: fixed a bug
Date: 2008-09-13 08:54
Size: 1,031 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 (
"../Parse.php");
$qq=new Parser();
//OFcourse <br>'s arenot BBCode but i just put them there for illustration
$str="[list][*]One[list=1][*]One/One[list=A][*]One/One[*]One/Two[/list][*]One/Two[/list][/list][list][*]Two[list=1][*]Two/One[*]Two/Two[/list][/list]<br>";
$str.=":D[url=http://arabteam2000-forum.com/]My Forum[/url]<br>[email=harrrrpo@gmail.com]My Email[/email]<br>[img]http://www.google.com.eg/intl/en_com/images/logo_plain.png[/img]<br>[size=20]Big [size=40]Big Label[/size] Label[/size]<br>[gvideo]3966673435136338279[/gvideo]";
print 
$qq->Parse($str);
?>