New Bbcode For Lavalair

Started on the old forum in March 2008 · view the original in the archive · old links redirect here

20 replies · 2,574 views · started 18 years ago · 1 min read

12 participants
Guest #1

replace in core.php this function gettbbcode with

CODE///////////////////////////////////parse bbcode

function getbbcode($text, $sid="") { $text=preg_replace("/[b](.?)[/b]/i","\1", $text); $text=preg_replace("/[i](.?)[/i]/i","\1", $text); $text=preg_replace("/[u](.?)[/u]/i","\1", $text); $text=preg_replace("/[big](.?)[/big]/i","\1", $text); $text=preg_replace("/[small](.*?)[/small]/i","\1", $text);

$text=preg_replace("/[red](.?)[/red]/i","\1", $text); $text=preg_replace("/[lime](.?)[/lime]/i","\1", $text); $text=preg_replace("/[green](.?)[/green]/i","\1", $text); $text=preg_replace("/[yellow](.?)[/yellow]/i","\1", $text); $text=preg_replace("/[white](.?)[/white]/i","\1", $text); $text=preg_replace("/[blue](.?)[/blue]/i","\1", $text); $text=preg_replace("/[grey](.?)[/grey]/i","\1", $text); $text=preg_replace("/[silver](.?)[/silver]/i","\1", $text);

$text = preg_replace("/[url=(.?)](.?)[/url]/is","<a href="$1">$2</a>",$text); $text = preg_replace("/[topic=(.?)](.?)[/topic]/is","<a href="index.php?action=viewtpc&tid=$1&sid=$sid">$2</a>",$text); $text = preg_replace("/[club=(.?)](.?)[/club]/is","<a href="index.php?action=gocl&clid=$1&sid=$sid">$2</a>",$text); $text = preg_replace("/[blog=(.?)](.?)[/blog]/is","<a href="index.php?action=viewblog&bid=$1&sid=$sid">$2</a>",$text); //$text = ereg_replace("http://[A-Za-z0-9./=?-_]+","<a href="\"></a>", $text); if(substr_count($text,"[br/]")<=3){ $text = str_replace("[br/]"," ",$text); } $text = str_replace("2wap","2crapforwap",$text); $text = str_replace("2WAP","2crapforwap",$text); $text = str_replace("2wAp","2crapforwap",$text); $text = str_replace("2w4p","2crapforwap",$text); $text = str_replace("2waP","2crapforwap",$text); $text = str_replace("2Wap","2crapforwap",$text); $text = str_replace("hiphop4u","britneyspears",$text); $text = str_replace("HIPHOP4U","britneyspears",$text); $text = str_replace("HiPhOp4U","britneyspears",$text); $text = str_replace("hIpHoP4u","britneyspears",$text); $text = str_replace("Hiphop4U","britneyspears",$text); $text = str_replace("Hiphop4u","britneyspears",$text); $text = str_replace("HipHop4u","britneyspears",$text); $text = str_replace("hh4u","britneyspears",$text); $text = str_replace("HH4U","britneyspears",$text); $text = str_replace("Hh4u","britneyspears",$text); $text = str_replace("hH4U","britneyspears",$text); $text = str_replace("HH4u","britneyspears",$text); $text = str_replace("hh4U","britneyspears",$text); return $text; }

this and write everywhere than eg:text

amylee Principal · 1,092 posts #2

it's possible to do that with just 1 line

hypetype Developer · 128 posts #3
$bro=("$REMOTE_ADDR");
    $usr = explode("/",$_SERVER['HTTP_USER_AGENT']); 
    $phone = ("$usr[0]");
$text = str_replace("[phone]","$phone",$text);

  $text = preg_replace("/\[updatepro]/is","<a href=\"index.php?action=uset&sid=$sid\">Update Profie</a>",$text);

        $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
        $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$uid."'"));
        $unrd="[".$unreadinbox[0]."l".$pmtotl[0]."]";
  $text = preg_replace("/\[inbox]/is","<a href=\"inbox.php?action=main&sid=$sid\">Inbox $unrd</a>",$text);

    $nick = getnick_sid($sid);
$text = str_replace("[user]","$nick",$text);
GumSlone Administrator Principal · 1,690 posts #4

especcially this ones are cool:

  $text = str_replace("2wap","2crapforwap",$text);
  $text = str_replace("2WAP","2crapforwap",$text);
  $text = str_replace("2wAp","2crapforwap",$text);
  $text = str_replace("2w4p","2crapforwap",$text);
  $text = str_replace("2waP","2crapforwap",$text);
  $text = str_replace("2Wap","2crapforwap",$text);

External image (may be gone)

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

wizard Senior · 493 posts #5

especcially this ones are cool:

  $text = str_replace("2wap","2crapforwap",$text);
  $text = str_replace("2WAP","2crapforwap",$text);
  $text = str_replace("2wAp","2crapforwap",$text);
  $text = str_replace("2w4p","2crapforwap",$text);
  $text = str_replace("2waP","2crapforwap",$text);
  $text = str_replace("2Wap","2crapforwap",$text);

