imperialized Posted March 5, 2008 Share Posted March 5, 2008 A lot of forums use this type of linking system, as to prevent users from inputting html. If I wanted to include something similar in my news posting script, how would I go about this? I am not very fluent with php, I know basics, but when it comes to manipulating strings, etc, I am very new... as you can probably tell with my previous questions. Anyways, to further elaborate and explain my question, I want to know how to make links like so: [link url=http://xxxx](link text goes here)[/link] Furthermore, what if I wanted to do the same thing with images? Such as: http://[/img] Now, I realize that I will most likely have to do str_replace("[/img]", "</img>", $string); However, I guess my real question would be how to extract the URLs into variables and place them in the right place. If this is confusing I appologize, but I appreciate any help. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
discomatt Posted March 5, 2008 Share Posted March 5, 2008 http://www.tutorio.com/tutorial/simple-and-complex-bbcode-with-php or http://www.sitepoint.com/article/bb-code-php-application Or if you have access to install packages http://pecl.php.net/package/bbcode Gotta love google Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.