Class PlgContentEmailcloak

Description

Email cloack plugin class.

  • since: 1.5

Located in /plugins/content/emailcloak/emailcloak.php (line 19)

JObject
   |
   --JEvent
      |
      --JPlugin
         |
         --PlgContentEmailcloak
Method Summary
 boolean onContentPrepare (string $context, mixed &$row, mixed &$params, [integer $page = 0])
 string _addAttributesToEmail (string $jsEmail, string $before, string $after)
 boolean _cloak (string &$text, mixed &$params)
 string _getPattern (string $link, string $text)
Variables
Methods
onContentPrepare (line 31)

Plugin that cloaks all emails in content from spambots via Javascript.

  • return: True on success.
  • access: public
boolean onContentPrepare (string $context, mixed &$row, mixed &$params, [integer $page = 0])
  • string $context: The context of the content being passed to the plugin.
  • mixed &$row: An object with a "text" property or the string to be cloaked.
  • mixed &$params: Additional parameters. See {@see PlgContentEmailcloak()}.
  • integer $page: Optional page number. Unused. Defaults to zero.
_addAttributesToEmail (line 72)

Adds an attributes to the js cloaked email.

  • return: Js cloaked email with attributes.
  • access: protected
string _addAttributesToEmail (string $jsEmail, string $before, string $after)
  • string $jsEmail: Js cloaked email.
  • string $before: Attributes before email.
  • string $after: Attributes after email.
_cloak (line 98)

Cloak all emails in text from spambots via Javascript.

  • return: True on success.
  • access: protected
boolean _cloak (string &$text, mixed &$params)
  • string &$text: The string to be cloaked.
  • mixed &$params: Additional parameters. Parameter "mode" (integer, default 1) replaces addresses with "mailto:" links if nonzero.
_getPattern (line 55)

Generate a search pattern based on link and text.

  • return: A regular expression that matches a link containing the parameters.
  • access: protected
string _getPattern (string $link, string $text)
  • string $link: The target of an email link.
  • string $text: The text enclosed by the link.

Inherited Methods

Inherited From JPlugin

 JPlugin::__construct()
 JPlugin::loadLanguage()

Inherited From JEvent

 JEvent::__construct()
 JEvent::update()

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()

Documentation generated on Tue, 19 Nov 2013 15:02:28 +0100 by phpDocumentor 1.4.3