Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author mooberrydreams

    (@mooberrydreams)

    Are you working on a local network? http://computername/bookname.pdf is not a valid URL for the internet.

    The easiest way to do this would be to add this code:

    add_filter('mbdb_book_meta_boxes', 'mbdb_remove_URL_format_check');
    function mbdb_remove_URL_format_check( $metaboxes ) {
    
    	unset($metaboxes['mbdb_buylinks_metabox']['fields'][0]['fields'][1]['attributes']['pattern']);
    	return $metaboxes;
    }

    However, if there are future updates to Mooberry Book Manager that change the structure of the Retailer Links on the book page, this may no longer work. A better method would be (requires you know how to code PHP or have access to a developer): search the $metaboxes[‘mbdb_buylinks_metabox’] array for the element with the value of ‘_mbdb_buylink’, find the sibling element with the key ‘attributes’, and unset the element with the key ‘pattern’. Hopefully that makes sense.

    Thread Starter Sergey Kryukov

    (@zxsergeant)

    Thanks for the help. It helped.
    +
    Translated plug into Russian. Perhaps useful for you or my countrymen
    Link

    Plugin Author mooberrydreams

    (@mooberrydreams)

    Glad to help.

    Thanks so much for the Russian translation. I will include it with the next update!

    Dear mooberrydreams, in what page I should insert this code for uncheck the link error? My wp is hosted in a local network.

    Tks!

    Plugin Author mooberrydreams

    (@mooberrydreams)

    In the functions.php file of your theme. Even better, in functions.php in a child theme.

    This code may not work once Mooberry Book Manager version 3.0 is released. If that is the case, I’ll post updated code here.

    tks. I inserted the code on functions.php, but still have the problem πŸ™

    Plugin Author mooberrydreams

    (@mooberrydreams)

    what’s exactly the problem or error?

    i inserted the code on functions.php file, but nothink happens, still ocours the message of wrong link format.

    Plugin Author mooberrydreams

    (@mooberrydreams)

    The code is working for me. That code is specific to the Retail Links field. If you are trying in another field you need to add additional code:

    For download links:

    unset($metaboxes['mbdb_downloadlinks_metabox']['fields'][0]['fields'][1]['attributes']['pattern']);

    For reviews:

    unset($metaboxes['mbdb_reviews_metabox']['fields'][0]['fields'][1]['attributes']['pattern']);

    If after adding that code you still have problems, I need to know what exact field you are trying to use and what data you are putting into it in order to help you further.

    is on functions.php at this way?: C:\inetpub\wwwroot\Intranet\intranet\wp-content\themes\trendyblog-theme

    Plugin Author mooberrydreams

    (@mooberrydreams)

    If trendyblog-theme is your current theme, yes.

    i copied from my functions this, that i had inserted:

    if ( df_is_woocommerce_activated() == true && version_compare( WOOCOMMERCE_VERSION, “2.1” ) >= 0 ) {
    add_filter( ‘woocommerce_enqueue_styles’, ‘__return_false’ );
    } else {
    define( ‘WOOCOMMERCE_USE_CSS’, false );
    }

    add_filter(‘mbdb_book_meta_boxes’, ‘mbdb_remove_URL_format_check’);

    function mbdb_remove_URL_format_check( $metaboxes ) {

    unset($metaboxes[‘mbdb_buylinks_metabox’][‘fields’][0][‘fields’][1][‘attributes’][‘pattern’]);
    return $metaboxes;
    }

    unset($metaboxes[‘mbdb_downloadlinks_metabox’][‘fields’][0][‘fields’][1][‘attributes’][‘pattern’]);

    //remove layserslider notifier
    $GLOBALS[‘lsAutoUpdateBox’] = false;

    there is not any other way to do this?

    Plugin Author mooberrydreams

    (@mooberrydreams)

    It should look like this:

    if ( df_is_woocommerce_activated() == true && version_compare( WOOCOMMERCE_VERSION, "2.1" ) >= 0 ) {
        add_filter( 'woocommerce_enqueue_styles', '__return_false' );
    } else {
        efine( 'WOOCOMMERCE_USE_CSS', false );
    }
    
    add_filter('mbdb_book_meta_boxes', 'mbdb_remove_URL_format_check');
    
    function mbdb_remove_URL_format_check( $metaboxes ) {
    
        unset($metaboxes['mbdb_buylinks_metabox']['fields'][0]['fields'][1]['attributes']['pattern']);
    
        unset($metaboxes['mbdb_downloadlinks_metabox']['fields'][0]['fields'][1]['attributes']['pattern']);
    
    return $metaboxes;
    }
    
    //remove layserslider notifier
    $GLOBALS['lsAutoUpdateBox'] = false;
    Plugin Author mooberrydreams

    (@mooberrydreams)

    As stated in reply #2 the only other way would be to edit the Mooberry Book Manager plugin code directly and that would mean your changes would be lost the next time you update.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Arbitrary name links to download the book’ is closed to new replies.