External image (may be gone)

lol External image (may be gone)

chatabox Senior · 361 posts #6

especcially this ones are cool:

  $text = str_replace("2wap","2crapforwap",$text);
  $text = str_replace("2WAP","2crapforwap",$text);
  $text = str_replace("2wAp","2crapforwap",$text);
  $text = str_replace("2w4p","2crapforwap",$text);
  $text = str_replace("2waP","2crapforwap",$text);
  $text = str_replace("2Wap","2crapforwap",$text);

External image (may be gone)

lol that has been there since the ravingwap.net version.

amylee Principal · 1,092 posts #7

talking over 2 years as that was dj who put that there lol

ori Lead · 512 posts #8

these 2 may b useful

$text=preg_replace("/\[font\=(.*?)\](.*?)\[\/font\]/is","$2",$text);
$text=preg_replace("/\[img\=(.*?)\]/i","<img src=\"$1\" alt=\"\"/>",$text);
chatabox Senior · 361 posts #9

talking over 2 years as that was dj who put that there lol

Yeah i remember that lol.. ah the good old days pmpl. How things do change.

He still missed some combos anyway lol 2WaP, 2W4P, 2W4p, 2w4P, and probably more lol..

Should of used that other case insensitive replace...

Guest #10

especcially this ones are cool:

  $text = str_replace("2wap","2crapforwap",$text);
  $text = str_replace("2WAP","2crapforwap",$text);
  $text = str_replace("2wAp","2crapforwap",$text);
  $text = str_replace("2w4p","2crapforwap",$text);
  $text = str_replace("2waP","2crapforwap",$text);
  $text = str_replace("2Wap","2crapforwap",$text);

External image (may be gone)

pardon me is ravingwap copy.... External image (may be gone)

khan1 Developer · 101 posts #11
$text=preg_replace("/\[scr\](.*?)\[\/scr\]/i","<marquee loop=\"800\" direction=\"right\">\\1</marquee>", $text);
  $text=preg_replace("/\[scl\](.*?)\[\/scl\]/i","<marquee loop=\"800\" direction=\"left\">\\1</marquee>", $text);
sweetangel Lead · 885 posts #12
$bro=("$REMOTE_ADDR");
    $usr = explode("/",$_SERVER['HTTP_USER_AGENT']); 
    $phone = ("$usr[0]");
$text = str_replace("[phone]","$phone",$text);
  $text = preg_replace("/\[updatepro]/is","<a href=\"index.php?action=uset&sid=$sid\">Update Profie</a>",$text);
        $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
        $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$uid."'"));
        $unrd="[".$unreadinbox[0]."l".$pmtotl[0]."]";
  $text = preg_replace("/\[inbox]/is","<a href=\"inbox.php?action=main&sid=$sid\">Inbox $unrd</a>",$text);
    $nick = getnick_sid($sid);
$text = str_replace("","$nick",$text);

at page index???

if like my post click:

External image (may be gone)

SiLeNce Developer · 138 posts #13

$text = str_replace("Gumslone","preety man",$text); $text = str_replace("GUmslone","preety man",$text); $text = str_replace("GUMslone","preety man",$text); $text = str_replace("GUMSlone","preety man",$text); $text = str_replace("GUMSLone","preety man",$text); $text = str_replace("GUMSLONe","preety man",$text); $text = str_replace("GUMSLONE","preety man",$text);

haha ..

thats cool External image (may be gone)

metulj Super moderator Principal · 1,726 posts #14

how to add properly BB code to lava or funmobile

for: code..../code php...../php codebox.../codebox html...../html sql...../sql

so users will actually see all those boxes like here? is that even possible? or is that just for I.P.B. ?? External image (may be gone)

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

GumSlone Administrator Principal · 1,690 posts #15

how to add properly BB code to lava or funmobile

for: code..../code php...../php codebox.../codebox html...../html sql...../sql

so users will actually see all those boxes like here? is that even possible? or is that just for I.P.B. ?? External image (may be gone)

$str = preg_replace( "/\[html\](.*?)\[\/html\]/eis", "unhtmlentities( '$1' )", $str );
$str = preg_replace( "/\[php\](.*?)\[\/php\]/eis", "unhtmlentities( '$1' )", $str );
$str = preg_replace( "/\[sql\](.*?)\[\/sql\]/eis", "unhtmlentities( '$1' )", $str );

codebox uses frames and its not for mobiles

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

amylee Principal · 1,092 posts #16

those bbcodes wont work for lava script

metulj Super moderator Principal · 1,726 posts #19

codebox uses frames and its not for mobiles

i thought so, but i asked just to be sure External image (may be gone) tnx External image (may be gone)

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

Rider Developer · 128 posts #20

I need the code to change the .co to rrrrrrr i place the code above but not working

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close