Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 616 through 630 (of 3,702 total)
  • Author
    Posts
  • in reply to: Readonly Date Input Still Shows Datepicker #16721
    Anh TranAnh Tran
    Keymaster

    Thanks for your feedback. Somehow readonly is ignored by jQueryUI datepicker. I fixed it here.

    in reply to: Using Gravity Forms (or any form) with a CPT #16719
    Anh TranAnh Tran
    Keymaster

    Hi Neil,

    I think it's possible:

    • You have a CPT - training
    • Each post with the "training" has a video, which is a Meta Box's field.
    • It also has a quiz attached to it. Quiz can be created in GF or any plugin. Then attach to the CPT with Meta Box's select field (or any field that allows you to choose a quiz). The options of the select field might need custom code to fetch all available quiz to select from.

    On the front end, you can simply display the video and the button to start the quiz. When the quiz is done, see if there's any hook to allow you to update the post (training). If yes, then simply add the tracking data you want. If you want to track the video ID, then you can add the video (attachment) ID.

    in reply to: Show Custom Post Type Data in place of ID in WP REST API #16718
    Anh TranAnh Tran
    Keymaster

    Hey Sharath,

    Please don't just copy and paste my code. I put a comment "Modify your value here", which means you should get the post details from the post ID ($value) there. Something like this:

    add_filter( 'rwmb_get_value', function( $value, $field, $args, $post_id ) {
        // Change value only for REST API.
        if ( ! defined( 'REST_REQUEST' ) ) {
            return $value;
        }
    
        if ( 'p' !== $field['id'] ) {
            return $value;
        }
    
        $value = get_post( $post_id, ARRAY_A );
        return $value;
    }, 10, 4 );
    in reply to: Using Geolocation in my front end #16703
    Anh TranAnh Tran
    Keymaster

    Yes, you can. If you have your front end form created with MB Frontend Submission, then you can use MB Geolocation for the fields.

    If you're looking for a way to support other forms, then it won't work. The extension works only for Meta Box fields.

    in reply to: License Value not hidden #16702
    Anh TranAnh Tran
    Keymaster

    Hi,

    Thanks for your feedback. I've been thinking about this, too. Probably I'll replace the value with *** when the license is valid.

    in reply to: How to provide key to users so they can update extensions #16701
    Anh TranAnh Tran
    Keymaster

    You can ignore some updates if not necessary. We constantly add more features to the plugins, and have to update them. If those are not the features you use, then you might not need to update them immediately.

    in reply to: Show Custom Post Type Data in place of ID in WP REST API #16700
    Anh TranAnh Tran
    Keymaster

    Hi Sharath,

    The values are returned via function rwmb_get_value and it has a filter with the same name rwmb_get_value for you to modify the values.

    So, I think you can do something like:

    add_filter( 'rwmb_get_value', function( $value, $field, $args, $post_id ) {
        // Change value only for REST API.
        if ( ! defined( 'REST_REQUEST' ) ) {
            return $value;
        }
    
        if ( 'your_field_id' !== $field['id'] ) {
            return $value;
        }
    
        // Modify your value here.
        return $value;
    }, 10, 4 );
    in reply to: How to provide key to users so they can update extensions #16696
    Anh TranAnh Tran
    Keymaster

    Unfortunately, it's not permitted to give the license to your users. To avoid updates, you can bundle the extensions inside your theme directly. See this guide for details.

    in reply to: In how many items extensiins can be used ? #16695
    Anh TranAnh Tran
    Keymaster
    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,
                        ),
                    ],
                ],
            )
        );
    } );
Viewing 15 posts - 616 through 630 (of 3,702 total)