Bbcodes In Unrealx Forum Script

Started on the old forum in July 2006 · view the original in the archive · old links redirect here

21 replies · 1,780 views · started 20 years ago · 1 min read

2 participants
lamar-wap #1

how do i add bbcodes in the unrealx forum script?

like: [ u ] text [ / u] [ small ] text [ / small] [ i ] text [ / i] [ s ] text [ / s]

lamar-wap #3

who can help me?...

wapkralj Developer · 237 posts #4

if fix my error in chat soon,i will help very soon External image (may be gone)

p.s try something like this

$ttext = str_replace ("<b","*bbbb*",$ttext);
$ttext = str_replace ("<i","*iiii*",$ttext;
$ttext = str_replace ("<u","*uuuu*",$ttext);
$ttext = str_replace ("*iiii*","<i",$ttext);
$ttext = str_replace ("*bbbb*","<b",$ttext);
$ttext = str_replace ("*uuuu*","<u",$ttextt);
lamar-wap #5

ok will test that...

abhisar #6

i will try editing the script and tell you if that works.

wapkralj Developer · 237 posts #7

I took quick look so doesn't mean it works Ok what needs to be done,you need to delete some of these but in the core.php find the part

//////////////////////////////New thread or post///////////////////////////// now in that part find the

$data=date("y m d - ".$valandos.":i:s"); $tnameas=htmlspecialchars($tname); $ttextas=htmlspecialchars($ttext); $ttext=str_replace("$","$$",$ttext);

now you will see that line

$ttextas=htmlspecialchars($ttext);

is is starting of $ttext replacing so from line $ttextas=htmlspecialchars($ttext); do not include that line, until line if (is_string($tname)) { also do not include that line copy this part

$ttext=str_replace("$","$$",$ttext);
$ttext=str_replace("<","",$ttext); $ttext=str_replace(">","",$ttext); $ttext=str_replace(""","",$ttext); $ttext=str_replace("'","",$ttext); $ttext=str_replace("\","",$ttext); $ttext=str_replace("&","&",$ttext); $tname=str_replace("$","$$",$tname); $tname=str_replace("<","",$tname); $tname=str_replace(">","",$tname); $tname=str_replace(""","",$tname); $tname=str_replace("'","",$tname); $tname=str_replace("\","",$tname); $tname=str_replace("&","&",$tname); $ttext = str_replace ("<go","gggg",$ttext); $ttext = str_replace ("<tr","trtt",$ttext); $ttext = str_replace ("<td","tdtt",$ttext); $ttext = str_replace ("External image (may be gone) try and tell me is it working External image (may be gone)

Guest #8

try this $text=htmlspecialchars($text); $text=preg_replace("/[b](.?)[/b]/i","\1", $text); $text=preg_replace("/[u](.?)[/u]/i","\1", $text); $text=preg_replace("/[i](.?)[/i]/i","\1*", $text); $text=preg_replace("/[big](.?)[/big]/i","\1", $text); $text=preg_replace("/[small](.?)[/small]/i","\1", $text); for demo http://wap.w5c.org

abhisar #11

min0taur i added the same code you telling but before that.and works fine on my site.

lamar-wap #12

its ok i did it my self thanks anyway...

abhisar #13

me too got that work.Its great.

abhisar #15

wot public!

abhisar #18

Give me the link to it.

lamar-wap #19

min0taur your site is sick lol i cant register.......

abhisar #20

i have more bbcodes if someone require

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