Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,861 through 1,875 (of 3,708 total)
  • Author
    Posts
  • in reply to: New Google maps pricing policy and MB geolocation #11021
    Anh TranAnh Tran
    Keymaster

    It's not been added to the Builder yet. We'll update the Builder soon.

    in reply to: Submenu title does not work in addon MB Settings Page #11020
    Anh TranAnh Tran
    Keymaster

    Hello,

    The submenu_title works only if the parent menu has at least one child. So if you create only one top-level settings page, it won't show the submenu. You need to create another sub-page, then the submenu_title will show in the menu.

    https://imgur.elightup.com/e3FS0sm.png

    in reply to: Best way to translate options page #11019
    Anh TranAnh Tran
    Keymaster

    Hi Bezzo,

    Interesting question! Thanks for asking this.

    Using wpml-config.xml is the standard way and is recommended by WPML. However, if you need to have different settings per language, you can use the ICL_LANGUAGE_CODE constant to detect current language and set the field IDs based on that.

    This is the sample code:

    $prefix = ICL_LANGUAGE_CODE . '_';
    $meta_boxes[] = [
        'title' => 'Fields',
        'fields' => [
            [
                'id' => $prefix . 'text',
                'name' => 'Text',
                'type' => 'text',
            ],
            // Other fields.
        ],
    ];

    To get the field value, you can create a helper function like this:

    function my_setting( $field_id ) {
        $option_name = 'my_option';
    
        $field_id = ICL_LANGUAGE_CODE . '_' . $field_id; // Prepend the language code.
        return rwmb_meta( $field_id, array( 'object_type' => 'setting' ), $option_name );
    }
    in reply to: WYSIWYG without p but with br #11018
    Anh TranAnh Tran
    Keymaster

    Hi Nick,

    I understand. However, the problem is Beaver Themer auto outputs text using wpautop, which wraps text in <p> tag.

    Why don't you use CSS to reduce the spacing? I think it's fast and works.

    Anh TranAnh Tran
    Keymaster

    Hi Lukas,

    Did you check this checkbox?

    https://imgur.elightup.com/H9dezgo.png

    in reply to: Front-end validation messages #11003
    Anh TranAnh Tran
    Keymaster

    Hi Jason,

    I found 3 things:

    1. Your syntax isn't correct. You need to put validation rules as a param of meta box, not under fields. Here is the correct code: https://ghostbin.com/paste/gnch6
    2. In the rules and messages, because the field is a checkbox list, its checkboxes has name obh_member_membership_tags[], not obh_member_membership_tags. We have to use the input name, not the field ID. See the code in point 1 how I fixed it. I should have mentioned that clearer in the docs.

    3. There's also a bug with Meta Box, I've fixed it on Github.

    Please try it and let me know if there's still any bug.

    in reply to: Font end image upload input not showing #10997
    Anh TranAnh Tran
    Keymaster

    Hi Harrison,

    This problem is the same as in MB Frontend Submission. To understand and resolve it, please read this docs.

    in reply to: Value of unchecked checkboxes/switches #10996
    Anh TranAnh Tran
    Keymaster

    Hi Hazmi,

    The statement is correct. However, I missed the code for switch field. The checkbox field works correctly. I've just push the fixes for the switch on Github.

    in reply to: Can't get Meta Box Custom Table to work #10995
    Anh TranAnh Tran
    Keymaster

    Yes, it's safe. In the code above, there's no code to remove the data. So it always there.

    You should always backup the database before doing this.

    in reply to: WYSIWYG without p but with br #10989
    Anh TranAnh Tran
    Keymaster

    Hi Nick,

    The fields uses either <p> or no tags at all. It doesn't use only <br> tag.

    I've just tested with Themer's text module and it seems to always output <p> tag, no matter what the data is. I'm wondering why don't you use the <p> tag.

    in reply to: Help with Background Field #10988
    Anh TranAnh Tran
    Keymaster

    Hi Thomas, here is the video tutorial:

    https://youtu.be/NFZE4Sxi2p4

    Please pay attention to the text I wrote in the video :).

    Hope you like it.
    Anh

    in reply to: Display multiple items on the map? #10981
    Anh TranAnh Tran
    Keymaster

    Hi Mauro,

    It's great to see you done that. I'd love you to contribute to the osm-frontend.js file. It's used in the frontend. Maybe just make it works with array of locations.

    in reply to: Image Advanced Warning #10980
    Anh TranAnh Tran
    Keymaster

    Hi Thomas,

    I think the problem is where you put the code that gets the image. For the template that doesn't have header background, you should perform a simple check like this:

    $images = rwmb_meta(...);
    if ( $images ) {
        $image = reset( $images );
        echo $image;
    }
    in reply to: Log Out #10979
    Anh TranAnh Tran
    Keymaster

    Hi, Thomas. I hide the logout link, cause it's not really useful. Do you really need it? I can put it in the Quick Links section if you want.

    in reply to: Help with Background Field #10965
    Anh TranAnh Tran
    Keymaster

    Hi Thomas,

    I'll create a tutorial and video to demonstrate how those helper functions work and what is the difference between them. Please wait a little.

    Thanks,
    Anh

Viewing 15 posts - 1,861 through 1,875 (of 3,708 total)