Hi,
some time ago we bought a download manager pro license. When we bought it, we put the URL of the testing website (afemefa.XXXX.XXXXX.com), and now I realize that it was not changed when we published the website and it did not allow me to add the key to the real domain: afemefa.com. Could you change it?
Thank you
WPDM doesn’t have any built-in template tag to show gifs. But it is possible to implement a custom tag using the wdm_before_fetch_template hook. Add the following code to your theme’s functions.php file and use the [gif] tag in your custom page/link template to show the gif.
function wpdm_gif_tag( $vars ){
foreach ($vars['files'] as $file ):
$filetype = wp_check_filetype( $file );
if( $filetype['ext'] != 'gif' ) continue;
if( ! file_exists( WPDM_CACHE_DIR.$file ) )
copy( UPLOAD_DIR.$file, WPDM_CACHE_DIR.$file );
$vars['gif'] = '
';
endforeach;
return $vars;
}
add_filter( 'wdm_before_fetch_template', 'wpdm_gif_tag', 10, 1 );
Maybe some if your package icons are pointing to the wrong URL. All icons are located in /download-manager/assets/file-type-icons/ directory. You can fix this by updating the package. If there are too many packages with wrong icons URL then you can add the following custom code to bulk change the URL. Add this code in your theme’s functions.php file.
function update_icon_url(){
$params = array( "post_status" ► "publish", "post_type"►"wpdmpro","posts_per_page"► -1 );
$q = new WP_Query($params);
while ( $q->have_posts() ) {
$q->the_post();
$icon_url = get_post_meta(get_the_ID(),'__wpdm_icon', true);
$icon_url_fix = str_replace('file-type-icons','assets/file-type-icons',$icon_url);
update_post_meta(get_the_ID(),'__wpdm_icon', $icon_url_fix);
}
}
add_action('init','update_icon_url');
Visiting any page after adding this code will run it and fix all URLs. So remove the code after that.
Hello! I need to changed my linked URL again to my new staging domain. Can you add control over this in future versions?
I’ll post the URL privately. Thank you!
I am sorry to be reaching out again, but as I was trying to get this project finished up, I just encountered something taht stopped me in my tracks. For the bulk of the uploads, I did a large import, and all appeared to work properly. I was able to see and search for files and file contents, something that was the requirement of the project. But, after doing some manual package additions, we were going back through, making sure that everything was good, only to realize that somewhere in the large import, the files stopped working. This got me really, really worried about the extent of what works and what does not. Below is a link to an accordion that the packages download a file-not-found.txt file, rather than the correct package. After doing further checking, I am finding that the bulk of the files are not there.
http://ocahs2.spireworks.pro/policies-procedures/#toggle-id-9
I tried to find a way to export a package list, hoping to find urls of the source files, but I cannot get that to work. It gives me an error:
Download ID not found or expired
I have the deploy this site in a week and am now scared that I am going to have to somehow start over on all of the wpdm-based functionality. I have never been so frustrated or unsure of what to do next.
Can you provide and guidance or suggestion? You should still have full access to the website from the WP side and ftp. If you need something else, please let me know.
-jason
This reply has been marked as private.
Recent Orders Panel: We will fix this in next release. The panel should show only orders of the current author/seller.
Tax: Current version doesn’t have the “Display taxes on cart page” option. We will adjust the documentation soon.
Code Error: Your package doesn’t have any file attached to it. The error is generated from there. Adding a file to the package will fix the error.
Guest Order: You can enable the “Billing Address” for guest checkout. It will collect all billing info including phone, country.
Error in login/signup form: The easiest solution is adding a logo parameter in your shortcode. The value is the logo URL. If you don’t want to add logo then try adding the following code before line 19 in wpdm-reg-form.php,
if( ! is_array( $params ) ) $params = array();
This reply has been marked as private.
Yes, it is possible using the Form Lock add-on. You have to add the URL to the pacakge using the URL tab in Attach File meta box.
This reply has been marked as private.
Looks like you have already added the download links there. For anyone else looking to implement the same thing, you can generate the download link from Downloads All Packages page. There is a generate download URL button under each package title.
Also want to add that if I disable WPDM as a plugin, then the cache test works:
$ curl -I https://revocent.com
HTTP/2 200
date: Fri, 15 Mar 2019 20:59:20 GMT
content-type: text/html; charset=UTF-8
content-length: 74200
server: Apache
x-pingback: https://revocent.com/xmlrpc.php
link: <https://revocent.com/wp-json/>; rel=”https://api.w.org/”, <https://wp.me/P7uo5D-7Z>; rel=shortlink
x-cacheable: YES:Forced
accept-ranges: bytes
x-varnish: 1300611924
age: 0
So it’s definitely something that WPDM is doing.
Not all answers solve my questions, I will number the questions, make it easier?
(Tried the ol list but no numbers?)
1 File Cart shortcode [wpdm_file_cart]
► This will show the whole Cart, what I want is the tabs/buttons that will take you to the File Cart to be in the header, instead of floating on the right side. So it would be great if there was a shortcode to solve this.
2 Not clear which name you want to change. Could you please send a screenshot pointing the location?
► Here I mean the same tab/button that send you to the cart. Right now it says: “Regiobranding downloads”. I would like there just Downloads or just a icon. The text is not wrapped in a span or something so to work it with CSS is also difficult. See https://www.iqheadquarter.nl/regiobranding/regiobranding-categorie/kaart/ for what I mean, right side the big tabs.
3 Possible but requires lots of customization to show cart on the pop-up.
► Maybe it is easier to open in Lightbox? Is that possible?
4 Please translate the text from /wpdm-file-cart.php file. Currently, the add-on doesn’t have the language file.
► Does this mean I have to do this again every time when the Add on had an update?
5 My question: I combine File Cart with Form Lock and I have made a form with Contact Form 7. This is working but: First you have to fill in the form, click on send button and then the download button appears. I would like the send button of the form to start the download immediately so you won’t have to click another button. Is this possible?
Your answer: Not possible right now. But noted for implementation.
► My client doesn’t like that. Is it maybe possible with Gravity forms or will I have also 2 buttons?
6 My question: Also I would expect the File cart to be empty after downloading, but it isn’t?
Your answer: Add the following code at line 123 in /wpdm-file-cart/tpls/file-cart-html.php to empty the cart after download.
localStorage.removeItem(‘file_cart_data’);
► This works only partially, cart is not empty until you go to another page. Apparently something has to refresh as well. Do you have a solution for that?
The url for all this https://www.iqheadquarter.nl/regiobranding/regiobranding-categorie/kaart/
Thanks again and hopefully you can help.
Regards Ariane
The thing is package details page or link template won’t show this download link to the non-members. I guess you are using this URL in a customized way.
There is still a way to redirect the user using the wpdm_download_permission_denied hook. Add the following code to your theme’s function.php file to redirect the user to the login page ( replace the your_login_url with proper url ),
add_action('wpdm_download_permission_denied', 'wpdm_permission_denied_login_redirect');
function wpdm_permission_denied_login_redirect($id){
if( !is_user_logged_in() ):
wp_redirect( "your_login_url" );
exit();
endif;
}
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
This reply has been marked as private.
The user can change their avatar from frontend uploader page. Currently, This is allowed for users that have access to the frontend uploader page [wpdm_frontend flaturl=0]
Another option is using a Gravatar account ( http://en.gravatar.com/ ). Using Gravatar anyone can change the avatar associated with their email address.
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!
Add the following code to your theme’s functions.php file. Replace the redirect_url with your download page URL. And set the login page from Settings Frontend Login Page. The redirect will trigger when the user uses the WPDM login page to login to the site.
add_action( 'template_redirect', 'wpdm_login_redirect' );
function wpdm_login_redirect(){
if( is_user_logged_in() && get_the_ID() == get_option('__wpdm_login_url') ):
wp_redirect( "redirect_url" );
exit();
endif;
}
Thanks.
Download Manager has the option to replace the download button with the login page link when a user is not logged in. You can customize this login button from Settings Basic Messages Login Required Message: option. Are you trying to do that?
Or just want to redirect all guest users to the login page from any page in general? Add the following code to your theme’s functions.php file if this is the case. Before adding the code create the login page with WPDM login shortcode [wpdm_login_form logo="your_logo_url"] and set this page as Login Page in Settings Frontend Login Page option.
add_action( 'template_redirect', 'wpdm_login_redirect' );
function wpdm_login_redirect(){
if( ! is_user_logged_in() && get_the_ID() != get_option('__wpdm_login_url') ):
wp_redirect( get_permalink( get_option('__wpdm_login_url') ) );
exit();
endif;
}
This reply has been marked as private.
Hi,
Here are the answers to your queries:
1. If files are added as URL ( from local server or remote file ), zip download will not work, as php can’t create zip file from urls.
2. No such option for now, but noted for implementation.
3. You can do that by editing that link/page template. Doc: https://www.wpdownloadmanager.com/doc/templates/
Please give me temporary wp-admin login info in a private reply if you want me to check those in details.
Now, your forum posting should work fine, but if you face issue again in forum, please mail to support@wpdownloadmanager.com
Sorry, the option is actually “Login Required Message:” Actually, It was there before but your theme is hiding the .panel class, that’s why the login button was hidden. I have removed the div with .panel class and updated the “Login Required Message:” option. Now the login button is visible.
Currently login button is linked to the default WP login page. If you want you can create a page with [wpdm_login_form logo="your_logo_url"] shortcode to use the WPDM login form. Then set that page as login page in Settings Frontend Access Login Page option.
You can use the Default Values Add-on ( https://www.wpdownloadmanager.com/download/wpdm-default-values/ ) to bulk update link template for all packages. The link template option in your first screenshot is meant for a different purpose.
another things….
the link i added is correct but i can see it ..i receive also the access denied in the txt file
<i class=”fa fa-lock”></i> Login
..the button in firefox browser disappear…i see it only on chrome browser
Add the following code ( visit the link to copy the code ) at the bottom active theme’s functions.php file. This code should hide “Upload” and “URL” tab and activate the “Browse” tab.
https://codeshare.io/aY4j1N