Set/Get BBCode tag count in post
I have a custom bbcode that interacts with the database via a plug-in and I'd like to be able to uniquely identify the bbcode in the post. I have post id already, but in the case where the bbcode is used multiple times in a post, I want a number sequence as well. Is there something in place that does this? Also; I'd want to be able to write this id back into the post (not the post cache).
Example:
[GROUP]test 1[/GROUP]
[GROUP]test 2[/GROUP]
I'd like it to parse the post on submission and create:
[GROUP=[post_id:sequence]]test 1[/GROUP]
[GROUP=12312312312:2]test 2[/GROUP]
Any thoughts? I've looked at forum, but I'm not even sure what to search for. Thanks!
|