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. Link to comment https://forums.phpfreaks.com/topic/94423-creating-links-using-url/ 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 Link to comment https://forums.phpfreaks.com/topic/94423-creating-links-using-url/#findComment-483604 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.