WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: emObA - Email Obfuscator Advanced] Links not working (13 posts)

  1. Bev
    Member
    Posted 4 years ago #

    I was using version 1.1 of this plugin successfully, but when I upgraded to 1.2 my links broke. I use bare email addresses and found these simply vanished in the resulting web page. I have downgraded to 1.1 for now.

  2. kirkpatrick
    Member
    Posted 4 years ago #

    Exactly what do you mean by "bare email addresses"? In pages, posts, or comments? Does this happen if you change to the default theme?

    If you type in a@b.cc (what I would call a "bare" address) you should see a-b-cc as a mailto: link. I've just reinstalled 1.2 from WordPress plugin repository, and it works in various themes.

    You might look at the source of your page as it posts, see what appears in the emoba span. And use developer tools in your browser to look at the link -- is there anything between <a ...> and </a>? Because whatever is there is what you should see, and it seems to have "vanished". Perhaps this would give you clues you could tell me about.

  3. Bev
    Member
    Posted 4 years ago #

    I have confirmed this fails in the default theme as well as my theme.

    Using version 1.2
    In a page, I place the text: To join our team please email a@b.com

    The resulting page reads: To join our team please email

    Viewing source reveals:

    To join our team please email <span id="emoba-7374"><span class="emoba-em"></span></span>
    <script type="text/javascript">
      var mailtostring = 'mailto:';
      var mailNode = document.getElementById('emoba-7374');
      var linkNode = document.createElement('a');
      linkNode.title = 'Send email';
      linkNode.id = 'emoba-7374';
      var mailtolink = mailtostring + '';
      linkNode.href = mailtolink;  var tNode = document.createTextNode('');
      linkNode.appendChild(tNode);
      mailNode.parentNode.replaceChild(linkNode, mailNode);
    </script>

    Using Version 1.1
    I see: To join our team please email a-b-com

    Source:

    To join our team please email <span id="emoba-4423"><span class="emoba-em">a<img src="http://mywebsite.com/wp-content/plugins/emoba-email-obfuscator-advanced/at-glyph.gif"  class="emoba-glyph" alt="at"  height="8" />b<img src="http://mywebsite.com/wp-content/plugins/emoba-email-obfuscator-advanced/dot-glyph.gif" class="emoba-glyph" alt="dot" height="9" />com</span></span> 
    
    <script type="text/javascript">
      var mailtostring = 'mailto:';
      var mailNode = document.getElementById('emoba-4423');
      var linkNode = document.createElement('a');
      linkNode.title = 'Send email';
      linkNode.id = 'emoba-4423';
      var mailtolink = mailtostring + '%61%40%62%2E%63%6F%6D';
      linkNode.href = mailtolink;
      var tNode = document.createTextNode('a-b-com');
      linkNode.appendChild(tNode);
      mailNode.parentNode.replaceChild(linkNode, mailNode);
    </script>

    It also has a problem with the format [name]a@b.com - I still get nothing using version 1.2.

  4. kirkpatrick
    Member
    Posted 4 years ago #

    This problem is due to a bug in older versions of PHP (2.8.6 and earlier, if not updated), which prevents regex named subpatterns from being used in preg_replace_callback -- something I used in emObA 1.2.

    I have uploaded version 1.3 ("other versions") -- it's not yet the stable version. Perhaps you could try it out to see if (as I am pretty sure) it will solve your problem.

    If it does, I'd appreciate knowing, and also appreciate it if you would close this issue. Thanks

  5. Bev
    Member
    Posted 4 years ago #

    I tried out 1.3 and it works fine. One thing you might note to users is if the [EMAIL ...] format doesn't work to check the spaces since one extra space threw mine off.

  6. Bev
    Member
    Posted 4 years ago #

    Found another problem with version 1.3.

    In my page I have in the html view:
    <a href="mailto:a@b.com">a@b.com</a>

    What I get on the page looks like:
    a@b.com a@b.com '; linkNode.appendChild(tNode); mailNode.parentNode.replaceChild(linkNode, mailNode);

    Viewing source shows:
    `<span id="emoba-5289"><span class="emoba-pop"><span id="emoba-2796"><span class="emoba-em">a<img src="http://mysite.com/wp-content/plugins/emoba-email-obfuscator-advanced/at-glyph.gif" alt="at" class="emoba-glyph" />b<img src="http://mysite.com/wp-content/plugins/emoba-email-obfuscator-advanced/dot-glyph.gif" alt="dot" class="emoba-glyph" />com</span></span>
    <script type="text/javascript">
    var mailtostring = 'mailto:';
    var mailNode = document.getElementById('emoba-2796');
    var linkNode = document.createElement('a');
    linkNode.title = 'Send email';
    linkNode.id = 'emoba-2796';
    var mailtolink = mailtostring + "%61%40%62%2E%63%6F%6D";
    linkNode.href = mailtolink;
    var tNode = document.createElement('span');
    tNode.innerHTML = '<span class="emoba-em">a<img src="http://mysite.com/wp-content/plugins/emoba-email-obfuscator-advanced/at-glyph.gif" alt="at" class="emoba-glyph" />b<img src="http://mysite.com/wp-content/plugins/emoba-email-obfuscator-advanced/dot-glyph.gif" alt="dot" class="emoba-glyph" />com</span>';
    linkNode.appendChild(tNode);
    mailNode.parentNode.replaceChild(linkNode, mailNode);
    </script><span >  <span class="emoba-em">a<img src="http://mysite.com/wp-content/plugins/emoba-email-obfuscator-advanced/at-glyph.gif" alt="at" class="emoba-glyph" />b<img src="http://mysite.com/wp-content/plugins/emoba-email-obfuscator-advanced/dot-glyph.gif" alt="dot" class="emoba-glyph" />com</span>  </span></span></span>
    <script type="text/javascript">
    var mailtostring = 'mailto:';
    var mailNode = document.getElementById('emoba-5289');
    var linkNode = document.createElement('a');
    linkNode.title = 'Send email';
    linkNode.id = 'emoba-5289';
    var mailtolink = mailtostring + "%61%40%62%2E%63%6F%6D";
    linkNode.href = mailtolink;
    var tNode = document.createElement('span');
    tNode.innerHTML = '<span id="emoba-2485"><span class="emoba-em">a<img src="http://mysite.com/wp-content/plugins/emoba-email-obfuscator-advanced/at-glyph.gif" alt="at" class="emoba-glyph" />b<img src="http://mysite.com/wp-content/plugins/emoba-email-obfuscator-advanced/dot-glyph.gif" alt="dot" class="emoba-glyph" />com</span></span>
    <script type="text/javascript">
    var mailtostring = 'mailto:';
    var mailNode = document.getElementById('emoba-2485');
    var linkNode = document.createElement('a');
    linkNode.title = 'Send email';
    linkNode.id = 'emoba-2485';
    var mailtolink = mailtostring + "%61%40%62%2E%63%6F%6D";
    linkNode.href = mailtolink;
    var tNode = document.createElement('span');
    tNode.innerHTML = '<span class="emoba-em">a<img src="http://mysite.com/wp-content/plugins/emoba-email-obfuscator-advanced/at-glyph.gif" alt="at" class="emoba-glyph" />b<img src="http://mysite.com/wp-content/plugins/emoba-email-obfuscator-advanced/dot-glyph.gif" alt="dot" class="emoba-glyph" />com</span>';
    linkNode.appendChild(tNode);
    mailNode.parentNode.replaceChild(linkNode, mailNode);
    </script>';
    linkNode.appendChild(tNode);
    mailNode.parentNode.replaceChild(linkNode, mailNode);
    </script>`

  7. kevin-green21
    Member
    Posted 4 years ago #

    we're having the same problem right above with
    a@b.com

    our work-around has been to change the @ signs to [at] in the linked text, but that seems rather janky. I'm also worried that spambots search for [at] which is now plainly in the text of the page.

    Letting Emoba make a plain text email into a link doesn't work since the result doesn't match the format of the links and text on our pages.

    Here are the pages in question. Suggestions please???

    http://www.childrenoftheamazon.com/contact/
    http://www.childrenoftheamazon.com/get-involved/spread-the-word/

    thanks,
    -k

  8. kirkpatrick
    Member
    Posted 4 years ago #

    Sorry for the delay in responding.

    I did not try to create the logic necessary to detect an email "name" in an email link. It is fairly tricky, and exactly the result that i think you desire would occur if you just don't put the html link in.

    That is, what you expect emObA to do to <a href="mailto:a@b.com">a@b.com</a> you will get by simplifying to a@b.com.

    If you want an email link with a "name" = the email, just type in the email. Is there a problem with doing this?

  9. Bev
    Member
    Posted 4 years ago #

    I was using a standard email link, the first example in your plugin documentation. This does not work.

    The benefit would be applying this plugin to a large WordPress site with existing email links.

  10. kirkpatrick
    Member
    Posted 4 years ago #

    @kevin:
    Perhaps you could be more specific about what you mean by "Letting Emoba make a plain text email into a link doesn't work since the result doesn't match the format of the links and text on our pages." (I guess you've removed the emails from those pages -- I don't see any.) But emObA does the same thing to a plain text email as you (I think) want it to do to your example link.

    @bstofko:
    I will consider this for the next upgrade. The logic is a bit fragile, so I can't promise to release it. Keep an eye on this RSS feed.

    But I have to disagree: The first example in my documentation is NOT a link with the email itself as the visible representative.

  11. Bev
    Member
    Posted 4 years ago #

    The problem I am trying to describe is exactly the same as in the thread titled "Email displays twice followed by some code".

    From your documentation you describe "standard email links (<a href="mailto:you@example.com">Name</a>)" should be recognized. They *are* recognized but the code produced is not correct - you end up with 2 email links followed by javascript echoed on the page.

    I suspect Kevin doesn't like the format of bare email address (those without "mailto") because emoba inserts gifs that may not match the text font.

  12. kirkpatrick
    Member
    Posted 4 years ago #

    You may try the development version (download from http://downloads.wordpress.org/plugin/emoba-email-obfuscator-advanced.zip
    In this update, the email address itself may appear as the displayed "Name" in all forms -- html link, short form ([EMAIL...]), bare, obfuscated either with text or with graphic symbols.

    Please note, however: If you want to display the email itself, rather than a person/organization name, it will look the same regardless of whether you entered an html link or used a bare email text, and in any case it will not match your font! That is what obfuscation does. It can match your font only if you replace the gifs with images taken from that font. (Note though that you can help the font match appearance by adjusting the image size in the css file.)

    I have been amazed by how many people want to display email links as the email rather than as the recipient's name, and want to do this via the explicit html link, rather than simply placing the bare email itself. I believe and hope I have now provided this.

    I'd appreciate your reporting back prior to release of the update. Thanks.

  13. Bev
    Member
    Posted 4 years ago #

    Hi Kim,

    I tried your development version with all 3 formats:

    [EMAIL Name | a@b.com]
    
    a@b.com
    
    <a href="mailto:a@b.com">Name</a>

    They all look correct to me. I was using WordPress 2.9.1

    FWIW, I think supporting the html link version is important. People may want to add your plugin to an existing blog that already has a lot of email links coded. This way they don't have to change anything. Also, one can turn the plugin on and off without loss of functionality.

    I will mark this thread resolved once you release this version.

Topic Closed

This topic has been closed to new replies.

About this Topic