BBCode bg (BackGround) .. Compatible With:2.0 RC2 , 1.1.10

Started by صلاح الدين, November 11, 2009, 10:49:21 AM

Previous topic - Next topic

صلاح الدين

Link to Mod

Background Tag
mod by: Saladine
version: 1.0
language:
*english
*english-utf8
*arabic
*arabic-utf8

Compatible With:2.0 RC2 , 1.1.10

gbsothere

#1
Love this idea, very nice.   :)



Edit:

The only thing is that this code added to Subs.php

// BG [bg=background url]you text[/bg] |or| [bg]you text[/bg]
         array(
            'tag' => 'bg',
            'before' => '<center><table border="1" width="98%"><tr><td>',
            'after' =>  '</td></tr></table></center>',
               'block_level' => true,
         ),
       array(
            'tag' => 'bg',
            'type' => 'unparsed_equals',
            'before' => '<table border="1" width="80%" background="$1"><tr><td>',
            'after' => '</tr></table>',
            'block_level' => true,
         ),
         ),


is placing an extra   ),

which results in a white page.  Removing it seems to have sorted it, though.

(Though perhaps not, I'm only getting the link, not the image, when posting between the bg tags.)   :)


Edit:   Ah, I get it.  The URL goes inside the opening BG tag and the image only stretches the length of text, so one must hit the return key to expand the image. 

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

صلاح الدين

Thank you friend , I will do ......
I fix the problem now ...

Arantor

It also won't create the button properly in RC2 though it's tagged as compatible.

The addition to Subs-Editor.php for RC2 should be:
array('image' => 'bg', 'code' => 'bg', 'before' => '[bg]', 'after' => '[/bg]', 'description' => $txt['bg']),

Though the string you list as the 'find' doesn't even exist in RC2.
Holder of controversial views, all of which my own.


صلاح الدين

Thank you Arantor ,
I fix the problem now it Compatible just With 2.0 RC2

Arantor

Does that install on a fresh RC2? Looking at the code it appears it might not, but I haven't tried it.
Holder of controversial views, all of which my own.


صلاح الدين

Quote from: Arantor on November 12, 2009, 08:47:28 AM
Does that install on a fresh RC2? Looking at the code it appears it might not, but I haven't tried it.
excuse me, I don't understand you ...
i have tried it, it worked normally...
can you explain please...

Arantor

I hadn't tried the mod itself, when I commented earlier, but it looked at the time as though it would not actually install on RC2 because of the edit to Subs-Editor.php looking like it had a blank line at the start (which would fail to match).

Having looked again, I don't see any problem why it wouldn't work now on RC2, but it's always best to grab a fresh installation and install it to be sure - might also be good to add a screenshot from RC2 to show it works just fine on there too.
Holder of controversial views, all of which my own.


smldmr

is it possible to allow this code only selectet user-groups?

Arantor

Not without some fancy footwork in the code, though it has been done before. I did it in my Moderator and Admin Tags mod (Saladine, if you're reading, feel free to take a look at that mod to see how it's done there to make it user-group dependent)
Holder of controversial views, all of which my own.


Tuddley3

Is it possible to modify the Width and Height? I think it is default 800x800. I would like to increase it to 1024x1024 or 1024x768.

Thank you,
Tuddley

DarkSylver

Would be no way to change the MOD to be compatible with 1.1.8?

Arantor

Holder of controversial views, all of which my own.


morokat

sorry i'm don't know why its duplicate the image,like in picture i'm also test delete the
and test to cut out text
bt still error help me pls

Arantor

It's not a duplicate. What happens if that this bbcode will run the background as many times as it has to to fit the container - you see the box is much wider than the background. So it'll put the background in as many times as it needs to fill it in.
Holder of controversial views, all of which my own.


FireDitto

It's not working for me; all it's doing is putting a nice boarder around my post... I want the background to be black.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

chinaren

The Opus Path - The Next Generation of the Written Word

Maxine22

Hi

Just wondering if there is a way to alter the code so the image stretches to fit inside the border instead of creating duplicate copies?

Apllicmz

When update
dont forget portuguese

<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">

        <operation>
         <search position="end" />
            <add><![CDATA[
$txt['bg'] = 'Adicionar fundo';]]></add>
        </operation>
       </file>
       
       <file name="$languagedir/Modifications.portuguese_pt.php" error="skip">

        <operation>
         <search position="end" />
            <add><![CDATA[
$txt['bg'] = 'Adicionar fundo';]]></add>
        </operation>
       </file>
       
        <file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">

        <operation>
         <search position="end" />
            <add><![CDATA[
$txt['bg'] = 'Adicionar fundo';]]></add>
        </operation>
       </file>
       
       <file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">

        <operation>
         <search position="end" />
            <add><![CDATA[
$txt['bg'] = 'Adicionar fundo';]]></add>
        </operation>
       </file>




Golvnah

Any hopes of this being ported to 2.0.7? its a really useful idea that id love to use :P

Advertisement: