Sometimes we need to use ubb to convert html. For example, when I leave a message, I want to use it for my friends. None? Phpfunctionubb ($ Text) {$ Texttrim ($ Text); $ Textereg_replace (n, br, $ Text); $ Textpreg_replace (\ tis, $ Text ); $ Textpreg_replace ([hr] is, hr, $ Te
Sometimes we need to use ubb to convert html. For example, when I leave a message, I want to use it for my friends. None? Phpfunction ubb ($ Text) {$ Text = trim ($ Text); $ Text = ereg_replace ("\ n", "br", $ Text ); $ Text = preg_replace ("/\ t/is", "", $ Text); $ Text = preg_replace ("/\ [hr \]/is ", "hr", $ Te
Sometimes we need to use ubb to convert html. For example, when I leave a message, I want to use it for my friends. <无>
", $ Text); $ Text = preg_replace ("/\ t/is "," ", $ Text ); $ Text = preg_replace ("/\ [hr \]/is", "", $ Text); $ Text = preg_replace ("/\ [separator \]/is ","
", $ Text); $ Text = preg_replace ("/\ [h1 \] (. + ?) \ [\/H1 \]/is "," \ 1 ", $ Text); $ Text = preg_replace ("/\ [h2 \] (. + ?) \ [\/H2 \]/is "," \ 1 ", $ Text); $ Text = preg_replace ("/\ [h3 \] (. + ?) \ [\/H3 \]/is "," \ 1 ", $ Text); $ Text = preg_replace ("/\ [h4 \] (. + ?) \ [\/H4 \]/is "," \ 1 ", $ Text); $ Text = preg_replace ("/\ [h5 \] (. + ?) \ [\/H5 \]/is "," \ 1 ", $ Text); $ Text = preg_replace ("/\ [h6 \] (. + ?) \ [\/H6 \]/is "," \ 1 ", $ Text); $ Text = preg_replace ("/\ [center \] (. + ?) \ [\/Center \]/is ","
\ 1
", $ Text); // $ Text = preg_replace ("/\ [url = ([^ \ [] *) \] (. + ?) \ [\/Url \]/is "," \ 2 ", $ Text); $ Text = preg_replace ("/\ [url \] (. + ?) \ [\/Url \]/is "," \ 1 ", $ Text); $ Text = preg_replace ("/\ [url = (http :\/\/. + ?) \] (. + ?) \ [\/Url \]/is "," \ 2 ", $ Text); $ Text = preg_replace ("/\ [url = (. + ?) \] (. + ?) \ [\/Url \]/is "," \ 2 ", $ Text); $ Text = preg_replace ("/\ [img \] (. + ?) \ [\/Img \]/is "," ", $ Text); $ Text = preg_replace ("/\ [img \ s (. + ?) \] (. + ?) \ [\/Img \]/is "," ", $ Text); $ Text = preg_replace ("/\ [color = (. + ?) \] (. + ?) \ [\/Color \]/is "," \ 2 ", $ Text); $ Text = preg_replace ("/\ [colorTxt \] (. + ?) \ [\/ColorTxt \]/eis "," color_txt ('\ 1') ", $ Text); $ Text = preg_replace ("/\ [style = (. + ?) \] (. + ?) \ [\/Style \]/is ","\ 2
", $ Text); $ Text = preg_replace ("/\ [size = (. + ?) \] (. + ?) \ [\/Size \]/is "," \ 2 ", $ Text); $ Text = preg_replace ("/\ [sup \] (. + ?) \ [\/Sup \]/is "," \ 1 ", $ Text); $ Text = preg_replace ("/\ [sub \] (. + ?) \ [\/Sub \]/is "," \ 1 ", $ Text); $ Text = preg_replace ("/\ [pre \] (. + ?) \ [\/Pre \]/is ","\\1
", $ Text); $ Text = preg_replace ("/\ [emot \] (. + ?) \ [\/Emot \]/eis "," emot ('\ 1') ", $ Text); $ Text = preg_replace ("/\ [email \] (. + ?) \ [\/Email \]/is "," \ 1 ", $ Text); $ Text = preg_replace ("/\ [I \] (. + ?) \ [\/I \]/is ","\ 1", $ Text); $ Text = preg_replace ("/\ [u \] (. + ?) \ [\/U \]/is ","\ 1", $ Text); $ Text = preg_replace ("/\ [B \] (. + ?) \ [\/B \]/is ","\ 1", $ Text); $ Text = preg_replace ("/\ [quote \] (. + ?) \ [\/Quote \]/is ","
Reference:
\ 1
", $ Text); $ Text = preg_replace ("/\ [code \] (. + ?) \ [\/Code \]/eis "," highlight_code ('\ 1') ", $ Text); $ Text = preg_replace ("/\ [php \] (. + ?) \ [\/Php \]/eis "," highlight_code ('\ 1') ", $ Text); $ Text = preg_replace ("/\ [sig \] (. + ?) \ [\/Sig \]/is ","
--------------------------
\ 1
--------------------------
", $ Text); return $ Text;} // provided by creative cinema [www.cuangs.com]?>