The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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! |
#2
|
||||
|
||||
Is this for css reasons? If so, you can use nth-child, assuming your plugin uses a unique tag.
Example: Code:
#postidstuff p.pluginstuff:nth-child(2){ css here } |
#3
|
|||
|
|||
Thanks for the reply!
This is not used for CSS. The contents of the bbcode are written into the database and I need to return the unique row id back to the bbcode block. So some posts may have multiple bbcode blocks and I need to be able to identify each of them. There is a button in each block of bbcode that opens up another application using that unique id. I hope that makes sense. Thanks! |
#4
|
|||
|
|||
I figured it out. I didn't realize that the post/bbcode parsing happened all at once; so I was just able to define a global and add an id to the parser. pretty easy after that. Thanks!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|