Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 3,601 through 3,615 (of 3,702 total)
  • Author
    Posts
  • in reply to: WSYIWYG seems to be broken when using groups #1126
    Anh TranAnh Tran
    Keymaster

    Hmm, that's unexpected and weird behaviour. I'm fixing it and will update asap.

    Anh TranAnh Tran
    Keymaster

    I had another customer who had (maybe) similar problem: he registered a lot of meta boxes and fields and couldn't save them. The problem was: PHP limits the number of POST fields, usually 1000, and also POST size. This makes you not save all fields when you build your meta boxes with the Builder.

    Here are some links for reference about this:

    http://stackoverflow.com/questions/8710185/new-limit-within-php-1000-fields-per-post-does-someone-know-if-the-number-can
    http://www.inmotionhosting.com/support/community-support/prestashop-15/increase-the-maxinputvars-in-phpini

    The fix for that is editing the .htaccess (or php.ini) like this:

    php_value max_input_vars 3000
    php_value suhosin.get.max_vars 3000
    php_value suhosin.post.max_vars 3000
    php_value suhosin.request.max_vars 3000

    See here for more information: http://stackoverflow.com/a/14166562/371240

    Please try and let us know if this fixes.

    in reply to: WSYIWYG seems to be broken when using groups #1114
    Anh TranAnh Tran
    Keymaster

    I see, I will check with the group extension also. Please let me know about the JS error in console if you find anything.

    in reply to: Invoice ? #1112
    Anh TranAnh Tran
    Keymaster

    Hi, I've just sent you the invoice via email.

    I will add invoice download link to user profile later.

    Have fun.

    in reply to: Sort fields #1101
    Anh TranAnh Tran
    Keymaster

    I think you can do that with custom JS code. The idea is:

    - Enqueuing a JS file for Add New/Edit pages
    - Call jQueryUI sortable method

    The pseudo-code might look like this:

    add_action( 'admin_enqueue_scripts', function()
    {
        $screen = get_current_screen();
        if ( 'team' == $screen->post_type && 'post' === $screen->base )
        {
            wp_enqueue_script( 'prefix-sort-field', get_theme_directory_uri() . '/js/sort.js', array( 'jquery-ui-sortable' ) );
        }
    } );

    And in sort.js:

    jQuery( function ( $ )
    {
    	$( '.rwmb-input' ).sortable();
    } );

    Hope that helps.

    in reply to: Finish a column #1100
    Anh TranAnh Tran
    Keymaster

    It does have clear floats, of course. But the thing is the plugin needs correct number of columns to output correct opening and closing divs. You can see it in the console like this:

    Here is an example to illustrate what I meant in previous reply: assuming we have 2 rows, 1st row has 2 fields (each field has 1/4 width), 2nd row has 4 fields (each field has 1/4 width):

    add_filter( 'rwmb_meta_boxes', function ()
    {
    	return [
    		[
    			'title'  => 'Demo columns',
    			'fields' => [
    				[
    					'id'      => 'text1',
    					'type'    => 'text',
    					'name'    => 'Text1',
    					'columns' => 3,
    				],
    				[
    					'id'      => 'text2',
    					'type'    => 'text',
    					'name'    => 'Text2',
    					'columns' => 3,
    				],
    				[
    					'type'    => 'custom_html',
    					'std' => '',
    					'columns' => 6,
    				],
    				[
    					'id'      => 'text5',
    					'type'    => 'text',
    					'name'    => 'Text5',
    					'columns' => 3,
    				],
    				[
    					'id'      => 'text6',
    					'type'    => 'text',
    					'name'    => 'Text6',
    					'columns' => 3,
    				],
    				[
    					'id'      => 'text7',
    					'type'    => 'text',
    					'name'    => 'Text7',
    					'columns' => 3,
    				],
    				[
    					'id'      => 'text8',
    					'type'    => 'text',
    					'name'    => 'Text8',
    					'columns' => 3,
    				],
    			],
    		]
    	];
    } );
    in reply to: WSYIWYG seems to be broken when using groups #1097
    Anh TranAnh Tran
    Keymaster

    Hi, I think there must be some JS errors which prevent the editor to be rendered properly. Do you see any errors in browser console?

    in reply to: Finish a column #1087
    Anh TranAnh Tran
    Keymaster

    An easy way to do that is keep adding 4 fields for columns, but you can use a special field like custom_html with zero content. That forces the plugin to output empty divs in the column which helps to maintain the layout.

    in reply to: How to retrieve select_tree taxonomy values #1086
    Anh TranAnh Tran
    Keymaster

    Hi, currently the rwmb_meta function uses get_terms() internally and this function doesn't return terms in hierarchical order. I think the best way for now is going through the returned items, looking for parent parameter to get the correct order.

    in reply to: STD in metabox RADIO #1085
    Anh TranAnh Tran
    Keymaster

    Hi catarinacarraro,

    I've just tested with your code and I see the std value works, the radio with value "Em" is checked by default:

    in reply to: Existing Values Before Group was Created #1073
    Anh TranAnh Tran
    Keymaster

    I'm really sorry that you have spent much of time searching for the solution. I was on a holiday last week and couldn't answer you sooner. Hope you be generous and still love the plugin.

    in reply to: Existing Values Before Group was Created #1071
    Anh TranAnh Tran
    Keymaster

    Hi, in order to convert data from 1 format to another format, you need to understand how data is saved in the database. Here is the documentation for this. For group, data is saved as an array, each element of which is the value of sub-fields.

    In this case, if you are using simple text field, your data is just multi rows in the database, so getting values will not be a big problem. But I'm not clear how you want to put them in a group? Will the text field is a sub-field of the new group? If so, you can use the following code:

    <?php
    $text_id = 'TEXT_FIELD_ID';
    $group_id = 'GROUP_FIELD_ID';
    
    $posts = get_posts( array(
    	'posts_per_page' => -1,
    ) );
    foreach ( $posts as $post )
    {
    	$text = rwmb_meta( $text_id, 'type=text', $post->ID );
    
    	$meta_key = "{$group_id}[{$text_id}]";
    	update_post_meta( $post->ID, $meta_key, $text );
    
    	// delete_post_meta( $post->ID, $text_id ); // Remove old data, use with care
    }
    in reply to: Bug: MetaBox Group #1057
    Anh TranAnh Tran
    Keymaster

    I think I understand now, but it's still better to have screenshots ๐Ÿ˜€

    in reply to: Metabox List all Pages #1053
    Anh TranAnh Tran
    Keymaster

    Hi, you can use post field with 'post_type' => 'page'.

    in reply to: Bug: MetaBox Group #1052
    Anh TranAnh Tran
    Keymaster

    Hi Flickweert,

    I'm not very clear about the bug. Do you mean that when adding max_clone, it still allows you to add infinite number of clones? And when you remove a clone, the "Add more" button disappear?

Viewing 15 posts - 3,601 through 3,615 (of 3,702 total)