Advertisement:

Author Topic: Help for my mod please - my unparsed_equals doesn't work  (Read 344 times)

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,694
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Help for my mod please - my unparsed_equals doesn't work
« on: May 02, 2021, 11:39:56 PM »

"[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:

Code: [Select]
        $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 ?:

Code: [Select]
[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 150+ 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

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,694
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Help for my mod please - my unparsed_equals doesn't work
« Reply #1 on: May 03, 2021, 12:01:40 AM »
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 150+ 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