Development

#1608 ([sfSIFRPlugin] Yaml syntax mya needs to be revised)

You must first sign up to be able to contribute.

Ticket #1608 (new enhancement)

Opened 6 years ago

Last modified 4 years ago

[sfSIFRPlugin] Yaml syntax mya needs to be revised

Reported by: kupokomapa Assigned to: Michael.Nolan
Priority: minor Milestone: plugins
Component: plugins Version: 1.0.0
Keywords: Cc:
Qualification: Unreviewed

Description

I was trying to work with the plug-in and came across an implementation limitation. Consider the following:

# default values
all:
  sifr:
    font_path:    /sfSIFRPlugin/swf
    font:         Gill.swf
    replace:
      font:
        sSelector: "#page-title,#section-title"
        sWmode:    transparent
        sColor:    "#2a2a2a"
        sCase:     normal
      font:
        sSelector: ".gill-white-16,.gill-white-14"
        sWmode:    transparent
        sColor:    "#ffffff"
        sCase:     normal
      font:
        sSelector: ".gill-darkred-12"
        sWmode:    transparent
        sColor:    "#5e0606"
        sCase:     normal

We the above configuration YAML is limiting the replacement of font tags to only one and I way I found around that is the following:

Add after line 79 of sfSIFRFilter.class.php:

$element = ($pos = strpos($element, '-'))?substr($element, 0, $pos):$element;

and this way I can use a number after the element to force the plug-in to tread them differently.

# default values
all:
  sifr:
    font_path:    /sfSIFRPlugin/swf
    font:         Gill.swf
    replace:
      font-1:
        sSelector: "#page-title,#section-title"
        sWmode:    transparent
        sColor:    "#2a2a2a"
        sCase:     normal
      font-2:
        sSelector: ".gill-white-16,.gill-white-14"
        sWmode:    transparent
        sColor:    "#ffffff"
        sCase:     normal
      font-3:
        sSelector: ".gill-darkred-12"
        sWmode:    transparent
        sColor:    "#5e0606"
        sCase:     normal

Change History

12/20/07 16:06:46 changed by lking

  • owner changed from fabien to Michael.Nolan.
  • component changed from plugins to sfSIFRPlugin.
  • qualification set to Unreviewed.

09/15/09 15:19:25 changed by FabianLange

  • owner changed from Michael.Nolan to fabien.
  • component changed from sfSIFRPlugin to plugins.

09/15/09 17:35:01 changed by FabianLange

  • owner changed from fabien to Michael.Nolan.