PHP Classes

File: BBEngine.sql

Recommend this page to a friend!
  Classes of Mohammed Yousef   BBEngine   BBEngine.sql   Download  
File: BBEngine.sql
Role: Auxiliary data
Content type: text/plain
Description: The SQL dump for a set of famous BBCodes (required for examples)
Class: BBEngine
Dynamically Extendable BBCode Parser/UnParser
Author: By
Last change:
Date: 16 years ago
Size: 4,167 bytes
 

Contents

Class file image Download
-- phpMyAdmin SQL Dump -- version 2.8.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 13, 2008 at 04:19 PM -- Server version: 5.0.21 -- PHP Version: 5.1.4 -- -- Database: `BBEngine` -- -- -------------------------------------------------------- -- -- Table structure for table `BBE_Direct_Tag_Changer` -- CREATE TABLE `BBE_Direct_Tag_Changer` ( `Id` int(5) NOT NULL auto_increment, `Tag` varchar(50) NOT NULL, `Mapped_Tag` varchar(50) NOT NULL, `Priority` float NOT NULL, `Mapped_Tag_Args` varchar(200) default NULL, PRIMARY KEY (`Id`), UNIQUE KEY `Tag` (`Tag`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; -- -- Dumping data for table `BBE_Direct_Tag_Changer` -- INSERT INTO `BBE_Direct_Tag_Changer` (`Id`, `Tag`, `Mapped_Tag`, `Priority`, `Mapped_Tag_Args`) VALUES (7, 'b', 'strong', 1, NULL), (8, 'u', 'span', 10, 'style="text-decoration: underline;"'), (9, 'i', 'i', 1, NULL), (10, 's', 'span', 1, 'style="text-decoration: line-through;"'); -- -------------------------------------------------------- -- -- Table structure for table `BBE_Direct_Word_Changer` -- CREATE TABLE `BBE_Direct_Word_Changer` ( `Id` int(5) NOT NULL auto_increment, `Word` varchar(50) NOT NULL, `Priority` float NOT NULL, `Mapped_Tag` varchar(500) NOT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `Word` (`Word`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; -- -- Dumping data for table `BBE_Direct_Word_Changer` -- INSERT INTO `BBE_Direct_Word_Changer` (`Id`, `Word`, `Priority`, `Mapped_Tag`) VALUES (1, ':D', 2.75, '<img style="vertical-align: middle;" emoid=":D" src="http://arabteam2000-forum.com/style_emoticons/default/biggrin.gif" border="0"> '), (2, '[*]', 0.8, '</li><li>'); -- -------------------------------------------------------- -- -- Table structure for table `BBE_Indirect_Changer` -- CREATE TABLE `BBE_Indirect_Changer` ( `Id` int(5) NOT NULL auto_increment, `Tag` varchar(50) NOT NULL, `Func` text NOT NULL, `R_Func` text, `Sep` varchar(15) NOT NULL, `Priority` float NOT NULL, `Recursive` tinyint(1) NOT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `Sep` (`Sep`), UNIQUE KEY `Tag` (`Tag`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ; -- -- Dumping data for table `BBE_Indirect_Changer` -- INSERT INTO `BBE_Indirect_Changer` (`Id`, `Tag`, `Func`, `R_Func`, `Sep`, `Priority`, `Recursive`) VALUES (3, 'url', 'if (isset($Args[''url'']))\r\n$link=$Args[''url''];\r\nelse\r\n$link=$Data;\r\nreturn "<a href=\\"$link\\">$Data</a>";', 'preg_match("#<a href=\\"(.*?)\\">(.*?)</a>#",$Data,$m);\r\nreturn "[url=$m[1]]$m[2][/url]";', 'Parsed Url', 0.5, 0), (4, 'email', 'if (isset($Args[''email'']))\r\n$link=$Args[''email''];\r\nelse\r\n$link=$Data;\r\nreturn "<a href=\\"mailto:{$link}\\">$Data</a>";', 'preg_match("#<a href=\\"mailto:(.*?)\\">(.*?)</a>#",$Data,$m);\r\nreturn "[email=$m[1]]$m[2][/email]";', 'Email', 1.2, 0), (5, 'img', 'if (isset($Args[''img'']))\r\n$link=$Args[''img''];\r\nelse\r\n$link=$Data;\r\nreturn "<img src=\\"{$link}\\">";', 'preg_match("#<img src=\\"(.*?)\\">#",$Data,$m);\r\nreturn "[img]$m[1][/img]";', 'Image', 0, 0), (6, 'size', 'return "<span style=\\"font-size: {$Args[size]}px;\\">{$Data}</span>";', 'preg_match("#<span style=\\"font-size: (\\d+)px;\\">(.*?)</span>#",$Data,$m);\r\nreturn "[size=$m[1]]$m[2][/size]";', 'Text Size', 1, 1), (7, 'gvideo', '$video="<embed style=\\"width: 400px; height: 325px;\\" id=\\"VideoPlayback\\" type=\\"application/x-shockwave-flash\\" src=\\"http://video.google.com/googleplayer.swf?docId={$Data}&amp;hl=en\\">";\r\nreturn $video;', 'preg_match("#docId=(.*?)&amp;hl=en\\">#",$Data,$m);\r\nreturn "[gvideo]$m[1][/gvideo]";', 'Google Video', 2, 0), (17, 'list', 'if (isset($Args[''list'']))\r\n{$tag="ol";\r\n$type=" type=\\"".$Args[''list''].''"'';}\r\nelse\r\n{$tag="ul";$type="";}\r\nreturn "<{$tag}{$type}>$Data</$tag>";\r\n\r\n', '$type="";\r\npreg_match("#<ul>(.*?)</ul>#",$Data,$m);\r\nif ($m==null)\r\n{preg_match("#<ol type=\\"([0-9a-zA-Z])\\">(.*?)</ol>#",$Data,$m);\r\n$type="=".$m[1];$m[1]=$m[2];}\r\nreturn "[list{$type}]$m[1][/list]";\r\n', 'List', 2, 1);