最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php处理ubb函数
时间:2022-07-02 10:04:24 编辑:袖梨 来源:一聚教程网
/*
程序设计: 林建炫(飘枫设计室)
made in 陆丰 by 2007-03-07 中午
QQ: 5818500
Email: [email protected]
如果你使用、修改请保留该信息!
功能: Ubb类
优点: 比普通ubb多了快速Ubb配对相应的html问题。
*/
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->type.="1,";}
if(eregi("[(/*i)]",$string)){$this->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->type){$this->type=substr($this->type,0,(strlen($this->type)-1));}
return $string;
}
?>
相关文章
- “十月朝,糍粑碌碌烧”说的是小雪时节的哪一项习俗 蚂蚁庄园11月22日答案早知道 11-25
- 以闪亮之名宠物礼包怎么样 11-25
- 崩坏星穹铁道星期日用什么光锥 11-25
- 崩坏星穹铁道星期日用什么光锥 崩铁星期日光锥推荐搭配介绍 11-25
- 崩坏星穹铁道星期日技能机制怎么样 崩铁星期日技能机制介绍 11-25
- 崩坏星穹铁道星期日遗器怎么选择 崩铁星期日遗器推荐搭配介绍 11-25