Beispiel #1
0
 public function onNextendBaseReady()
 {
     N2Loader::import('libraries.image.helper');
     N2ImageHelper::addKeyword($this->getPathKey(), $this->getAssetsPath(), $this->getUri());
 }
Beispiel #2
0
                    controlsClass: "n2-modal-controls-side",
                    controls: [\'<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">' . n2_('Select') . '</a>\'],
                    content: \'\',
                    fn: {
                        show: function () {
                            this.content.append(nextend.browse.getNode("folder"));
                            this.controls.find(".n2-button-green")
                                .on("click", $.proxy(function (e) {
                                    e.preventDefault();
                                    this.hide(e);
                                    callback(nextend.browse.getCurrentFolder());
                                }, this));
                        }
                    }
                }
            }, true);
        }';
    }
    public static function SVGToBase64($image)
    {
        $ext = pathinfo($image, PATHINFO_EXTENSION);
        if (substr($image, 0, 1) == '$' && $ext == 'svg') {
            return 'data:image/svg+xml;base64,' . base64_encode(N2Filesystem::readFile(N2ImageHelper::fixed($image, true)));
        }
        return N2ImageHelper::fixed($image);
    }
}
N2Loader::import('libraries.image.helper', 'platform');
N2ImageHelper::$protocolRelative = N2Settings::get('protocol-relative', '1');
N2ImageHelper::addKeyword('$', N2Filesystem::getBasePath(), N2Uri::getBaseUri());