Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 2,266 through 2,280 (of 3,708 total)
  • Author
    Posts
  • in reply to: Relationships metabox in group metabox #9080
    Anh TranAnh Tran
    Keymaster

    I got it.

    I think in this situation, the best solution is using post field. It works the similar way and works well with groups.

    Technically, because it's inside groups, the data will be saved in groups. So it can't be saved in the relationship table (where the relationships are saved).

    in reply to: Hiding metabox admin menu items #9079
    Anh TranAnh Tran
    Keymaster

    Do you mean copy the code generated by the MB Builder?

    If the code is not for user profile, settings page or taxonomies, then you can just copy it and deactivate the builder extension. It will work.

    If the code is for user profile, settings page or taxonomies, you'll need the corresponding plugin activated (MB User Meta, MB Settings Pages, MB Term Meta). The builder extension then can be deactivated.

    In either cases, you still need to keep Meta Box activated.

    in reply to: Advanced Image doesn't save #9078
    Anh TranAnh Tran
    Keymaster

    Oops, there was a bug in the new added filter in the 4.14.4 version. I've just fixed and pushed a new version. Please update.

    Sorry for this ๐Ÿ™

    in reply to: Front end edit custom post type #9067
    Anh TranAnh Tran
    Keymaster

    Hello,

    I'm checking the problem. Looks like there's a bug with pulling the data. I'll check and fix it now.

    Update: There was a bug in the Meta Box plugin that cause the bug in MB Frontend Submission. I've just updated the plugin to version 4.14.4 to fix this. Please update Meta Box.

    in reply to: Relationships metabox in group metabox #9066
    Anh TranAnh Tran
    Keymaster

    Hi,

    Can you give more details of the problem? Which objects do you want to build relationship between?

    in reply to: Hiding metabox admin menu items #9065
    Anh TranAnh Tran
    Keymaster

    Hi,

    There are some plugins that hide admin menus, which should work in this situation:

    https://wordpress.org/plugins/admin-menu-editor/
    https://wordpress.org/plugins/adminimize/
    https://codecanyon.net/item/wordpress-hide-admin-menu-plugin/290744 (my plugin)

    in reply to: Image advanced field #9064
    Anh TranAnh Tran
    Keymaster

    Hi Hazmi,

    The "image_size" param is there to make sure the images are not blurry. It's not meant to display images with exact width and height. Actually, the style for images mimics the Media Library, that's why you see it 284x284 square.

    in reply to: FacetWP & Custom Tables #9061
    Anh TranAnh Tran
    Keymaster

    Ah, I see.

    The storage is an abstract layer between the data and custom fields. With the implementation in the Meta Box plugin, we can create a custom storage to decide where to save data. As you can see, we have implemented storages for post/term/user/comment meta, settings pages (option) and custom table.

    In that thread, @Jackky wants to create a custom storage for a custom table, which has a different structure than the one provided by the MB Custom Table extension. That's why I instructed him to create a custom storage for his custom table.

    Hope that make things clearer ๐Ÿ™‚

    in reply to: Media Modal does not appear to work #9059
    Anh TranAnh Tran
    Keymaster

    Hi,

    Because of some limitation in the media modal, only simple fields such as text, select, radio, checkbox work. Other fields, including the color field, that require custom JS don't work, unfortunately.

    in reply to: MB Admin Columns with MB Relationships #9040
    Anh TranAnh Tran
    Keymaster

    Hi, I'm not really clear about the situation. Can you please take a screenshot, upload it on imgur.com and paste the link here?

    Anh TranAnh Tran
    Keymaster

    I did test with creating the post in the frontend, but haven't test for editing an existing post. Let me try again.

    Anh TranAnh Tran
    Keymaster

    Hi, I've just checked both the parent param and taxonomy field and they work. Here is my test:

    https://imgur.com/a/ioHvM

    Can you check your code?

    in reply to: MB Admin Columns with MB Relationships #9030
    Anh TranAnh Tran
    Keymaster

    Hello,

    The last snippet seems to make the dropdown works, e.g. making the column *filterable*, instead of *sortable*, doesn't it?

    If so, can you try this:

    add_filter( 'parse_query', 'query_filter_assembly_steps_by_bunkie' );
    function query_filter_assembly_steps_by_bunkie( $query ) {
        global $pagenow;
        $post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : '';
        if ( is_admin() && $pagenow === 'edit.php' && $post_type === 'assembly_step' && isset( $_GET['bunkie_id'] ) && $_GET['bunkie_id'] !== 'all' ) {
            $query->set( 'p', intval( $_GET['bunkie_id'] ) );
        }
    }

    This code filters the list and displays only 1 post (the post that is selected).

    If you want to filter the list and display all posts that have connected "from" a bunkie, then you might want to use this:

    add_filter( 'parse_query', 'query_filter_assembly_steps_by_bunkie' );
    function query_filter_assembly_steps_by_bunkie( $query ) {
        global $pagenow, $wpdb;
        $post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : '';
        if ( is_admin() && $pagenow === 'edit.php' && $post_type === 'assembly_step' && isset( $_GET['bunkie_id'] ) && $_GET['bunkie_id'] !== 'all' ) {
            $bunkie_id = $_GET['bunkie_id'];
            $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT <code>to</code> FROM $wpdb->mb_relationships WHERE <code>from</code> = %d", $bunkie_id ) );
            $query->set( 'post__in', $post_ids );
        }
    }
    in reply to: Need a filter before save field #9014
    Anh TranAnh Tran
    Keymaster

    You're becoming a master of Meta Box's hooks ๐Ÿ™‚

    Anh TranAnh Tran
    Keymaster

    Can you send me the site info via contact page? It's quite strange and I might need to look at the site's code to debug it.

Viewing 15 posts - 2,266 through 2,280 (of 3,708 total)