Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter tihjawi

    (@tihjawi)

    By the way, there is a small bug in the statistics – it does not show the most popular file https://doomguy.ru/wp-content/uploads/2022/09/bug1.jpg

    Hey @tihjawi ,

    The progress of the download is shown based on where the link ( “a” HTML element ) is present. In your case it seems a little weird, because in the first Download you have an “a” HTML element that encapsulates the whole text while in the second Download each text has it’s own “a” HTML element. It seems like you have overridden Download Monitor’s templates. Could you please take a look there or in the page text to see if some HTML element is not closing right?

    Regarding the most popular file you are absolutely right, don’t know how we missed that. A fix will be released soon ( today or tomorrow ), after we gather some more feedback.

    Warmly,
    Razvan

    Thread Starter tihjawi

    (@tihjawi)

    The fact of the matter is that the template has a single tag A, which does not break in any way, I already checked it. Here is the code:

    <?php
    /**
     * Default output for a download via the [download] shortcode
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    } // Exit if accessed directly
    
    /** @var DLM_Download $dlm_download */
    ?>
    <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">
    	<center style="border: 4px double #d40606a6; !important; background: #000000;  padding: 0.3em; margin-top: 20px; margin-bottom: 20px; text-transform: uppercase;"><p style=" border-bottom-width: 3px;border-bottom-style: dotted;border-bottom-color: #666666;font-family: Open Sans Condensed, Tahoma, Arial;font-size: 25px;margin-top: -7px;"><?php $dlm_download->the_title(); ?></p>
    	<?php printf( _n( '<b>Скачать</b> <small style=" color: #969696; font-size: 12px; ">[загрузок: 1]</small>', '<b>Скачать</b> <small style=" color: #969696;    font-size: 12px; ">[загрузок: %d]</small>', $dlm_download->get_download_count(), 'download-monitor' ), $dlm_download->get_download_count() ) ?></center>
    </a>

    It is curious that such a bug does not always occur, for example, there is no such bug on a page with 4 files, here: https://doomguy.ru/gzdoom-addons.html

    I can’t figure out where I went wrong.

    Thread Starter tihjawi

    (@tihjawi)

    It doesn’t matter anymore, I found the reason: the fact is that such a bug occurred if the code [download id=”***”] in the text of the post is fused to the bottom or top line of the text. If you add a line spacing, then everything becomes in order.

    Wonderful that you managed to make it work.

    Warmly,
    Razvan

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to customize download progress view’ is closed to new replies.