BB Code will render back into HTML. This is a pretty pointless endeavor.
Yes, I know BB Code will render back into HTML. But when
I've already write the PHP code for rendering the BB code (think like shortcode in Wordpress) then do you want to reuse the BB code or write in HTML from the scratch?
Also, what do you expect this code snippet to do?
I've already said, its a customized lightbox to show image gallery, it process the inside images,
wrap them in some lightbox wrapper, and
add js, css on the fly.
In my case, what I want is not
<div>a.jpg</div><div>b.jpg</div><div>c.png</div>
but
Code:
<div class="container gallery-container">
<div class="wrapper some-level-of-wrapper">
<h4 class="title the-gallery-title"></h4>
<span class="info some-instruction-like-click-image-to-enlarge"></span>
<script type="text/javascript">The script for this gallery</script>
<div>a.jpg</div><div>b.jpg</div><div>c.png</div>
</div></div>
I don't get this construct either. The whole purpose of BB code is not to use html. Why would you have HTML inside your BB codes?
Back to what I have already said, in the front-end,
I-as-a-user can simply use the uploader to upload images, then wrap them in [gallery] BB Code, so I can get the gallery without using any HTML code!!!
So now,
I-as-a-administrator who use the admin panel but cannot use the simple WYSIWYG editor.
I use the HTML for demostration, it should be
[gallery][img]IMG1[/img][img]IMG2[/img]...[gallery]
in the front-end
In the backend, what do you think is simpler?
{xen:helper bbCode, "gallery", "<div><img src="img1" /></div><div><img src="img2" /></div>..."}
or (I dont think this is evenly valid syntax)
{xen:helper bbCode, "gallery", "{xen:helper bbCode, "img", "img1"}{xen:helper bbCode, "img", "img2"}..."}
Also, please note that I am using template HTML syntax in
page editor, not the normal general template editing in the Apperance/Style menu. So there're many complex UI element that I don't want to copy and paste each time I use! So a BB code helper, like a shortcode in WP, should be a potential solution.