• Resolved mwoida

    (@mwoida)


    I’m trying to display a list of PDF documents using a custom template where each file would have a thumbnail of the PDF with it’s link below it. I’ve got everything to work except the thumbnail. In it’s place I see a generic Download Manager icon. How do I get a thumbnail to display?

    Using my FTP client I can see that Download Monitor generated a bunch of thumbnails for each document I uploaded.

    When I look at my list of downloads in the Download Monitor dashboard, the iamge column just shows the same Download Monitor icon over and over.

    I’ve tried to get this to work using a variety of other file formats, shortcodes and templates; nothing displays a thumbnail. My PHP knowledge is very spotty, so any help would be appreciated.

    (I would add that the only way I got this to look the way I wanted was to attach at “featured image” to a given download, but that is an inelegant solution.)

    • This topic was modified 5 years, 10 months ago by mwoida.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    How are you setting thumbnail of the PDF? Do you mean generic PDF icon? If that is the case, then please note this is not possible because our plugin saves the file in a secured folder not accessible to WordPress for reading the content.

    Using the featured image is the only solution.

    Thread Starter mwoida

    (@mwoida)

    Sorry for the confusion, but I just want to clarify: I’m trying to display a custom thumbnail for each file (not a generic PDF icon). I see that Download Monitor created thumbnails of all my uploads in the “dlm_uploads” folder, I just don’t know how to display them. I’m using the “downloads” shortcode and a custom template:

    <?php
    /**
     * Detailed download output
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    } // Exit if accessed directly
    
    /** @var DLM_Download $dlm_download */
    
    ?>
    <div class="download-box-inline">
    
    	<?php $dlm_download->the_image(); ?>
    
    	<div class="download-box-content">
    
    	<a class="download-link" title="<?php if ( $dlm_download->get_version()->has_version_number() ) {
    	printf( __( 'Version %s', 'download-monitor' ), $dlm_download->get_version()->get_version_number() );
    	} ?>" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow">
    	<?php $dlm_download->the_title(); ?></a>
    	
    	</div>
    
    </div>

    This results in a grey box with the title underneath.

    Hello,

    The thumbnails created are done by WordPress but I regret to say you won’t be able to use them as they are in a protected folder.

    Thread Starter mwoida

    (@mwoida)

    Ah, I see! Thank you for clarifying.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PDF Thumbnails’ is closed to new replies.