承接 networkteam/neos-mailobfuscator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

networkteam/neos-mailobfuscator

Composer 安装命令:

composer require networkteam/neos-mailobfuscator

包简介

A email address and link obfuscation plugin for Neos CMS

README 文档

README

In order to make life for spammers more difficult, this package provides an obfuscation of email addresses. The email address is obfuscated by a rot13 like algorithm with random offsets.

When the link is clicked, the email address is unobfuscated by the same algorithm in JavaScript:

<a href="mailto:foo@example.com">foo@example.com</a>

will become

<a href="javascript:linkTo_UnCryptMailto('obfuscatedEmail', -randomNumber)">foo (at) example.com</a>

The replacement is done in 2 steps, thus it is possible to have a link label that is different from the email address:

<a href="mailto:foo@example.com">Contact us</a>

will become

<a href="javascript:linkTo_UnCryptMailto('obfuscatedEmail', -randomNumber)">Contact us</a>

Installation

Install the composer package in your site package or distribution:

$ composer require networkteam/neos-mailobfuscator

There is no need for configuration, as a Fusion processor is attached to body of Neos.Neos:Page. That means, that the complete content of body tag is obfuscated.

Compatibility

See the following table for the correct plugin version to choose:

Neos CMS Plugin version
>= 9.0 4.x
>= 3.0 2.x, 3.x
< 3.0 1.x

Configuration

Obfuscation can be disabled for specific node types by unsetting the processor:

prototype(Neos.Neos:Page) {
    @process.networkteamNeosMailObfuscator >
}

The JavaScript include can be disabled for custom minification:

prototype(Neos.Neos:Page) {
    networkteamNeosMailObfuscator >
}

The replacement string for the at-sign (@) can be configured. It will be inserted as HTML without escaping, so it's possible to replace it with something like an image:

# Settings.yaml
Networkteam:
  Neos:
    MailObfuscator:
      atCharReplacementString: '<img src="https://example.com/at-icon.png" alt="at" />'

EEL Helpers

There are Eel helpers available to use MailObfuscator functions in Fusion

// Convert @ Character
${Networkteam.Neos.MailObfuscator.convertAtChar('foo@example.com')}
// returns: foo (at) example.com

// Convert Mail to Href
${Networkteam.Neos.MailObfuscator.convertMailto2Href('foo@example.com')}
// returns javascript:linkTo_UnCryptMailto('obfuscatedEmail', -randomNumber)

Acknowledgments

Original email address obfuscation code by TYPO3 CMS.

Development sponsored by networkteam GmbH - Neos Agentur.

License

Licensed under GPLv2+, see LICENSE.

统计信息

  • 总下载量: 113.98k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 16
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 8
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2014-09-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固