Som tricky (?) replacing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
JKM
Forum Contributor
Posts: 221
Joined: Tue Jun 17, 2008 8:12 pm

Som tricky (?) replacing

Post 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.
User avatar
manohoo
Forum Contributor
Posts: 201
Joined: Wed Dec 23, 2009 12:28 pm

Re: Som tricky (?) replacing

Post by manohoo »

What is your question?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Som tricky (?) replacing

Post 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.
Post Reply