wlm2015

Forum Replies Created

Viewing 25 posts - 1 through 25 (of 31 total)
Aug 12, 2021 at 10:37 pm
#159722
Member
wlm2015
OP

I can’t believe there is no support for this bug yet!

Mar 4, 2018 at 9:49 pm
#70920
Member
wlm2015
OP

Hey everyone – just a heads up, I have a work around for this bug. In your template (for example: /wp-content/themes/yourtheme/download-manager/page-templates/product.php)
Edit your code by adding “download” as described here.
<a class="btn" href="[download_url]" download>DOWNLOAD FILE <i class="fa fa-download" ></i></a>

Mar 4, 2018 at 8:50 pm
#70919
Member
wlm2015
OP

Can you please fix your demo so that when you click on this button

it doesn’t “open” but instead it “downloads”, and then tell us all how you fixed it? Is there a mime-type line of php we need to add?

Mar 3, 2018 at 10:02 pm
#70883
Member
wlm2015
OP

No.
The “Open in Browser” box not checked. It never has been checked.
PLEASE NOTE: Your demo has the same bug: https://demo.wpdownloadmanager.com/wpdmpro/download/appshop/

Jan 18, 2018 at 7:35 pm
#68188
Member
wlm2015
OP

oh wow. :/

Jan 18, 2018 at 7:35 pm
#68187
Member
wlm2015
OP

I’ve contacted customizations and it was no help.
My code is:

function bhc_create_package($package_data){

        if(isset($package_data['post_type']))
            unset($package_data['post_type']);

        $package_data_core = array(
            'post_title'           ► '',
            'post_content'           ► '',
            'post_excerpt'          ► '',
            'post_status'           ► 'publish',
            'post_type'             ► 'wpdmpro',
            'post_author'           ► get_current_user_id(),
            'ping_status'           ► get_option('default_ping_status'),
            'post_parent'           ► 0,
            'menu_order'            ► 0,
            'to_ping'               ►  '',
            'pinged'                ► '',
            'post_password'         ► '',
            'guid'                  ► '',
            'post_content_filtered' ► '',
            'import_id'             ► 0
        );

        $package_data_meta = array(
            'files'           ► array(),
            'fileinfo'           ► array(),
            'package_dir'           ► '',
            'link_label'          ► __('Download','wpdmpro'),
            'download_count'           ► 0,
            'view_count'             ► 0,
            'version'           ► '1.0.0',
            'stock'           ► 0,
            'package_size'           ► 0,
            'package_size_b'           ► 0,
            'access'            ► 0,
            'individual_file_download'               ►  -1,
            'cache_zip'               ►  -1,
            'template'                ► 'product.php',
            'page_template'         ► '5a5bcb3d9a457',
            'password_lock'                  ► '0',
            'facebook_lock'                  ► '0',
            'gplusone_lock'                  ► '0',
            'linkedin_lock'                  ► '0',
            'tweet_lock'                  ► '0',
            'email_lock'                  ► '0',
            'icon' ► '',
            'import_id'             ► 0
        );

        foreach($package_data_core as $key ► &$value){
            $value = isset($package_data[$key])?$package_data[$key]:$package_data_core[$key];
        }

        if(!isset($package_data['ID']))
            $post_id = wp_insert_post($package_data_core);
        else {
            $post_id = $package_data['ID'];
            $package_data_core['ID'] = $post_id;
            wp_update_post($package_data_core);
        }

        foreach($package_data_meta as $key ► $value){
            $value = isset($package_data[$key])?$package_data[$key]:$package_data_meta[$key];
            update_post_meta($post_id, '__wpdm_'.$key, $value);
        }

        if(isset($package_data['cats']))
            wp_set_post_terms( $post_id, $package_data['cats'], 'wpdmcategory' );

        return $post_id;
    }

add_action('save_post_attachment', 'bhc_create_package', 10, 1);
Jan 18, 2018 at 7:11 pm
#68185
Member
wlm2015
OP

