Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,641 through 2,655 (of 3,702 total)
  • Author
    Posts
  • in reply to: How to contribute to plugin? #6713
    Anh TranAnh Tran
    Keymaster

    Ooops, so strange. This is my personal Gmail. Maybe Gmail doesn’t accept files with some executable code (in JavaScript). Please try resending to another Yahoo email [email protected] or share it with me on Google Drive / Dropbox.

    in reply to: Suggesting a Logic and Validation for Multiple checbox #6710
    Anh TranAnh Tran
    Keymaster

    Hi,

    I see your code to register meta boxes has no problem. Do you want to optimize the code to get the values (and show them) in the frontend? By reducing the number of IF checks?

    in reply to: how to get my MB to display? #6709
    Anh TranAnh Tran
    Keymaster

    Hi,

    Glad that you asked these questions. Please find my answers below:

    1. do i need to copy the code genereated by MB Custom Post Type for each CPT and put it in functions.php?

    No. The plugin does all the work for you.

    2. do i need to follow the steps in this page: https://metabox.io/docs/registering-meta-boxes/ (copy the code to register meta-box) even though i have MB Builder / MB Custom Post Types installed?

    No. That are the purpose of the extensions, e.g. without touching code. You don't need to copy the code.

    3. also- the code in that page start with the line:
    add_filter( ‘rwmb_meta_boxes’, ‘YOURPREFIX_register_meta_boxes’ );
    this line is missing from the code generated by MB Custom Post Types (as mentioned in question 1). is this ok or should i add that line?

    No. As you already used MB Builder extension, you don't need to copy the code.

    4. should i copy-paste any code to register my custom taxonimies and custom fields?

    No. The MB Custom Post Types already did that for you.

    5. in the tutorial for “Get custom field value and display in the front end” (this page: https://metabox.io/docs/get-meta-value/) you say: “To get field meta value, use this function:” and show some code – but it’s unclear where to put this code?

    You should find the template files of your theme and paste the code there. Each theme has several PHP template files. You just need to find which file displays your pages, open it and paste the code in that file. To understand about template files of a WordPress theme, please read this documentation.

    6. in that same page you say: “To display field value in the frontend, just put the code below in your theme’s template file:” and show some PHP code – but – my template using .yaml files, not .php files.

    I'm not sure why your theme uses .yaml files. Can you please tell us about your system? Maybe you use a very different system that overwrite WordPress template system.

    Again, to understand about WordPress themes and template files, please read these pages:

    https://codex.wordpress.org/Stepping_Into_Templates
    https://developer.wordpress.org/themes/basics/template-files/

    in reply to: How to contribute to plugin? #6697
    Anh TranAnh Tran
    Keymaster

    Oops, how bad Google Apps is. Please resend to [email protected]. Thanks.

    in reply to: [Request] Preventing any user-input #6691
    Anh TranAnh Tran
    Keymaster

    Ah, I got it!

    Looks like we don't have such a solution for this in PHP yet. The best solution for now is using Conditional Logic extension to hide the fields from unwanted users. But it only hides from user and the fields are still outputted.

    in reply to: I'd like the refund, please #6688
    Anh TranAnh Tran
    Keymaster

    Hi fez, sorry to see you go. I've just issued the refund. If you change your mind, we're happy to serve you.

    Best regards
    Anh

    in reply to: How to contribute to plugin? #6685
    Anh TranAnh Tran
    Keymaster

    Hi,

    Thanks a lot for your contribution. Can you please send me your code via email [email protected]? We're hosting the extensions in private repositories, so no pull requests are allowed now.

    in reply to: save state and map field #6655
    Anh TranAnh Tran
    Keymaster

    Just released new version for the extension. Please update.

    in reply to: [Request] Preventing any user-input #6654
    Anh TranAnh Tran
    Keymaster

    Hi,

    Can you give some details on the 1st option? Do you use the MB Frontend Submission extension to output fields in the frontend? I'm not very clear about the downside.

    in reply to: [Request] Force number of clones #6644
    Anh TranAnh Tran
    Keymaster

    If you need to make for groups, you can set std as array of arrays of default values for sub fields, like:

    $default_for_group = array( '', '', '' ); // sub field 1, 2, 3
    'std' => array( $default_for_group, $default_for_group, $default_for_group ),

    To prevent users from removing clones, you can hide them with CSS. A simple trick is adding a custom_html field to output styles, like this:

    array(
        'type' => 'custom_html',
        'std' => '<style>.rwmb-group-wrapper .remove-clone { display: none; }</style>
    )

    You might want to add custom class to your group fields, so the CSS selector is more specific.

    in reply to: save state and map field #6643
    Anh TranAnh Tran
    Keymaster

    Thanks for letting us know. We'll fix it soon.

    in reply to: Validation does not work when field is clonable #6624
    Anh TranAnh Tran
    Keymaster

    Hi,

    This problem is caused by the validation library. It checks by the ID attribute. When cloning, we change the ID (by appending _1, _2, etc.) and thus, break the validation. We'll try to find a solution soon.

    in reply to: [Request] Force number of clones #6623
    Anh TranAnh Tran
    Keymaster

    Hi,

    Yes, you can do that by specified the std value. This code will set the 3 inputs (clones):

    array(
        'type' => 'text',
        'id' => 'test',
        'clone' => true,
        'max_clone' => 3,
        'std' => array( '', '', '' ) // Default values for 3 clones
    )
    in reply to: MB Settings Page 1.3.1, Checkbox List #6572
    Anh TranAnh Tran
    Keymaster

    Hi zac, I've just fixed the bug with checkbox list. Please update the extension.

    in reply to: Heading as revision #6570
    Anh TranAnh Tran
    Keymaster

    Thank Troels for the bug and fix. We'll fix it now 🙂

    Update: New version is available. Please update.

Viewing 15 posts - 2,641 through 2,655 (of 3,702 total)