• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

BB Code Manager

Status
Not open for further replies.
That / code doesn't work properly by the way.
Yes it allows the button to work but it also inserts a / in the button text.

I've now got the add-on installed and I have to say it's great.
I'll be very interested to see how this develops as it is the final piece in the puzzle with regards to us switching to XF.

Nice work!
 
Thanks! Hm. I know how to fix that. Give me one second... Edit the KingK/BbCodeManager/BbCode/Formatter/Default.php and replace the entire spoiler function with this:
PHP:
	public static function parseTagSpoiler(array $tag, array $rendererStates, &$parentClass)
    {
        if($tag['option'] != NULL)
        {
            $buttonText = $tag['option'];
        }
        else
        {
            $buttonText = 'Show Spoiler';
        }
        $content = $parentClass->renderSubTree($tag['children'], $rendererStates);

        $output = '<div class="spoiler">
                        <div class="quotetitle">
                            <input type="button" value="' . $buttonText . '" style="font-size:11px;margin:0px;padding:0px;" onclick="
                                if (this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display != \'\')
                                {
                                    this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'\';
                                    this.innerText = \'\'; this.value = \'Hide\';
                                }
                                else
                                {
                                    this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'none\';
                                    this.innerText = \'\'; this.value = \'' . addslashes($buttonText) . '\';
                                }" />
                        </div>
                        <div class="quotecontent">
                            <div style="display: none;">' . $content . '</div>
                        </div>
                    </div>';
        return $output;
    }
I wrote it in a hurry and hadn't thought through the fact that the $buttonText is used in a non-JS setting. It should work as expected now.

Edit: Confirmed this one works! Sorry bout that.

Edit #2: I'm also going to write a uniform method for the next version to allow multiple options & modify Spoiler and Flash to utilize this.

Edit #3: I have it written and updated already. Just looking to getting it to change on Safari / WebKit browsers.
 
Is there any reason why the spoiler button text is in quotes?
Can't it just be like this?
Content
 
Example of [blur] tag.

Replacement string: <div style="color: transparent; text-shadow: 0 0 10px black;">your content</div>
I'm not very familiar with java script but the concept is:
Code:
onmouseover='this.style.Color = "black";this.style.textShadow = "0"' onmouseout='this.style.Color = "transparent";this.style.textShadow = "0 0 10px black"'
It works only in Chrome (ugly shadow), Safari and FireFox.
 
The float code isn't working for me.
I can't get text to wrap around embedded images - it just inserts the image above or below the text depending on whether the float comes before or after the text.
 
The float code isn't working for me.
I can't get text to wrap around embedded images - it just inserts the image above or below the text depending on whether the float comes before or after the text.
Same problem. Removing clearfix makes image to run into other stuff (like spoilers).
 
Hello Guys, I just moved my board to XenForo and there are some important BBCodes missing. I'm no coder and have no experience (obviously:)) I would really appreciate it if these BBcodes could made avaliable for XenForo

For the download box I use this code:

HTML:
<table border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td height="39" colspan="3">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td width="113" background="images/misc/down1.gif" height="39">
                &nbsp;</td>
                <td background="images/misc/down2.gif">&nbsp;</td>
                <td width="48" background="images/misc/down3.gif" height="39">
                &nbsp;</td>
            </tr>
        </table>
        </td>
    </tr>
    <tr>
        <td bgcolor="#C0DDFF" width="10">&nbsp;</td>
        <td bgcolor="#C0DDFF">
        <table border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border: 1px solid #007FD8" bgcolor="#FFFFFF">
            <tr>
                <td style="font-family: Arial; font-size: 12px; color: #707070; text-align: center">
                <p style="margin: 5px">{param}</td>
            </tr>
        </table>
        </td>
        <td bgcolor="#C0DDFF" width="10">&nbsp;</td>
    </tr>
    <tr>
        <td colspan="3">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td background="images/misc/down4.gif" height="11" width="11">
                <img border="0" src="images/misc/space.gif" width="1" height="1"></td>
                <td bgcolor="#C0DDFF" height="11">
                <img border="0" src="images/misc/space.gif" width="1" height="1"></td>
                <td background="images/misc/down5.gif" height="11" width="11">
                <img border="0" src="images/misc/space.gif" width="1" height="1"></td>
            </tr>
        </table>
        </td>
    </tr>
</table>

Sample: [down]http://www.your-link.com[/down]

And for traileraddict this:

HTML:
<object width="608" height="383"><param name="movie" value="http://www.traileraddict.com/emb/{param}"></param><param name="wmode" value="transparent"></param><param name="allowfullscreen" value="true"></param><embed src="http://www.traileraddict.com/emb/{param}" type="application/x-shockwave-flash" width="608" height="383" allowfullscreen="true"></embed></object>

Sample: [trailer]9319[/trailer]

Thanks.
 
Is there any reason why the spoiler button text is in quotes?
Can't it just be like this?
Content

Should work just fine. I'm just in the habit of using "".

Example of [blur] tag.

Replacement string: <div style="color: transparent; text-shadow: 0 0 10px black;">your content</div>
I'm not very familiar with java script but the concept is:
Code:
onmouseover='this.style.Color = "black";this.style.textShadow = "0"' onmouseout='this.style.Color = "transparent";this.style.textShadow = "0 0 10px black"'
It works only in Chrome (ugly shadow), Safari and FireFox.
I'll see about adding that. :)

The float code isn't working for me.
I can't get text to wrap around embedded images - it just inserts the image above or below the text depending on whether the float comes before or after the text.
Make sure you are using [float="right"][/float]. Or post an image.

Hello Guys, I just moved my board to XenForo and there are some important BBCodes missing. I'm no coder and have no experience (obviously:)) I would really appreciate it if these BBcodes could made avaliable for XenForo

For the download box I use this code:

HTML:
<table border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td height="39" colspan="3">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td width="113" background="images/misc/down1.gif" height="39">
                &nbsp;</td>
                <td background="images/misc/down2.gif">&nbsp;</td>
                <td width="48" background="images/misc/down3.gif" height="39">
                &nbsp;</td>
            </tr>
        </table>
        </td>
    </tr>
    <tr>
        <td bgcolor="#C0DDFF" width="10">&nbsp;</td>
        <td bgcolor="#C0DDFF">
        <table border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border: 1px solid #007FD8" bgcolor="#FFFFFF">
            <tr>
                <td style="font-family: Arial; font-size: 12px; color: #707070; text-align: center">
                <p style="margin: 5px">{param}</td>
            </tr>
        </table>
        </td>
        <td bgcolor="#C0DDFF" width="10">&nbsp;</td>
    </tr>
    <tr>
        <td colspan="3">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td background="images/misc/down4.gif" height="11" width="11">
                <img border="0" src="images/misc/space.gif" width="1" height="1"></td>
                <td bgcolor="#C0DDFF" height="11">
                <img border="0" src="images/misc/space.gif" width="1" height="1"></td>
                <td background="images/misc/down5.gif" height="11" width="11">
                <img border="0" src="images/misc/space.gif" width="1" height="1"></td>
            </tr>
        </table>
        </td>
    </tr>
</table>

Sample: [down]http://www.your-link.com[/down]

And for traileraddict this:

HTML:
<object width="608" height="383"><param name="movie" value="http://www.traileraddict.com/emb/{param}"></param><param name="wmode" value="transparent"></param><param name="allowfullscreen" value="true"></param><embed src="http://www.traileraddict.com/emb/{param}" type="application/x-shockwave-flash" width="608" height="383" allowfullscreen="true"></embed></object>

Sample: [trailer]9319[/trailer]

Thanks.

Click "+ Add New BB Code", add the titles, etc. as you wish. Add it as Active, with no option. Use simple replacement for both and everything before {param} should be placed in "Simple Replacement Start" and everything after it should be placed in "Simple Replacement End."
 
Thank you for the answer King Kovifor

I'm not quite sure If I did it right, I did what you said like this:

Simple Replacement Start:

Code:
<object width="608" height="383"><param name="movie" value="http://www.traileraddict.com/emb/

Simple Replacement End:

Code:
{param}"></param><param name="wmode" value="transparent"></param><param name="allowfullscreen" value="true"></param><embed src="http://www.traileraddict.com/emb/{param}" type="application/x-shockwave-flash" width="608" height="383" allowfullscreen="true"></embed></object>

It didn't worked. Also, how I'm going to do it for the download box, your steps don't apply for it ?

Thanks.
 
Thank you for the answer King Kovifor

I'm not quite sure If I did it right, I did what you said like this:

Simple Replacement Start:

Code:
<object width="608" height="383"><param name="movie" value="http://www.traileraddict.com/emb/

Simple Replacement End:

Code:
{param}"></param><param name="wmode" value="transparent"></param><param name="allowfullscreen" value="true"></param><embed src="http://www.traileraddict.com/emb/{param}" type="application/x-shockwave-flash" width="608" height="383" allowfullscreen="true"></embed></object>

It didn't worked. Also, how I'm going to do it for the download box, your steps don't apply for it ?

Thanks.
The steps were for both. And Simple Replacement End shouldn't have {param}.
 
The float code isn't working for me.
I can't get text to wrap around embedded images - it just inserts the image above or below the text depending on whether the float comes before or after the text.

I see the problem now. I'll work on getting that fixed for v1.1.1.
 
The steps were for both. And Simple Replacement End shouldn't have {param}.

I propably ask for much but could you write for both which code goes to simple replacement start and which to simple replacement end ? I don't know much about code and this is kind of gibberish for me :)

Thank you very much.
 
Thank you for the answer King Kovifor


I'm not quite sure If I did it right, I did what you said like this:

Simple Replacement Start:

Code:
<object width="608" height="383"><param name="movie" value="http://www.traileraddict.com/emb/

Simple Replacement End:

Code:
"></param><param name="wmode" value="transparent"></param><param name="allowfullscreen" value="true"></param><embed src="http://www.traileraddict.com/emb/{param}" type="application/x-shockwave-flash" width="608" height="383" allowfullscreen="true"></embed></object>

It didn't worked. Also, how I'm going to do it for the download box, your steps don't apply for it ?

Thanks.

And:

Begin:
HTML:
<table border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td height="39" colspan="3">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td width="113" background="images/misc/down1.gif" height="39">
                &nbsp;</td>
                <td background="images/misc/down2.gif">&nbsp;</td>
                <td width="48" background="images/misc/down3.gif" height="39">
                &nbsp;</td>
            </tr>
        </table>
        </td>
    </tr>
    <tr>
        <td bgcolor="#C0DDFF" width="10">&nbsp;</td>
        <td bgcolor="#C0DDFF">
        <table border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border: 1px solid #007FD8" bgcolor="#FFFFFF">
            <tr>
                <td style="font-family: Arial; font-size: 12px; color: #707070; text-align: center">
                <p style="margin: 5px">

End:
HTML:
</td>
            </tr>
        </table>
        </td>
        <td bgcolor="#C0DDFF" width="10">&nbsp;</td>
    </tr>
    <tr>
        <td colspan="3">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td background="images/misc/down4.gif" height="11" width="11">
                <img border="0" src="images/misc/space.gif" width="1" height="1"></td>
                <td bgcolor="#C0DDFF" height="11">
                <img border="0" src="images/misc/space.gif" width="1" height="1"></td>
                <td background="images/misc/down5.gif" height="11" width="11">
                <img border="0" src="images/misc/space.gif" width="1" height="1"></td>
            </tr>
        </table>
        </td>
    </tr>
</table>
 
I did them both. Trailer doesn't appear and there is something wrong with the download box.
Here, you can go the thread and see it for yourself. To see where the trailer is, click on the third spoiler.

The download box looks like this:

OxLYW.png
 
Ah. I had missed the second {param}. That's a little more advanced and requires PHP. And what's wrong with the download box?
 
I noticed you've modified the code in the previous post. I modified my BB Codes as well

The Download code should be look like this:

7Jl3R.png


But insted we see this :) :

OxLYW.png


How is the modified traileraddict code King Kovifor ?
 
Status
Not open for further replies.
Top Bottom