PDA

View Full Version : Parsing BBCode, not working how I need it too.


Guest190829
07-05-2005, 02:28 AM
Okay, well I made a function to send a PM for a hack I'm making, and inside

$message

Is text, and also a link to a members profile...so I need to parse the link to make it an actually hyperlink...

I tried

$parsedurl = parse_bbcode("<a href='" . $cleanurl[0] ."'>$cleanuri[0]</a>");

and that wasn't what I wanted....

And then I tried

$parseurl = parse_bbcode("]$cleanurl[0] ($cleanuri[0)");

And that gave me the actually HTML markup for the link

<a href="http://localhost/member.php?u=1" target="_blank">http://localhost/member.php?u=1</a>

And it didn't parse it! So can anyone give me a helping hand and tell me what I'm doing wrong?

sabret00the
07-05-2005, 05:20 PM
what's wrong with simply parse_bbcode($message);

Guest190829
07-05-2005, 05:39 PM
Yeah, that would give the same affect as what I was doing. When I tried it that way, I got the same result. It's parsing the bbcode I guess, since it's coming up
as

<a href="http://localhost/member.php?u=1">http://localhost/member.php?u=1</a>

I just don't know why it isn't parsing the HTML now?

sabret00the
07-06-2005, 07:38 AM
are you sure you're not parsing it twice?

altsounds
09-20-2005, 07:04 AM
I have this issue too with something I am working on. Can get it to parse the bb code but all is left is html. How do we get the html to work and not just be text??