Hello,

Location Email sub-module field doesn't seem to be recognised by either Invisimail or Spamspan modules for email encryption.

I don't know which module is concerned but I post here as a starting point.
Thanks

Comments

PhilY created an issue. See original summary.

digitalseven’s picture

I second this, also looking for a solution.

phily’s picture

Status: Active » Closed (works as designed)

Spamspan declares a spamspan() function that can be used in location.tpl.php to alter the output of email field.
Similar features should work with invisimail_encode_html() from Invisimail.

Here is an example using Spamspan with fallback if the module is absent.
Copy location.tpl.php to your theme folder and replace

    <?php if (!empty($email)): ?>
      <div class="email">
        <abbr class="type" title="email"><?php print t("Email address"); ?>:</abbr>
        <span><a href="mailto:<?php print $email; ?>" itemprop="email"><?php print $email; ?></a></span>
      </div>
    <?php endif; ?>

with

    <?php if (!empty($email)): ?>
      <div class="email">
        <abbr class="type" title="email"><?php print t("Email address"); ?>:</abbr>
        <?php if (module_exists('spamspan')):
          $settings = array(
            'spamspan_at' => true,
            'spamspan_use_graphic' => true,
            'spamspan_dot_enable' => true,
          );
          print spamspan($email, $settings); ?>
        <?php else: ?>
          <a href="mailto:<?php print $email; ?>" itemprop="email" title="<?php print t("Email address"); ?>"><?php print $email; ?></a>
        <?php endif; ?>
      </div>
    <?php endif; ?>