Resource icon

Custom BB Code Manager v1.3.4

No permission to download
Whoops, misread your post. I believe you can add on using the Buttons Manager that comes with this.
 
When you hover over thread title the spoiler between the tags can be read. Is this only avoidable by asking users to push their spoilers down the page?
 
As of right now, yes, this is intended behavior. I'll see about an update to change this similar to [ATTACH] and [MEDIA] soon.
 
Hey KK.

The flash code wasn't working, it was rendering the src URL as 'array'. And indeed, for some reason in parseTagFlash(), $tag['children'][0] is itself a child array, not the URL. I think I kinda sorta see why, but didn't really have time to debug it properly.

I monkey patched it to work by just adding an is_array() test ...

PHP:
public static function parseTagFlash(array $tag, array $rendererStates, &$parentClass)
    {
        if (!empty($tag['option']) && $parentClass->parseMultipleOptions($tag['option']))
        {
            $attributes = $parentClass->parseMultipleOptions($tag['option']);
            $attributes['width'] = $attributes[0];
            $attributes['height'] = $attributes[1];
          
            $src = $tag['children'][0];
        }
        else
        {
            $attributes['width'] = '550';
            $attributes['height'] = '400';
            $src = $tag['children'][0];
        }
        /*
        * $$$ hugh - had to hack around this, for some reason the child array's entry is itself
        * a child array, at least in the usage cases I'm testing.
        */
        if (is_array($src))
        {
            $src = $src['option'];
        }
        return '<object width="' . $attributes['width'] . '" height="' . $attributes['height'] . '">
                        <param name="movie" value="' . $src . '">
                            <embed src="' . $src . '" width="' . $attributes['width'] . '" height="' . $attributes['height'] . '">
                            </embed>
                    </object>';
    }

-- hugh
 
Will this work with 1.2? I'm wondering if for once we can add bbcode buttons to the editor, like everybody says "this is much better and more flexible than TinyMCE", i'm wondering if can do something useful like that.
 
Nice to know. If this editor is capable of it, then it would be something big to some bbcode be able to have one button in the editor itself can make it really awesome! :)
 
BTW, I finaly realized what's going on with the flash bbcode. XF is automagically inserting a URL tag, so it ends up as ...

Code:
[FLASH][URL]http://foo.bar/path/to/file.swf[/URL][/FLASH]

... which of course generates the child entry. So I turned off parsing bbcodes within the tag in the flash bbcode settings, and modified my code above to just preg_replace() out the URL tags.

The only thing still puzzling me is sometimes, and I don't seem to be able to replicate it reliably, the URL tag insertion surrounds the closing flash tag ...

Code:
[FLASH][URL]http://foo.bar/path/to/file.swf[/FLASH][/URL]

... which I guess makes sense, as [ and ] are legal in URL's, athough usually encoded. I'm just not sure why the seeming randomness of when it does and doesn't encapsulate the closing flash tag.

Oh well. It's at least half assed working for me now.

If you have any bright ideas on how to fix it 100%, I'd appreciate it.

-- hugh
 
Without looking not sure. What version are you actually using? I'm sure most of the BBCodes will get some kind of update with the rewrite.
 
I'm using the latest, 1.3.4. Not a big deal, I can limp along with what I have until you get the rewrite sorted out and we all move on to the Brave New World of 1.2.

The weird issue, with the closing flash tag sometimes getting wrapped in the auto-inserted URL tag and sometimes not, only seems to happen when re-editing, in WYSIWYG mode. I'm only using the flash bbcode in my XenCarta wiki, so I can work round it by editing those articles in text mode.

-- hugh
 
I'm looking for create a BBCODE that may be possible, that is be possible to resize images, that is one of the most frustrating limitation in this script for what i usually do in our forum

Is there a way to add some special image bbcode, that adds an image but let us edit the width, height of it? Since it replaces html, but i'm lost while creating one.
 
Yes, its 100% possible. Add a code, multi options (2) replacement start:

<img src="

Replacement End:
" width="{1}" height="{2}" />

That should accomplish what you want.
 
Yes, its 100% possible. Add a code, multi options (2) replacement start:
<img src="
Replacement End:
" width="{1}" height="{2}" />
That should accomplish what you want.
Thank you for your reply it is something awesome, i'm searching is there a guide? I'm newbie at this addon and bbcodes itself, trying to understand the bbcode usage but it gives me this result:
%3Ca%20href=
"="" target="_blank" class="externalLink" rel="nofollow" ]http://i.imgur.com/guM96WQ.png[/img2]" width="{1}" height="{2}" />
 
Can you screen shot your settings? And place how you are attempting to use it in [CODE] tags?
 
Can you screen shot your settings? And place how you are attempting to use it in [CODE] tags?
In settings i just did the tag img2, 2 in options number, and the start/end as you said, i guess what i am doing wrong is the usage, like this, don't know where to put the url + resize numbers
Code:
[img2]img[/img2]
[imh2=url]??[/img2)
 
Back
Top Bottom