thank you that is helpful

Jan 18, 2018 at 5:12 pm
#68177
Member
wlm2015
OP

Nevermind – I found where this is controlled:
\wp-content\plugins\download-manager\assets\css\admin-styles.css
\wp-content\plugins\download-manager\admin\tpls\metaboxes\attach-file.php

Jan 18, 2018 at 4:49 pm
#68176
Member
wlm2015
OP

Thank you!! That got me 90% of the way there!

I want do also hide the Download Availability Period and make the URL tab be default in the Attach File meta box.

Jan 18, 2018 at 1:06 am
#68135
Member
wlm2015
OP

Doesn’t work. I have an image attached to the package and when I saved it – there was no featured image added.

add_filter(‘save_post’, ‘set_featured_image_from_attachment’);
function set_featured_image_from_attachment($content) {
global $post;
if (has_post_thumbnail()) {
// display the featured image
$content = the_post_thumbnail() . $content;
} else {
// get & set the featured image
$attachments = get_children(array(
‘post_parent’ ► $post->ID,
‘post_status’ ► ‘inherit’,
‘post_type’ ► ‘attachment’,
‘post_mime_type’ ► ‘image’,
‘order’ ► ‘ASC’,
‘orderby’ ► ‘menu_order’
));
if ($attachments) {
foreach ($attachments as $attachment) {
set_post_thumbnail($post->ID, $attachment->ID);
break;
}
// display the featured image
$content = the_post_thumbnail() . $content;
}
}
return $content;
}

Jan 18, 2018 at 12:45 am
#68134
Member
wlm2015
OP

Not sure why you guys refuse to help!?

Jan 17, 2018 at 9:17 pm
#68130
Member
wlm2015
OP

Yes but there is no documentation on how to use it. Please help?
What is the code I would need to enter?

Jan 17, 2018 at 7:43 am
#68096
Member
wlm2015
OP

What is the exact PHP code I could enter to create a new package?

Jan 17, 2018 at 7:42 am
#68095
Member
wlm2015
OP

I want the Featured image to automatically be set to be the same as the attachment.
What is the exact PHP code I would need to add?

Jan 17, 2018 at 12:33 am
#68087
Member
wlm2015
OP

What php echo code would produce a list of package

    categories

?

Jan 12, 2018 at 11:39 pm
#67947
Member
wlm2015
OP

I already fixed it and you already have it..

Jan 12, 2018 at 11:37 pm
#67946
Member
wlm2015
OP

Unfortunately it doesn’t work and the search is still broken. Any ideas on how to fix it so that it would work in the way a user would expect?

Jan 12, 2018 at 11:26 pm
#67945
Member
wlm2015
OP

I am really in need of some help here.
I sent an email to customizations days ago but there was no reply.
I’m ready to abort using this plugin…

Jan 12, 2018 at 7:15 pm
#67936
Member
wlm2015
OP

Thank you. I tried Search Everything and many other similar plugins but they did not “find” any of the packages. I’ll check the other resource you mentioned.

Jan 12, 2018 at 5:51 pm
#67919
Member
wlm2015
OP

That’s not PHP, that is using the template tags which do not work for me.

Jan 12, 2018 at 5:11 pm
#67914
Member
wlm2015
OP

Which is handled in which file, please?

Jan 12, 2018 at 4:55 pm
#67913
Member
wlm2015
OP

Is anyone there?

Jan 11, 2018 at 6:10 pm
#67894
Member
wlm2015
OP

Ok thank you. So there is no way to fix this?

Jan 10, 2018 at 8:41 pm
#67847
Member
wlm2015
OP

The shortcode doesn’t seem to work properly.

Jan 10, 2018 at 7:34 pm
#67837
Member
wlm2015
OP

Where is the add package function referenced?

Viewing 25 posts - 1 through 25 (of 31 total)