Looks like the download issue is related to the access settings. At first, no role was selected in package settings, so download didn’t work as expected. Because no one has access to the package.
Later you updated the access settings to allow the User and Administrator role to have download access. But you tried to download the file without logging in. But package settings require User and Administrator role.
If you want the link work always then select Anyone in package settings.
About the next/previous links, those are coming from your theme. Download Manager uses your active theme’s single.php
template to show the package. It can control the content part but the rest is controlled by the theme. So, you have the edit the single.php
to remove those links.
You can copy the single.php
and rename it single-wpdmpro.php
If this template exists inside your theme this will get priority over single.php
The benefit of using single-wpdmpro.php
is, it will only be used by WPDM, so you can design it as you want without affecting any other parts of your site.
Please activate the “Enable Single File Download” option from the Basic settings page. Send temporary wp-admin login info in private reply if you need help with that.
1 ) It is possible to add custom fields to attached files using the wpdm_attached_file
action hook. Check the following example. It adds a version
meta with attached files.
https://www.dropbox.com/s/58xr3mhv04mfy3c/wpdm_custom_file_meta.php?dl=0
2 ) Download Period is applicable to the package not files. You have to create separate packages with files if you want to set a different period for a different set of files. When the date ends it shows a message instead of the download button. You can change the expired message by editing add-on code ( It’s simple ) but if you to customize it we can add a filter there in next release.
3 ) Advanced Access Control restricts the package access based on username. It doesn’t work on the file level.
If you create separate packages for each company it will be easier for you to overcome the limitations stated above. Although it is possible to achieve exactly what you want. But requires extensive code customization.
Hi,
Pro version is working fine there. I just downloaded a file and it showed up in the stats.
Also, check the templates area. You can use the editor to create new templates. Let me know if you can’t find any specific pro feature.
Thanks
We will add the following patch in next version to fix this issue. Replace
$vars['free_download_btn'] = self::free_download_button($vars['ID'], $vars['link_label']);
with
$vars['free_download_btn'] = self::free_download_button($vars['ID'], apply_filters("free_files_link_label", __( "Download free sample" , "wpdm-premium-packages" )));
in wpdm-premium-packages.php
file on line 1114.
And then you can utilize the free_files_link_label
filter to modify the label as shown in the following example.
function wpdm_free_files_link_label(){ return 'Download Free Files'; } add_filter('free_files_link_label', 'wpdm_free_files_link_label');
WPDM Login form will be shown automatically in some pages like Dashboard, Frontend Upload when user visit those pages as a guest. But you can delete any custom WPDM login page if you have created one.
You can search the forum here https://www.wpdownloadmanager.com/support/
Please send temporary wp-admin login info in private reply to check the issue. Maybe you are logged in as editor role. You can try logging in as an Administrator in that case.
I have created a custom template tag [file_list_play_only]
to show only play button.
Copy the code from here https://www.dropbox.com/s/5hk4xca0x80lcmi/file_list_play_only.php?dl=0 and add it to your theme’s functions.php
file.
And then use the [file_list_play_only]
tag on your custom link/page template.
Btw, remove the previous code to allow the download button in normal file list tag.
In my case, I was redirected to the homepage. There was no blank page. Please send temporary wp-admin login info in private reply if you think the issue still exists.
This issue is originated from the character encoding of your database. The site name is actually saved in that format. Now there are two options available to you,
1 ) Find the blogname
in your wp_options
table and replace encoded characters with actual character.
2 ) Wrap all get_bloginfo('name')
function of Download Manager with htmlspecialchars_decode
function,
htmlspecialchars_decode( get_bloginfo('name') )
Option 1 is is quicker and better.
It is not related to the add-on. Maybe an FB API issue. We are checking this and will release a patch soon.
You are right. It is restricted for the subscribers.
Minor code update is required to add the support for all roles set on Frontend Uploader Access. Replace the first 2 lines of wpdm_cal_suggest_members
function in wpdm-custom-access-level.php
file with the following code,
global $wpdb, $blog_id, $current_user; $currentAccess = maybe_unserialize(get_option('__wpdm_front_end_access', array())); if (!array_intersect($currentAccess, $current_user->roles) && is_user_logged_in()) return;
Please send me the link to check.
The issue is originated from the multiple instances of /download-manager-files/
directory in a multisite setup. In older versions maybe before 2016 WPDM used a single /download-manager-files/
directory in a multisite setup to store files. And it was located in base /uploads/download-manager-files/
location.
But later we moved to separate directory option for each subsite. Now for each subsite, there is a /download-manager-files/
directory which is located in /uploads/sites/site_id/download-manager-files/
This makes file management easier.
So, some of your subsite files are still stored in the old central location. These are files you uploaded when we used the central file storage. But your new files are being stored in /uploads/sites/site_id/download-manager-files/
This mixup created the issue you are facing now.
The solution is,
1 ) Copy all required files from central dir /uploads/download-manager-files/
to appropriate subsite dir. For example, all files of subsite 37
should be stored in /uploads/sites/37/download-manager-files/
2 ) If still face any issue with the download operation just update the package without making any change. This will remove any corrupted metadata. ( This is a rare case, most packages will work without this step )
I have fixed this package https://worship.welsrc.net/download-worship/wtl-practical-ideas-worship/ by copying all of its files from /uploads/download-manager-files/
to /uploads/sites/37/download-manager-files/
and then updated the package without making any change. The site id of “Worship the Lord” site is 37.
You don’t have to move files on a package basis. Just bulk move all related file on a single operation.
I know this is a lot of unexpected work but it is the only way to solve this without making any code customization.
Best regards.
Works fine on my setup http://prntscr.com/oyckbo
Please check if there is any JS error on the console or send temporary wp-admin login info in private reply if you want me to take a look there.
It depends on the context. The info is saved in billing data which users can change any time. You can use the following code to get billing info,
$order_obj = new \WPDMPP\Libs\Order(); $order = $order_obj->getOrder($order_id); $billing = unserialize($order->billing_info); $customer_name = $billing['first_name'].' '.$billing['last_name'];
But when the user is logged in we use just $user->display_name;
to get customer name. This applicable on admin orders, order details page and other similar scenarios.
1 & 2 ) You can upload and manage files from frontend using the frontend uploader ( https://www.wpdownloadmanager.com/doc/short-codes/wpdm_frontend-front-end-uploader-ui/ ) of Download Manager. But there is no option to control the category as you described. The category permission I mentioned was about the download access.
Our File Hosting and Sharing add-on which does this in a different way. In this case, each user has a main category under which they can create as many categories as they want. They can manage and see only their own categories. To make things easier we represent each category as a folder in this add-on. Please check the demo to get a clear understanding.
3 ) You can just click on a specific category in all packages or categories page to filer all packages in the admin area. You can also implement the solution of this ticket https://www.wpdownloadmanager.com/support/topic/suggested-ui-improvement/ to add a category dropdown.
There are many ways to sort packages by category in frontend. The best approach is using the Directory Add-on https://www.wpdownloadmanager.com/support/topic/suggested-ui-improvement/
For now, you can modify the template /checkout-cart/checkout-name-email.php
to change the placeholder to something like “Enter Full Name” to make it easier for users.
I thought you were showing the downloads of specific tags. This shortcode will list all post tags. There is no way to exclude a tag because default tags are used by both normal posts and packages. You have to use a custom taxonomy if you a totally different tag system for packages.
Here is the updated function to skip stats for predefined roles. Set your roles in $skip_stats_user_roles
array. Use the role id not the name as array values.
function wpdm_new_stat($pid, $uid, $oid){ global $current_user; $skip_stats_user_roles = array( 'administrator', 'editor' ); $intersect = array_intersect( $skip_stats_user_roles, $current_user->roles ); $ip = $_SERVER['REMOTE_ADDR']; $exception_list = array( '127.0.0.1', '::1' ); if( in_array( $ip, $exception_list ) || count($intersect) > 0 ) \WPDM\Session::set('downloaded_'.$pid, $ip); }
Hi,
Please install the latest version to fix the issue. Follow these steps to update the plugin,
1 ) Deactivate and delete the old version. You won’t lose any data.
2) Download latest version from here https://www.wpdownloadmanager.com/user-dashboard/?udb_page=purchases
3 ) Install the latest version and activate the license key.
Thanks.
There is no filter yet there to modify New and Top downloads widget query. But you can add tax query parameters on those new WP_Query
to exclude packages from certain terms. For example, this is how it should be done in new packages widget /download-manager/widgets/class.NewDownloads.php
,
$tax_query = array( 'relation' ► 'OR', array( 'taxonomy' ► 'wpdmcategory', 'field' ► 'slug', 'terms' ► array('free'), 'operator' ► 'NOT IN' ) ); $newp = new WP_Query(array('post_type'►'wpdmpro','posts_per_page'►$nop, 'orderby'►'date','order'►'desc', 'tax_query' ► $tax_query ) );
Advanced Access Control add-on has the user based pacakge restriction feature. Please check details here https://www.wpdownloadmanager.com/download/advanced-access-control/ and let me know if you have any question.