![]() |
custom bbCode tag and variables ($postid) ? possible?
Hi all!
I would like to create a custom bbCode tag [spoiler] that can be collapsed/expanded via JS. In order to be able to do that however, I need to assign unique IDs to each container displaying a spoiler posted by users. So I was wondering if it was possible to create a custom bbCode tag [spoiler], where the replacement code contains the variable $postid, similar to the snippet below: Code:
<div id="spC_$postid" onclick="JSgoeshere"> Any hints/tips/pointers would be greatly appreciated. :) |
$post[postid] should work.
|
Hi Dismounted,
Thanks much for the quick reply! I tried $post[postid] a minute ago but all I get on the rendered page is <div id="$post[postid]">the parameter text</div>. Is it possible that vB simply won't parse variable placed in this location? Ha! Fixed with work-around by using "this" my JS. For anyone in a similar predicament, here's an example ... feel free to grab/use/mangle the code therein! :) |
All times are GMT. The time now is 04:36 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|