Home >Backend Development >PHP Tutorial >php processing ubb function_PHP tutorial

php processing ubb function_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-20 11:00:241095browse

php Ubb code essence

/*
Programming Design: Lin Jianxuan (Piao Feng Design Studio)
made in Lu Feng by 2007-03-07 noon
QQ: 5818500
Email: linzhenxuan@163.com
If you use or modify it, please keep this information!
Function: Ubb class
Advantages: There are more fast Ubb pairing and corresponding html problems than ordinary ubb.
*/
Class Cls_Ubb
{
var $type='';
Function _htm($string)
          {
                        if(!$string){return "";}
                    if(ereg("<(.+)*>(.+)*",$string))
                   {
                                      $string = eregi_replace("<","<",$string);
                                       $string = eregi_replace(">",">",$string);
              }
If (EREGI ("[(/*B)]", $ String) {$ This- & GT; Type. = "1,";;}
If (EREGI ("[(/*i)]", $ String) {$ This-& GT; Type. = "2,";;;                              if(eregi("[(/*u)]",$string)){$this->type.="3,";}
                        if(eregi("[align=([a-zA-Z]*)]",$string)){$this->type.="4,";}
                       if(eregi("[fly](.+)*[/fly]",$string)){$this->type.="5,";}
                      if(eregi("[move](.+)*[/move]",$string)){$this->type.="6,";}
                      if(eregi("[light](.+)*[/light]",$string)){$this->type.="7,";}
if(eregi("[SHADOW=([0-9]{1,3}),([a-zA-Z]*),([0-9]{1,})](.+)*[ /shadow]",$string)){$this->type.="8,";}
                        if(eregi("[url=(.+)](.+)[/url]",$string)){$this->type.="9,";}
if(eregi("[email]([a-zA-Z0-9]{1,}@([a-zA-Z0-9]{1,}.[a-zA-Z0-9]{1, })*)[/email]",$string)){$this->type.="10,";}
                        if(eregi("[em([0-9]{1,})]",$string)){$this->type.="11,";}
                     if(eregi("[img](.+)*[/img]",$string)){$this->type.="12,";}
if(eregi("[flash=*([0-9]*),*([0-9]*)](.+)*[/flash]",$string)){$this->type .="13,";}
if(eregi("[mp=*([0-9]{1,3}),([0-9]{1,3})](.+)*[/mp]",$string)) {$this->type.="14,";}
if(eregi("[rm=([0-9]{1,3}),([0-9]{1,3})](.+)*[/rm]",$string)){ $this->type.="15,";}
                      if(eregi("[sound](.+)*[/sound]",$string)){$this->type.="16,";}
                        if(eregi("[code](.+)*[/code]",$string)){$this->type.="17,";}
                      if(eregi("[sup](.+)*[/sup]",$string)){$this->type.="18,";}
                      if(eregi("[sub](.+)*[/sub]",$string)){$this->type.="19,";}
                        if(eregi("[color=(.+)*](.+)*[/color]",$string)){$this->type.="20,";}
if(eregi("[size=([0-9]{1})](.+)*[/size]",$string)){$this->type.="21,";}
If ($ this-& gt; type) {$ this-& gt; type = substr ($ this-& gt; type; 0, (strlen ($ this-& gt; type) -1));}
                          return $string;
       }
       
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445529.htmlTechArticlephp Ubb code essence/* Programming: Lin Jianxuan (Piao Feng Design Studio) made in Lu Feng by 2007-03- 07 Noon QQ: 5818500 Email: linzhenxuan@163.com If you use or modify it, please keep this information...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn