Forum Moderators: coopster
I have the basic, normal BBCode working fine. However I would like to do a couple of special BBCode tags specific for my website. All of these special tags follow the same basis; [tag]content[/tag]
I want to read the content between the [tag]'s and then use the content in a MySQL database query. As an example; [siteimg]Awesome Picture[/siteimg]. It takes "Awesome Picture" and queries the database for the physical location of the image called "Awesome Picture" and then displays "Awesome Picture Thumb" with a link to "Awesome Picture".
I managed to get it going in several different ways, but none worked quite right. Using it on a "comments" page it was parsing them fine on individual comments providing there was only one image per comment. If there was more than one, it would display the same image repeated. When I eventually managed to get it displaying the images individually (using an echo within the function), all other content within the comment was wiped out.
Can anyone advise me on how I would accomplish this successfully?
Thanks