Forum Replies Created

Viewing 15 replies - 466 through 480 (of 777 total)
  • Email Before Download actually requires two other plugins — Download Monitor and Contact Form 7.

    If you followed the instructions on the Installations page ( https://wordpress.org/plugins/email-before-download/installation/ ) then you missed a whole bunch of things. Make sure you read through the text on the Description page ( https://wordpress.org/plugins/email-before-download/ ) and also the FAQ page ( https://wordpress.org/plugins/email-before-download/faq/ ) and also look at the various screenshots on the screenshot page ( https://wordpress.org/plugins/email-before-download/screenshots/ ). Without looking through all those you probably won’t be able to get things set up correctly.

    All that said, let’s make sure EBD is the right choice for what you want to do. The point of EBD is to offer a little form to people who visit your website. The form asks them for an email address (and perhaps other information). Once they provide it and hit submit then EBD can either make a link appear on the page that they can click and download a file you’ve provided. Or it can send them an email with the link (this is useful for making sure they’ve given you a good email address). Or it can do both of those things. Additionally, it has the capability to offer multiple downloads that the person can pick and choose from via clicking little checkboxes. If that meets your requirements, then read through all the stuff I said before and give it another shot on the set up. If you’re trying to do something else (like just offer a download and you don’t care about getting people’s email address) then you might want to look for something else…

    It looks like both of your screenshots show the link to the file .. maybe you pasted in the wrong one? Regardless, I think I understand what you’re saying.

    In my CF7 form settings I don’t have the checkbox for HTML checked, so I get plain text notifications. Thus, I don’t know if this is a bug or something specific to your setup.

    I think the most likely source of the problem is the message content in the CF7 form you made. Go into the CF7 form you’re using and go to the “Mail” tab and then copy everything out of the “Message Body” box and paste it in here so I can see it. You can put xxxx in place of domains and/or email addresses if you have any in there, but don’t change anything else. If you have HTML in there then when you paste it in here you want to hit the “code” button then hit enter then paste then hit enter then hit the “/code” button so that everything pastes in without getting messed up. (all the code button does is put a backtick)

    Yeah you must use [your-email] for the email field.

    FYI – You can use [your-name] if you want to ask for the person’s name in the form. That will cause whatever they type in to be stored in the database table EBD uses for that and it will show up in the CSV log file that you can download from the top of the EBD settings page.

    I have not heard of that problem before. Are you sure you are using the Download Monitor plugin and not the Download Manager plugin?

    What is your shortcode?

    Can you provide a URL to your page?

    Do the following:

      1. Make sure you are using “your-email” for the name of the email field in the CF7 form that you made.
      2. Tell me the versions of all 3 plugins that you are using (make sure you are using Download Monitor, not Download Manager)
      3. Tell me what your shortcode is
      4. In Download Monitor, if you go into the detail of the file that you uploaded, you will see a URL field in the very top right area of that page. That URL is the URL to directly access your uploaded file via Download Monitor (without using EBD at all). You should be able to put that in a browser and hit enter & get the file. If it doesn’t work, then I suggest you upload a completely new file that you have never used before. Make it a .jpg file. Give it an english-only name — no french characters, nothing with accents — and same goes for the file title in Download Monitor. Make a new test page in wordpress. Put your shortcode in there but change the download_id to be the new file. Test that. If it doesn’t work, post the URL to the new page (along with the new shortcode) and post the URL from the top right of the detail page in Download Monitor so I can see that the file does actually download.

    HTML isn’t going to work in the short description because of the way I’ve written that code. Again, that code (from up above) is:

    $chekboxesL .= '<span><input type="'.$checkbox.'" '.$checked_state_html.' name="ebd_downloads[]" value="'. $dl_id . '"/> '. $d->title . "</span>";
             $dyldesc = '';
             if (strlen($d->short_description)) {
               $dyldesc = '<div class="ckboxd">' . sanitize_text_field($d->short_description) . "</div>";
             }
             $chekboxesL .= $dyldesc;

    That sanitize_text_field is going to convert any HTML tags to the entity-equivalent. Like the less-than sign is going to become ampersand-L-T and so on. That will prevent it from displaying. So, you could remove the sanitize_text_field() and just leave the $d->short_description and that might help you do what you want, but you’ll need to make sure you don’t put anything in the short description that might mess up the HTML on your page, of course (like a < without a closing > for example).

    Alternatively, you could just modify that line of code to put the img tag after the /div tag or before the opening div or something like that. You’ll need basic code-editing knowledge to do that without breaking it. And, of course, because img tags act goofy sometimes, you might need another div to wrap the whole thing in or some css to make it line up correctly and such.

    Not really. It doesn’t have any kind of built-in support or integration for any mail list software (like mailchimp or constant contact or aweber).

    EBD has 3 different modes of operation that you can set: ‘inline’, ’email’, or ‘both’.

    In ‘inline’ and ‘both’ modes, a link to the download (or links to downloads) you’re offering appears instantly after the web surfer puts in his email address and hits Submit on the form. That means the email address has not been verified — he could type in a bogus address and get to the download.

    In the ’email’ mode, an email with the link(s) to download(s) is sent to the web surfer. In that case, you know the email address he provided is good if he clicks on the link in the email. EBD updates its own database tables when that happens, but it doesn’t call out to a mailchimp API or anything like that.

    Integration Possibilities:

    Option 1:
    If you require the email address to be verified then you could use the ’email’ mode and modify EBD so that when it updates its database tables to indicate that someone clicked on a download link in an email then it would also subscribe that email address to mailchimp using the mailchimp API (you would turn off the mailchimp confirmation email to the user in this case). Though it would probably only be a few lines of PHP, it would be a good amount of work to figure out what to do and where in EBD, get the mailchimp PHP api code installed, test it all, etc. Also, you would have to figure out how to handle someone unsubscribing from your list and what to do on the EBD side …. for example, they might unsubscribe from your list then later click the download link in the email you had previously sent them, which would cause them to be resubscribed (unless you wiped out the links out of the EBD database or set that email address to never resubscribe in mailchimp). As you can see, this option is pretty involved.

    Option 2:
    You could add email addresses to mailchimp by using the data from the EBD database. You could either directly read the data yourself (like from a program you write) or you could download the CSV log via the EBD menu and then use something to process the log and add addresses to mailchimp (again, you’d need like a script or something you’d write and run nightly or something).

    Option 3:
    If you didn’t care about verifying the email the web surfer typed into your form, then you MIGHT be able to use something like https://wordpress.org/plugins/contact-form-7-autoresponder-addon-plugin/ or https://wordpress.org/plugins/contact-form-7-mailchimp-extension/ to get email addresses automatically added to your mailchimp list when the web surfer clicks Submit on the EBD form. In this case, you would probably want to leave the double-opt-in feature turned on so that mailchimp sends a confirmation email to the email address to make sure the web surfer wants to subscribe. You’d probably want to do ‘inline’ on EBD, so the web surfer only gets 1 email (from mailchimp) to confirm his subscription — of course, he could just decline to confirm since the link(s) to download already appeared on the screen (or via email if you choose ’email’ or ‘both’).

    Option 4:
    You could use something other than EBD. For example, you could use https://wordpress.org/plugins/double-opt-in-for-download/ or maybe https://wordpress.org/plugins/email-to-download/ in order to do what you want. Both of those claim to be able to add to mailchimp if you buy their add-on extensions. I don’t know if either are any good or not…

    No it does not.

    The Email Before Download plugin has not yet been updated for compatibility with PHP 7. The latest update from a few days ago removed a minor css issue that affected the download button on some themes, but did not update for PHP 7. I do not know when M&S Consulting will release an updated version that fixes things broken by PHP 7 ( https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7 and https://github.com/php/php-src/blob/php-7.0.0RC2/UPGRADING ).

    Email Before Download requires Download Monitor and Contact Form 7 plugins. It can use the latest version of both of those plugins (I do so on several sites). The notice on the Description page that says you have to use the old, unsupported Download Monitor is not accurate anymore.

    Another possible issue you may notice has to do with the notification email that goes to you that tells you what files the user downloaded. It may string all the file titles together onto one line with vertical bars in between each one. Not a big deal, but kinda ugly and hard to read. This may not be an issue if you check the checkbox to make it send HTML notification emails (in your Contact Form 7 form) .. or it may, I’m not sure.

    Anyway, if you see a problem like this, here’s how to fix it…

    Change line 631 from:

    $mail['body'] = str_replace("[your-message]", 'The downloaded file name(s): ' . $title, $mbody);

    to:

    $mail['body'] = str_replace("[your-message]", 'The downloaded file name(s): ' . "\n" . str_replace("|","\r\n",$title), $mbody);

    Additionally, you may see a problem when a user doesn’t check any checkboxes and hits submit. If you want to prevent that from being submitted, then you need to make the change I mention at the very very bottom of this item:

    https://wordpress.org/support/topic/checkbox-non-coche-et-envoi-du-formulaire?replies=12

    (only make the change I refer to at the bottom of the item … I have some prior attempts before that which don’t work so ignore those)

    Ok, this is the page I did for a psychologist who has several files for download using checkboxes (left-side checkboxes): http://www.doctorferrara.com/forms/

    Take a look at that for reference. As you can see, it’s left-side checkbox, then the file title to the right of that. Then, underneath that is an indented description. In this case, I’m actually using the “short description” field, but it could have just as easily been the normal description field. I am using the latest Download Monitor, which has a “short description” field .. I don’t remember if that older version does, but I don’t think it matters much — pretty sure you’ll be able to do this using your existing version.

    Ok, so it turns out there’s not much to change really. I am going to give line numbers as to where you want to change things. Those line numbers are going to refer to an -unmodified- email-before-download.php (latest version), so that you can easily find what I’m talking about.

    About line 159 you should see this:

    if(!$is_new_dm){
            $dl = $wpdb->get_row( "SELECT * FROM $wp_dlm_db  WHERE id = '".esc_sql($dl_id)."';" );
            $d = new downloadable_file($dl);
          }
          else{
            $d = new stdClass;
    
            $d->title = do_shortcode('[download_data id="'.$dl_id.'" data="title"]');
    
          }

    Before the “else” is for the old Download Monitor. After the “else” is the new Download Monitor. In my case, I added one line after the $d->title line, which was:

    $d->short_description = do_shortcode('[download_data id="'.$dl_id.'" data="short_description"]');

    So that is getting the short_description for that file out of Download monitor. You can do that same thing if you’re on the new DM. If you’re on the old DM, then instead I think you should add a line after the $d = new downloadable_file($dl) line that looks like this:

    $d->short_description = $d->desc;

    I think that will get the description field for the file out of the old DM. Note that we’re still gonna stuff it into $d->short_description so that my code further down will work (since it refers to short_description).

    Ok, hopefully that makes sense. Now the next change. At about line 195 you should see this:

    $chekboxesL .= '<br /> <input type="'.$checkbox.'" '.$checked_state_html.' name="ebd_downloads[]" value="'. $dl_id . '"/> '. $d->title;

    assuming you are using left-side checkboxes like me then change that to:

    $chekboxesL .= '<span><input type="'.$checkbox.'" '.$checked_state_html.' name="ebd_downloads[]" value="'. $dl_id . '"/> '. $d->title . "</span>";
             $dyldesc = '';
             if (strlen($d->short_description)) {
               $dyldesc = '<div class="ckboxd">' . sanitize_text_field($d->short_description) . "</div>";
             }
             $chekboxesL .= $dyldesc;

    If you are not using left-side checkboxes then you’ll have to adjust the above a good bit to get things looking right I suspect. You would need to change the $checkboxes rather than the $chekboxesL variable in that case.

    I don’t think you’ll need to do this next change, but it helped me and one or two other folks (most pages or themes don’t need it I don’t think). Change line 296 from:

    $contact_form = str_replace("<ebd_left />", $chekboxesL, $contact_form);

    to:

    $contact_form = str_replace("<p><ebd_left /></p>", $chekboxesL, $contact_form);

    That’s pretty much it. Oh, I also added the following CSS to my page:

    .ckboxd {
        padding: 0 6px 9px 32px;
        margin: 0;
        font-size: 90%;
        line-height: 1.6;
    }

    ok, I’ll post again in a few hours w/info on what I did and then you can do something similar.

    I do that on one my sites (and it also uses checkboxes). I had to modify email-before-download.php in order to do it though. I am on the new Download Monitor, so there will be a slight difference there vs what you would need to do.

    Anyway, if you are comfortable editing PHP and are willing to wait until I have time to go through my code & sort of tell you what I did and where then I don’t mind doing that (should be within a day). It’ll take a bit of work, so I don’t want to do it unless it would be helpful and you are comfortable with editing PHP and ok with modifying your plugin code .. ?

    So I gather you’re going to have a bunch of pages (one per album per artist or something like that). On each of those pages you’re going to have an EBD shortcode with different download_ids and the same contact_form_id. Right?

    That should work. Though, I suggest that you make a second test page right now with a different download_id for some other download, if you haven’t already done so. Then, test both pages using the same & different email addresses and just make sure everything looks right. Download the CSV log from the top of the EBD Settings page and make sure it looks correct.

    Do you really need that don’t-add-me-a-second-time checkbox? Seems like it would be better without it and whatever your list software is removes any duplicates (or refuses to add duplicates).

    Ok, as for your actual question… I think you can use this CSS to do what you want. It relies on a CSS3 attribute wildcard selector in order to catch any divs that have an id attribute that begins with “wpm_download_”. That should allow you to add any number of pages like the one you have and it will catch them all without you having to do a bunch of hardcoded ID names with numbers on the end. Obviously it’s not going to work for browsers not supporting CSS3 attribute wildcards, but I think that’s pretty few and far between these days (old Internet Explorerers, old mobile browsers mostly I think).

    div[id^="wpm_download_"] {
        display: none !important;
    }

    Also, fyi, I noticed that your “Free Download (MP3)” link is not working if you slightly scroll the page. It looks like it is getting covered up by the lh-banner div which is 150px in height. lh-banner is 150px high because the home-menu-wrap div inside it is hardcoded to 150px in height. I think that should be 50px, not 150px. If you change it to 50px then the “Free Download (MP3)” link continue to work as you scroll the page up until right where it starts to disappear behind the top menu area. As far as I could tell, changing that to 50px didn’t have any negative effects .. the 3 item dropdown menu under Video continued to work and everything looked the same. All that said, I’m no expert on your page, so you may have good reason for making it 150px, but it kind of looks like a typo…

Viewing 15 replies - 466 through 480 (of 777 total)