wlm2015

Forum Replies Created

Viewing 25 posts - 1 through 25 (of 31 total)
in reply to: Change Upload Directory #159722

wlm2015
Member

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


wlm2015
Member

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>


wlm2015
Member

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?


wlm2015
Member

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/

in reply to: default Link /Page Template #68188

wlm2015
Member

oh wow. :/

in reply to: Automatcially create packages #68187

wlm2015
Member

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);
in reply to: hide meta boxes #68185

wlm2015
Member

thank you that is helpful

in reply to: hide meta boxes #68177

wlm2015
Member

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

in reply to: hide meta boxes #68176

wlm2015
Member

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.

in reply to: Automatic image thumbnail as featured image #68135

wlm2015
Member

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;
}

in reply to: Automatcially create packages #68134

wlm2015
Member

Not sure why you guys refuse to help!?

in reply to: Automatcially create packages #68130

wlm2015
Member

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

in reply to: Automatcially create packages #68096

wlm2015
Member

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

in reply to: Automatic image thumbnail as featured image #68095

wlm2015
Member

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?

in reply to: Search to include package tags and categories #68087

wlm2015
Member

What php echo code would produce a list of package

    categories

?


wlm2015
Member

I already fixed it and you already have it..

in reply to: Search to include package tags and categories #67946

wlm2015
Member

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?

in reply to: Automatcially create packages #67945

wlm2015
Member

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…

in reply to: Search to include package tags and categories #67936

wlm2015
Member

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.


wlm2015
Member

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

in reply to: Automatcially create packages #67914

wlm2015
Member

Which is handled in which file, please?

in reply to: Search to include package tags and categories #67913

wlm2015
Member

Is anyone there?

in reply to: Search to include package tags and categories #67894

wlm2015
Member

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

in reply to: Automatic image thumbnail as featured image #67847

wlm2015
Member

The shortcode doesn’t seem to work properly.

in reply to: Automatcially create packages #67837

wlm2015
Member

Where is the add package function referenced?

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