• I needed a function that shows (No downloads yet) on the shortcode for files that don’t have downloads yet.

    So, I made a quick hack on plugin, on line 582:

    function download_count_shortcode( $atts ) {
            extract( shortcode_atts( array( 'link' => '' ), $atts ) );
            $d = new ESDC_Data;
            if( $link != '' ) {
                $_c = $d->get_data( $link );
    			if ($_c[ 0 ][ 'count' ]){
    				return  '('.$_c[ 0 ][ 'count' ].' downloads)';
    			} else {
    				return '(No downloads yet)';
    			}
    
            } else {
                return 'No count available';
            }
        }

    This solution works great to give feedback to users. Also adds some text to count number (that shows alone on the page).

    https://www.ads-software.com/extend/plugins/electric-studio-download-counter/

  • The topic ‘Feedback for no downloads yet’ is closed to new replies.