Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 631 through 645 (of 3,708 total)
  • Author
    Posts
  • in reply to: Revisions and Pods-created custom fields #16694
    Anh TranAnh Tran
    Keymaster

    Hi Joanne,

    For example, if you created a field like this in Pods:

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

    Then all you need to do is convert it to a Meta Box field with something like this:

    add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) {
        $meta_boxes[] = [
            'title' => 'A Custom Meta Box',
            'fields' => [
                [
                    'id' => 'a_custom_text', // THIS: matches field's Name in Pods
                    'name' => 'A Custom Text',
                    'type' => 'text',
                ],
            ],
        ];
    } );
    in reply to: In how many items extensiins can be used ? #16692
    Anh TranAnh Tran
    Keymaster

    Hi Akram,

    You can use the extensions in unlimited sellable items. The only restriction is you can't use it in free items. And keep in mind to put a link credit to the metabox.io website.

    So if you're developing themes on ThemeForest, you can use the extension in all of your themes. It's not like the license for Revolution Slider, WPBackery Page Builder where you have to buy a license for each theme.

    in reply to: Refund #16679
    Anh TranAnh Tran
    Keymaster

    Hi, I’ve just issued the refund for you. Would you mind giving some feedback? What features did you look for? It will help us improve the products. Thanks!

    in reply to: Error caused by Metabox: tax_query #16659
    Anh TranAnh Tran
    Keymaster

    Hi Bernhard,

    The table wp_term_relationships and the column term_taxonomy_id are default in WP. See this page for details. Please check your DB via a tool like phpMyAdmin to see if your database is broken.

    If it's not, please post the code you use to query the posts here. Maybe the code from that query.

    in reply to: Display edit user form on front end #16651
    Anh TranAnh Tran
    Keymaster

    We have resolved this issue via email. Here is the solution in case anyone is interested in:

    The solution is using some hook to output the shortcode dynamically, like this:

    // We're adding a shortcode dynamically to a specific page
    add_filter( 'the_content', function( $content ) {
        if ( ! is_page() || 123 !== get_the_ID() ) {
            return $content;
        }
        
        // We pass user ID via URL
        $user_id = isset( $_GET['user_id'] ) ? $_GET['user_id'] : '';
        // Create shortcode dynamically
        $shortcode = '[mb_user_profile_info id="your-meta-box-id" user_id="' . $user_id . '"]';
    
        return $content . do_shortcode( $shortcode );
    } );

    So, you can create a page like /edit-user/ and pass user ID via URL like this: /edit-user/?user_id=123

    in reply to: Select2 error, possible conflict with The Events Calendar #16650
    Anh TranAnh Tran
    Keymaster

    Hi Stefan,

    The problem is TEC uses an older version of select2 (3.x) while Meta Box uses version 4. Searching on the Internet shows quite a lot of similar problems and the solution is use only one version of select2.

    In this case, I think to make it work again, it's required to not using select2 from Meta Box. You can do that by switch the field type from select_advanced to normal select like this:

    add_action( 'mb_relationships_init', function () {
        MB_Relationships_API::register(
            array(
                'id'   => 'posts_to_pages',
                'from' => [
                    'field' => [
                        'post_type'  => 'post',
                        'ajax'       => false,
                        'field_type' => 'select',
                        'query_args' => array(
                            'posts_per_page' => -1,
                        ),
                    ],
                ],
                'to'   => [
                    'field' => [
                        'post_type'  => 'tribe_events',
                        'ajax'       => false,
                        'field_type' => 'select',
                        'query_args' => array(
                            'posts_per_page' => -1,
                        ),
                    ],
                ],
            )
        );
    } );
    in reply to: Prompt to change password shows on Edit Form #16648
    Anh TranAnh Tran
    Keymaster

    Hi Marge,

    1. When password is added via rwmb-user-info meta box, it's always required. You can change it with the rwmb_profile_info_fields filter.
    add_filter( 'rwmb_profile_info_fields', function( $fields ) {
        $fields['password']['required'] = false;
        $fields['password2']['required'] = false;
        return $fields;
    } );
    1. I don't see that problem on my localhost. Please see this video. Please check in the user profile to see if the user has set first name = username.

    2. It's possible. You need to hook to get avatar function to change the avatar URL.

    3. The image field actually doesn't show any file name. If you meant the "file" field, then yes, it shows only the file name.

    4. You can hook to rwmb_profile_info_fields to add email fields to add email field, like this:

    add_filter( 'rwmb_profile_info_fields', function( $fields ) {
        $fields['email'] = [
            'name' => 'Email',
            'id'   => 'user_email',
            'type' => 'email',
        ];
        return $fields;
    } );
    Anh TranAnh Tran
    Keymaster

    Hi Sam,

    You can disable MB REST API in the Meta Box AIO settings and use an earlier version of it from wordpress.org.

    The plugin doesn't have any control on access permission. Please try deactivating it, and use only FacetWP to see if the problem still happens.

    in reply to: Is there any way to create timeslots ? #16631
    Anh TranAnh Tran
    Keymaster

    is there any way to avoid it ?

    I'm afraid not. You might need to work on jQueryUI date picker to prevent this from happening.

    But this will also be time consuming for user to create those things manually

    You can also set the default value for groups. See the docs for details: https://docs.metabox.io/extensions/meta-box-group/#setting-default-group-values

    in reply to: Not able to deselect default dropdown value #16629
    Anh TranAnh Tran
    Keymaster

    Thanks for your feedback. I'll check and fix it.

    in reply to: Is there any way to create timeslots ? #16628
    Anh TranAnh Tran
    Keymaster

    If your clients want to set time slots for each day, then you can use MB Group to do that, something like this (this is a group field):

    [
        'type' => 'group',
        'name' => 'Time Slots',
        'clone' => true,
        'fields' => [
            [
                'id' => 'start',
                'type' => 'time',
                'name' => 'Start',
            ],
    
            [
                'id' => 'end',
                'type' => 'time',
                'name' => 'End',
            ],
        ],
    ]

    Then you can get the slots in the front end for your booking app:

    echo '<select>';
    $slots = rwmb_meta( 'slots' );
    foreach ( $slots as $k => $slot ) {
        echo '<option value="' . $k . '">' . $slot['start'] . ' - ' . $slot['end'] . '</option>';
    }
    echo '</select>';

    Some notes: Your problem is very specific and what I'm trying to help you here is just an idea how to do that. This is out of the support scope. So, please understand it's might not a correct/final solution.

    Anh TranAnh Tran
    Keymaster

    Hi,

    The better way to check is via function_exists or class_exists. For MB Term Meta, this check will work:

    if ( function_exists( 'mb_term_meta_load' ) ) {
    }
    in reply to: Problem with getting Field Value #16623
    Anh TranAnh Tran
    Keymaster

    Hi,

    You need to provide the option name in the settings page and put it in the 3rd parameter:

    $settingData = rwmb_meta( 'bike_resources_detail', ['object_type' => 'setting'], $option_name );
    
    in reply to: Is there any way to create timeslots ? #16622
    Anh TranAnh Tran
    Keymaster

    Hi Akram,

    Please give us some time to answer your ticket. Your ticket was submitted at 2:37 AM and I'm answering now.

    Can you provide more details on the meaning of time slots you're trying to create? Are there any rules for time slots?

    in reply to: License key is expired with Lifetime bundle #16620
    Anh TranAnh Tran
    Keymaster

    Hi Sandra,

    I've just checked your license key and see it works as expected. Can you check if you have Meta Box Updater installed? If yes, please remove it. It's not needed anymore.

Viewing 15 posts - 631 through 645 (of 3,708 total)