Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 3,406 through 3,420 (of 3,708 total)
  • Author
    Posts
  • Anh TranAnh Tran
    Keymaster

    Hi,

    Yes, the image fields should be always saved as an array. In the previous version of Meta Box, the value of file and image are sent as a CSV string and then parsed to an array. IF you upload only 1 image, then CSV = attachment ID, I think that's why you see the only 1 ID when you get $icon[iconimage]. Now it's always an array to make compatible with the core plugin.

    Anh TranAnh Tran
    Keymaster

    I'm not sure about the time. But me and 1 developer will work hard on wysiwyg field for 2 weeks and hope we can get something.

    in reply to: Adding Field to Tab or Group trigger a JS error #2351
    Anh TranAnh Tran
    Keymaster

    Sorry for the late reply. Can you please export your registered meta box for us?

    in reply to: Show data on front end problems. #2350
    Anh TranAnh Tran
    Keymaster

    Sorry for late reply. The last couples of days I had to deal with the bugs in the update of 4.8.1 version.

    Back to your question, are you asking about the condition to show options in the admin area? e.g. If you select Samsung as the brand, then only show Samsung's model. If select Nokia as the brand, show only Nokia's model?

    If that's the correct question, then I see you're doing it right. I tested your code and see it works perfectly.

    Regarding showing the value on the frontend, I think you to show only the model if the corrected brand is selected (e.g. only show Lumia if Nokia is selected), you should change the code to this:

    $brand = rwmb_meta( 'brand' );
    echo 'Brand: ', $brand, '<br>';
    $model = 'Samsung' == $brand ? rwmb_meta( 'Samsung_products' ) : rwmb_meta( 'Nokia_products' );
    echo 'Model: ', $model;
    in reply to: Older Versions #2340
    Anh TranAnh Tran
    Keymaster

    Ah, you're using the Group extension. Please update it to the latest version (1.0.5).

    in reply to: Issue after update to 4.8.1 - Group field #2331
    Anh TranAnh Tran
    Keymaster

    Hi, to get the notification of new updates in the WP admin area, please install the Updater extension. Otherwise, you have to go to your profile (by clicking the My Account link in the top right at metabox.io) and download the plugin, then manually upload to your website.

    in reply to: Older Versions #2330
    Anh TranAnh Tran
    Keymaster

    Can you post the code you're using to register meta boxes? Are you using rwmb_meta_boxes filter or the old way using admin_init?

    in reply to: Issue after update to 4.8.1 - Group field #2326
    Anh TranAnh Tran
    Keymaster

    Hi lemonydesign, please update to 1.0.5 version. It has a fix for the problem.

    Sorry for this bug!

    in reply to: Older Versions #2325
    Anh TranAnh Tran
    Keymaster

    PS: In case you want to use older version, please download them here https://wordpress.org/plugins/meta-box/developers/

    in reply to: Older Versions #2324
    Anh TranAnh Tran
    Keymaster

    Hi, please update to 4.8.1. I've just fixed this problem today.

    Sorry for the bug!

    in reply to: Wysiwyg editor in clonable groups and nested clonable groups #2304
    Anh TranAnh Tran
    Keymaster

    Hi,

    Although we've been working on these 2 big issues, but there is not much in the progress, to be honest. Both issues are related heavily on JavaScript. We had a draft solution for cloning wysiwyg, but WP changes its code and it doesn't work anymore. We're working on using pure JavaScript to work with TinyMCE instead of using WP's code.

    Regarding the group issue, we have a fix for Javascript to make nested group works. This will be finished soon.

    Our plan in near future is:
    - Finishing the development version on Github to release 3.8 version. It's a major change in the plugin core.
    - Then work on wysiwyg issue
    - Then group issue (probably in parallel if it isn't related to changes in 3.8 version).

    We're trying our best. Please be patient.

    in reply to: MB Settings #2264
    Anh TranAnh Tran
    Keymaster

    I've just checked the code and here is what I did:

    1. This is how I structure a "test" plugin:

    2. This is the code in the test.php file (similar to your 1st file):

    <?php
    /**
     * Plugin Name: Test
     * Plugin URI: https://metabox.io
     * Description: Test
     * Version: 0.0.1
     * Author: Rilwis
     * Author URI: http://www.deluxeblogtips.com
     */
    
    // Load meta box and settings page extension
    include plugin_dir_path( __FILE__ ) . 'meta-box/meta-box.php';
    include plugin_dir_path( __FILE__ ) . 'mb-settings-page/mb-settings-page.php';
    
    // Load configuration
    include plugin_dir_path( __FILE__ ) . 'bl-settings.php';

    3. This is the content of the settings file:

    <?php
    function bl_settings_pages( $settings_pages )
    {
    	$settings_pages[] = array(
    		'id'            => 'bl-options',
    		'option_name'   => 'bl_options',
    		'parent'        => 'plugins.php',
    		'menu_title'    => 'Test',
    		'submenu_title' => __( 'BeaverLodge HQ', 'fl-builder' ),
    	);
    	return $settings_pages;
    }
    
    add_filter( 'mb_settings_pages', 'bl_settings_pages' );
    
    function bl_options_meta_boxes( $meta_boxes )
    {
    	$meta_boxes[] = array(
    		'id'             => 'fotoplugins',
    		'title'          => __( 'Fotoplugins Settings', 'fl-builder' ),
    		'settings_pages' => 'bl-options',
    		'fields'         => array(
    			array(
    				'name'    => __( 'Disable Gallery CPT', 'fl-builder' ),
    				'id'      => 'gallery_cpt',
    				'type'    => 'select',
    				'syd'     => 'no',
    				'options' => array(
    					'no'  => 'No',
    					'yes' => 'Yes',
    				),
    			),
    
    		),
    	);
    	return $meta_boxes;
    }
    
    add_filter( 'rwmb_meta_boxes', 'bl_options_meta_boxes' );

    Note:menu_title in the settings file, so the menu appears in HTML but not visible cause it doesn't have a text.

    4. This is the result:

    in reply to: MB Settings #2263
    Anh TranAnh Tran
    Keymaster

    Sorry for the delay. I'm replicating the problem on my localhost now.

    in reply to: Display taxonomy or User meta #2258
    Anh TranAnh Tran
    Keymaster

    The user field stores only user ID. To get more info about the user, please use the function get_userdata:

    $group_value = rwmb_meta( 'histor' );
    foreach( $group_value as &$v){
       $user_id = $v['user'];
       $userdata = get_userdata( $user_id );
       echo "{$v['date']} {$userdata->user_login} {$userdata->user_email}";
    }
    Anh TranAnh Tran
    Keymaster

    I've just fixed the problem with the group extension. The bug is in the JS code of Meta Box and the fix is available in the development version on Github. Please try it. It will be included in the next version of Meta Box.

    Thanks.

Viewing 15 posts - 3,406 through 3,420 (of 3,708 total)