Page 1 of 1

Som tricky (?) replacing

Posted: Tue Jan 05, 2010 8:18 pm
by JKM
I've made a quote feature for a comment system, and I want to do it like this:

Code: Select all

[quote=something]text to be quoted[/quote]
, but I also want to make it possible to do it like this:

Code: Select all

1)[quote=<a href="users.php?uid=<userid>"><username>]text to be quoted[/quote]
OR
2) [quote=[user=<userid>]<username>[/user]]text to be quoted[/quote]
, but I don't know how I should do it (I'd rather use number two), but if it's too tricky, I can simply add username without the link.

Thanks.

Re: Som tricky (?) replacing

Posted: Tue Jan 05, 2010 9:23 pm
by manohoo
What is your question?

Re: Som tricky (?) replacing

Posted: Tue Jan 05, 2010 11:50 pm
by John Cartwright
It's a bit tricky to implement correctly.. I would suggest taking a look at existing bbcode parsers.

Otherwise.. you'll need to be more specific with your question.