Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 54 total)
  • Author
    Posts
  • in reply to: Strange issue with tabs + columns #6413
    JackkyJackky
    Participant

    Yep, looks good.

    My main idea was to create something, that will allow to create unlimited types of ui grid, not only strict 12 columns.

    in reply to: MB Term Meta Data not saving #6395
    JackkyJackky
    Participant

    Note, that metaboxes appears only when you EDIT existing term, not when you are on the "main" page of all terms.

    If they still not working, set DEBUG to true in your wp_config.php and see what you get in errors.

    in reply to: Strange issue with tabs + columns #6389
    JackkyJackky
    Participant
    
    $meta_boxes[] = array(
    	'title'      => 'Flex Metabox',
    	'tabs'      => array(
    		'tab_1' => array(
    			'label' => 'Sample tab 1',
    		),
    		'tab_2'  => array(
    			'label' => 'Sample tab 2',
    		),
    	),
    	'fields'     => array(
    
    		
    		'flex' => array( //defining, css display: flex; wrapper, can be used without any openssl_get_cert_locations
    
    				'align-items' 			=> 'center', //simular to css align-items prop.
    				'justify-content'		=> 'flex-end', //simular to css justify-content prop.
    				'flex-wrap'			    => 'wrap', //simular to css flex-wrap prop. Used in case when you want to build your metabox mobile-friendly
    				'flex-direction'		=> 'row-reverse', //simular to css flex-direction prop.
    				'class'								=> 'custom-class', //if user want to define it's own style for this flex wrapper
    				'tab'  				=> 'tab_1',
    				'fields'	=> array( //can hold single fields or new field types 'flex-item' or mixed
    							'flex-item' => array(
    								  'flex-basis' => '50%', //simular to css flex-basis prop. Could handle any type af value, for example 100px, 33%, calc(100% - 50px)
    									'flex-shrink' => '0', //simular to css flex-shrink prop.
    									'fields'	=> array(
    											array(
    												'name' => 'Sample Field 1',
    												'id'   => 'sf1',
    												'type' => 'text',
    											),
    											array(
    												'name' => 'Sample Field 2',
    												'id'   => 'sf2',
    												'type' => 'text',
    											)
    									)
    							),
    							array( //an example for single field without 'flex-item' div wrapper
    								'name' 				              => 'Sample Field 3',
    								'id'   				              => 'sf3',
    								'type' 				              => 'text',
    							  'flex-basis' => '200px', //can hold flex props too
    								'flex-shrink' => '0',
    							)
    				)
    
    			
    		),
    		array( //an example for single field outside flex wrapper. It's behave itself like common field
    			'name' 	=> 'Sample Field 4',
    			'id'   	=> 'sf4',
    			'type' 	=> 'text',
    			'tab'  	=> 'tab_1',
    		),
    		array( //an example for single field outside flex wrapper and in another tab. It's behave itself like common field
    			'name' 	=> 'Sample Field 5',
    			'id'   	=> 'sf5',
    			'type' 	=> 'text',
    			'tab'  	=> 'tab_2',
    		)
    		
    	)
    );
    

    It's very heavy, I know. And this extension will be for pro users, who defenetely know for what they use it and know what css flex is.

    The advantages of this idea:
    1) Flexbox is native and, excepting lot's of nested arrays, it's very simple. Also if developer will have very heavy nested array - he can just define each block as single outside and use it like 'fields' => $product_attr_array - I have such experiense for one o my projects (social network)
    2) It's allows to build any type of UI. Nested mobile-friendly columns, vertical-alignment ect. - anything you want. Some developers like me need this feature, I know (for now I need to break my mind with wrapping fields with 'custom_html' fields and other tricks)
    3) This extension is easy to create. Also if you don't like my idea, I will try to make this extension by my own. I think it will not take lots of time.

    in reply to: Strange issue with tabs + columns #6377
    JackkyJackky
    Participant

    Oh, suddenly I've got another great idea: just make a flex-grid based extension with a markup, such as I gave. If you like it, I can generate here the full list of options.

    in reply to: Optimize rwmb_meta_boxes filter #6373
    JackkyJackky
    Participant
    if (is_admin()) {
       add_filter( 'rwmb_meta_boxes', 'user_profile' );
    }
    in reply to: Strange issue with tabs + columns #6363
    JackkyJackky
    Participant

    Yes, it's the solution for someone, but group type saving a serialized array, but I need each value stay single in case to organize searching and filtering on the front. That's why I'm ready to deal with tonns on nested arrays in the markup example, I gave.)

    in reply to: Strange issue with tabs + columns #6347
    JackkyJackky
    Participant

    A nightmare, yes, it will be) But you can add this like advanced markup for those crasy coders, like me) I really need a feature to wrap 2-3 fields in one column and add empty columns to build beautiful UI inside admin area. And I think, I'm not alone with this perfectionism.

    Add: also with this type of array markup there will be a feature to make nested columns.

    in reply to: Strange issue with tabs + columns #6332
    JackkyJackky
    Participant

    Nope, that will be easier to use, here an example

    fields => array (
        columns => array(
           size => 4,
           class => 'custom-column-class',
           fields => array(
                'name' => 'Group', // Optional
                'id' => 'group_id',
                'type' => 'group',
                // List of sub-fields
                'fields' => array(
                    array(
                        'name' => 'Text',
                        'id' => 'text',
                        'type' => 'text',
                    ),
                    // Other sub-fields here
                ),
            ),
        ),
        columns => array(
           size => 4,
           class => 'custom-column-class',
           fields => array (
             //you can add multiple fields here
           ),
        ),
        columns => array(
           size => 4,
           class => 'custom-column-class',
           fields => array (
             //you can add multiple fields here or leave empty
           ),
        ),
    )
    in reply to: Strange issue with tabs + columns #6323
    JackkyJackky
    Participant

    And another my thought: maybe it will be more user-friendly to make API looking like this:

    fields => array (
        columns => array(
           size => 4,
           class => 'custom-column-class',
           fields => array (
             //you can add multiple fields here
           ),
        ),
        columns => array(
           size => 4,
           class => 'custom-column-class',
           fields => array (
             //you can add multiple fields here
           ),
        ),
        columns => array(
           size => 4,
           class => 'custom-column-class',
           fields => array (
             //you can add multiple fields here or leave empty
           ),
        ),
    )
    in reply to: Strange issue with tabs + columns #6322
    JackkyJackky
    Participant

    *also can't find any markup buttons for code wrap here, sorry

    in reply to: Problem with Featured Image Field #5994
    JackkyJackky
    Participant

    That's because WPML made a unique new page for each translation, so you need to choose post metas twise.

    in reply to: How to load MetaBox only for backend #5991
    JackkyJackky
    Participant

    *forum gives wrong category. This is general question.

    in reply to: Make a unique clone value #5989
    JackkyJackky
    Participant

    That's why I suggest to make a new array option for this purpose. Not to "hardcode" this logic.

    in reply to: Translations suggestion #5898
    JackkyJackky
    Participant

    For example for my multilingual project (5 langs for now) I'm using WP core textdomain where I can do so. It seems to be very good for my purposes.

    in reply to: Custom_html callback markup is broken #5027
    JackkyJackky
    Participant

    So the callback tries to print content anyway? Why you chose this solution?

Viewing 15 posts - 31 through 45 (of 54 total)