Hello guys,
Right now, I’m using this code to generate my download button:
$data['download_link'] = \WPDM\Package::downloadLink($data['ID'], 0, array(
'template_type' ► 'link'
));
It generates this kind of HTML:
<a class="wpdm-download-link btn btn-primary " rel="nofollow" href="#" onclick="location.href='https://mysite.com/?wpdmdl=5286&refresh=5c6d13a29aef41550652322';return false;"><span>Download</span></a>
In the <a>
tag, I would like to add a data-url attribute that will contain the href to the file. How can I do that? How can I get only the url, not the full <a>
tag ?
In fact, I need that because I want to create a “Download selected files” button, that will launch multiple downloads at once, depending on selected packages. (not all-in-one ZIP, but trigger each download separately). How would you do that?
Thank you in advance,
Cedric
Could you please check the PHP error log or send me the log file. It should indicate where the issue is. Downloads are actually logged as I see the count is increasing.
This reply has been marked as private.
So, You are using the default category archive template provided by your theme to display downloads. If you want to modify the ordering in this case, you have to customize the category archive template of your theme.
But Download Manager has a category shortcode to show packages from a category in a better and customizable way. Here is a demo of category shortcode https://demo.wpdownloadmanager.com/wpdmpro/category-short-code/
Shortcode documentation https://www.wpdownloadmanager.com/doc/short-codes/wpdm_category-query-all-downloads-from-one-or-more-categories/
You can keep using your theme archive but category shortcode gives you more control over the view and ordering etc without code customization.
You can’t yet import the exported CSV to transfer your downloads. Because some column names don’t match the import file structure and some values are still exported in a serialized state. We are working on making this more useful. Currently, you have to change the column names and remove some CSV columns to make the exported CSV import ready.
For now, your best option is using the WordPress default exporter/importer to transfer the downloads. That works fine when you are transferring all your downloads.
We have just migrated multiple WordPress sites which use the Download Manager plugin to a new server with php 7.1.26 installed (the old server used 5.3). Ever since, the download buttons on WPDM package pages do not work – they do change the url of the window, but nothing downloads. However, if you remove the “WPDM Package URL Base” and the package name from the URL in the address bar, you not only get the download, but also the BEHAVIOUR configured in Download Manager settings (eg. if it is configured to try and open the file in browser, it does so, otherwise it simply downloads).
Can you please advise why this has happened, and is there a simple config change we can make to correct it?
Thanks in advance
Hi,
I have installed the Form Lock addon on your site. Using this add-on you can lock a package behind a form. Just enable the Form Lock and select the form when creating or editing the package. Please check the screenshot below.
https://www.evernote.com/l/AUfK_nc67SNO3KTvrpw1EnzF-Fsoot4AhNEB/image.png
After submitting the form you will get an email with download link. The email looks like the following screenshot.
https://www.evernote.com/l/AUelXA6ZXU1EZLWNyrDCiQ7B_xE6rMRcmIUB/image.png
The email template is customizable from Downloads Templates Email Templates page.
Let me know if you have any further query.
Thanks.
Hi Shahriar,
I have made some progress on this.
Summary
The site runs “Download Manager” 4.7.3 with FacetWP 3.3.1. The site has more than 140 downloads. The “downloads” archive page display well all my downloads.
After updating “Download Manager” 4.7.3 to 4.9.2, I have a big issue : the “downloads” archive page displays nothing under the header, where the downloads should appear (no footer neither). I opened my PHP file to manually limit the number of downloads in the query to 90. Than everything was working fine again. If I change that number to 100, the issue is back.
So I guess that the way things are done in 4.9.2 are more ressources “greedy” ? What server configurations do you recommend ? Do you know what can cause that between 4.7.3 and 4.9.2 ?
Thank you in advance !
There is JS error in console. Please send temporary admin login info in private reply. The issue may be related to the error. Although the publish date works fine in my setup. Did you customize the all downloads table template? There is no built-in support for “download_link_blank”.
All new uploads to my site have recently encountered this error:
<b>Notice</b>: A non well formed numeric value encountered in <b>/public_html/people/wp-content/plugins/download-manager/libs/class.DownloadStats.php</b> on line <b>35</b><br />
Line 35 of the mentioned file:
$udl[“”.$index] = isset( $udl[“”.$index] ) && is_int( $udl[“”.$index] ) ? $udl[“”.$index] + 1 : 1;
This has meant that all PDF previews do not work. I can still download the document, .docx previews do not work either.
The attached screenshot is what the preview is rendering the PDF as with the error at the top.
line 35 mentioned above was double checked with a previous post to ensure it was the same as required. I updated the plugin as well to see if that would fix it and it has not.
Need some help with this asap. Thanks.
Trying again with smaller file size. Both files have been downloaded and are showing zero downloads
Yes, you can show the publish date and expert in all packages table. Please check the shortcode documentation here for more details https://www.wpdownloadmanager.com/doc/short-codes/wpdm_all_packages-list-all-downloads-in-tabular-format-in-a-page/
Hi,
You can use shortcode parameters to customize the look. Shortcode doc https://www.wpdownloadmanager.com/doc/short-codes/wpdm_all_packages-list-all-downloads-in-tabular-format-in-a-page/
You can also use a custom template for /download-manager/tpls/wpdm-all-downloads.php
file to customize the all downloads table. Please check the template doc here https://www.wpdownloadmanager.com/doc/template-files/
Let me know if you have any further query.
Thanks.
I recently renewed my license and upgraded to DM Pro 4.9.2. How do I customize the look/feel of the all downloads page so that it doesn’t look like it does now?
Hi there,
Question for this evening, i am using Download manager since many many years and i’m completely satisfied.
Using the 4.1.3 since i installed it with another plugin to order download by alphabetical order, i decided to update it with the lastest version of WPDM.
Badly, i had to postpone the update due to some graphic changes/issues with my template that was not supported anymore with the lastest wordpress.
during the time i need to investigate to modify WPDM template to fit my old wordpress template, is there a way to order download by name? i saw few times on google some short code or other things, but there is actually no short code to input. I add a category, add downloads to it, and i add the link of the category on my menu. thats it (unless i missed something)
Which file should i modify for ALWAYS having all my downloads, from any category to be orderded by alphabetical order?
My goal is to remove the other plugin that was re-ordering downloads on top of WPDM.
Thanks!
actually using : “Alphabetic Pagination” plugin otherwise it’s always by date
A little question – just in case I have missed something!
So far if I have a download that I want to add, I do it manually: “New Download”, then give it a title, select the proper file for downloading, then select a category, then I go down and specify lock options (with some terms and conditions text to be accepted) and a custom icon.
But now I have just a few “types” of downloads, and I more or less have to copy over these data from one download to the next, and just change the title and the file name.
It would now be handy if I could just do one of the following:
– either “copy” a complete downlad definition with a new title, then “edit” and change the few things that are different
– or have some kind of “download template” that already includes all these things and from which I choose if I define a new download
Is this already there and I am only too stupid to find it? Or would it be part of another extension? Or is it just a “nice to have” that does not exist yet?
Regards,
Cornelis
The “Register now” page link is coming from the Custom Link Template. Your plain download links have to be replaced by WPDM Shortcodes. Otherwise, you can’t add the “Register Now” link.
https://www.evernote.com/l/AUcSe2kZuM5K9JWEoFR8dn7M2zqy6k9AnScB/image.png
Actually, as you have to replace all the links, Default Values add-on won’t be much help. This add-on can bulk update any package settings. So, I thought using this you could change the link template of all packages in a single click. But changing the link template in pacakge settings doesn’t have any effect on your plain links. It would have been a great solution if you used shortcodes to show downloads.
Latest WPDM is using the latest Font Awesome, so the issue may be arisen from there. However, I have to check your installation to be certain about the origin.
Create a new support ticket to discuss this issue further. And send me the shortcode you are using there. Maybe you are using the wrong parameters. For example the following shortcode will display downloads in 3 columns,
[wpdm-archive cat_view="compact" button_style="inverse" link_template="link-template-calltoaction1" order_by="post_title" order="asc" items_per_page="9" cols=3]
Hi There;
I have several items I need help with, probably easy for you pros, but i’m unable to figure them out:
1) Users downloading from their cart get a 15 byte zip file regardless of the number of items in the cart. if they download individually or a complete package it works fine
2) I need to be able to display the file size and / or the file title in the cart vs. the file name – can this be done and if so how?
3) I need to modify the template i created for the package list to do the following:
a) the package title needs to be underlined in red to match the rest of the titles on the site
b) i need to remove the “related downloads” links at the bottom of the pages
thank you!
Bob
PS: I’ve been trying to post this for a couple of weeks, in firefox, if this works, it’s in safari… I wonder why?
Hello Shariar,
downloads never stopped working. I changed them to display the links to the files inline, after submitting the form . But what we really need is to get those links sent via email to the people that submit the form, which is how it was working before the main plugin update to its latest version.
Can you please check this again? I was out for a couple weeks on vacation, but I have to solve this issue this week.
Eventually, if you can confirm this will work with the paid version of the main plugin, we can purchase it, but I would prefer not to spend time on testing if it won’t work as expected.
Let me know, please. Thanks.
This reply has been marked as private.
Dear support
we moved WPDM to current version. Layout of templates were broken, so we deceided to change them…..At least we have a few problems left:
1. Pagination layout on mobile is weird… On some mobile devises pagination is loosing layout –> numbers not in one row, in two rows added… Is there a way to fix that problem? Maybe a option to change to forward / back function on mobile instead of pagination
2. if a second page is loaded through pagination, page does not jump to the start of the download overview. It stays at the end of the page. Normally it should jump to the beginning of the overview.
3. if we use “default” olayout for archive page –> how can we change categories to be
a. full width above the downloads
b. or above the downloads in two rows 50/ 50
4. if we use these layouts are used the page “jumps” always. does not reload smooth. Any way to change?
Thanks for your support Marc
Hi together,
i’ve a small issue with my download speed. For example:
– 5.75GB File download via http link (or added via http link in the download package) in 20 min
– Same file added via file manager loads in much longer time than 1 hour.
I testet also the download speed module with no entry (leave the field empty) or adding speed parameters like this: 100000000
The only option to get it fast again when a file was added via file explorer at the download package is: resumable downloads
When i deactivate it… its fast again. But then the webbrowser can’t calculate the time is left to get the download finished.
Has anyone an idea to get it better work?
Best regards
Christoph
I have installed the Pro version of Download Manager on your site, you’re using the free version before. Use the package shortcode to show the downloads. You were using the direct download link. Use this [wpdm_package id='10451' template="5c548c4de15c6"]
insted of Curva sofa -3D Files - Download
I also created a custom link template 5c548c4de15c6
to show only title and download button just like your old style. Now you have to add the following message in your “Permission Denied Message for Packages:” settings and save settings.
<a href="https://www.tosconova.com/nuovo/wp-login.php?redirect_to=[this_url]" class="btn btn-danger btn-sm"><i class="fa fa-lock"></i> Login</a>
Side Note: Add the following code in your site .htaccess
file to allow the AJAX saving of WPDM settings. Curenntly your server isn’t allowing the saving operation, that’s why I can’t add the “Permission Denied Message for Packages:”
<IfModule mod_security.c>
SecFilterRemove 001868
</IfModule>
Hi,
You need the Advanced Access Control ( https://www.wpdownloadmanager.com/download/advanced-access-control/ ) add-on to assign a pacakge/download to a single user. When creating the pacakge, an admin will select the user(s). Only those user(s) are allowed to access the download. Keep the ‘Allow Access’ filed empty because that allows access to the role.
https://www.evernote.com/l/AUelpbaq5JJMMoCxKCS4V63rTuPK-DJCpckB/image.png
Create a page with this shortcode [wpdm_my_downloads]
When a user visits this page they will be asked to log in. After login, the user will see downloads assigned to them. One can’t see downloads of other users.
When creating the pacakge you directly upload files to it. Or just link a directory/folder to the package. If you want to create a separate folder for each user and later upload files to the folder that works too. Just attach the user folder when creating the package and later upload files to that folder using FTP or any other means. You can also attach files various cloud storages using our add-ons https://www.wpdownloadmanager.com/downloads/cloud-storage/
Let me know if you have any other query.
Thanks.