• The plugin is working for both inline links and email delivery of the links. The files are listed correctly, and are linked correctly to the files. However, if multiple files are chosen, I am getting some sort of formatting error in the email where it is adding extra characters (“>[file_name] ) after the links, both single and multiple download.

    The resulting email looks similar to this:

    Approved Document 1 (1998 Edition)
    Approved Document 2 (2006 Edition)
    ">[file_name]

    My Send Email for multiple files in the EBD control panel looks like this:

    <p>Hello [requesting_name], <p>
    <p>Please find below the link to the documents that you requested.</p>
    <p><a href="[file_urls]">[file_name]</a></p>
    
    <p>best regards,</p>

    It look as if they are extra closing tags, but I cannot determine where they are generated. Any help would be greatly appreciated.

    The site: https://bit.ly/1EopCeU

    https://www.ads-software.com/plugins/email-before-download/

Viewing 1 replies (of 1 total)
  • In an unmodified email-before-download.php at line 656 you will see a str_replace call where it replaces [file_urls] with the content of the variable: $innerHtml

    The way you’re trying to use [file_urls] is almost right, but not quite. That $innerHtml variable is a string that gets built up with HTML to display the filenames that the user selected (that he checked the checkboxes for). Each filename is already an HTML link and it uses double-quotes in it, which is why it’s breaking when you try to put the whole string in an href that is using double quotes.

    You just need to change your template so that [file_urls] is on a line by itself and get rid of [file_name]. So, basically just replace the entire line that you currently have with just [file_urls]. That should work.

    fyi – you can’t modify the layout of the links & names produced with the [file_urls] tag, unless you modify the php or use javascript, but it’s gonna look basically you were doing anyway so you should be good i think.

Viewing 1 replies (of 1 total)
  • The topic ‘Email delivery link formatting’ is closed to new replies.