Help for my mod please - my unparsed_equals doesn't work

Started by aegersz, May 02, 2021, 11:39:56 PM

Previous topic - Next topic

aegersz


"[blink]this works[/blink]" (it blinks) but when i try to add a number value to it ($1) it just ignore my BBC completely and prints out as [blink=5]blink5[/blink]. The value of "5" doesn't get parsed as $1.

What am I doing wrong ?

Here is my code:

        $codes[] = array(
                                'tag' => 'blink',
                                'before' => '<span style="animation-duration: 2s;" class="blinkme">',
                                'after' => '</span>',
                      );

        // Syntax: [blink=n][/blink]
        $codes[] = array(
                                'tag' => 'blink',
                                'type' => 'unparsed_equals',
                                'before' => '<span style="animation-duration: $1s;" class="blinkme">',
                                'after' => '</span>',
                        );


I have dumped the array but the 'before' value does not display on any tag (see below) so I am a bit lost. Is there a a way to print the 'before' value ?:

[63]=> array(3) { ["tag"]=> string(5) "blink" ["before"]=> string(54) "" ["after"]=> string(7) "" } [64]=> array(5) { ["tag"]=> string(5) "blink" ["type"]=> string(15) "unparsed_equals" ["test"]=> string(83) "(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[A-Za-z]{1,20}|rgb\(\d{1,3}, ?\d{1,3}, ?\d{1,3}\))\]" ["before"]=> string(55) "" ["after"]=> string(7) "" }
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

Actually, it does work. I had a 'test' row that i removed to get it working.

Can't see why but do I need a 'test' really ? it's just a +ve numeric value.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Advertisement: