how to customize download progress view

[ad_1]

By the way, there is a small bug in the statistics – it does not show the most popular file

Plugin Author
Razvan

(@raldea89)

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

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:

I can’t figure out where I went wrong.

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.

Plugin Author
Razvan

(@raldea89)

Wonderful that you managed to make it work.

Warmly,
Razvan

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer