Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 3,601 through 3,615 (of 3,708 total)
  • Author
    Posts
  • in reply to: Clone Group #1161
    Anh TranAnh Tran
    Keymaster

    Just in the group field, for example:

    'fields' => array(
        array(
            'id' => 'group_id',
            'type' => 'group',
            'fields' => array(
                // Sub-fields here
            ),
            'clone' => true, // This is all you need
        )
    )
    in reply to: Help! Can't make it work #1158
    Anh TranAnh Tran
    Keymaster

    You're using exclude which means do not show on these pages (show on all pages except these). You just need to change it to include which means show only on these pages.

    in reply to: Help displaying group #1157
    Anh TranAnh Tran
    Keymaster

    Yes, it's possible. If you set multiple to true, then the value of $row_value['intiative_links'] will be an array, you need to loop through it to output the result:

    $group_value = rwmb_meta( 'initiatives_group' );
    foreach ( $group_value as $row_value )
    {
        echo '<div class="the_image"><img src="' . $row_value['initiative_image'] . '"></div>
            <div class="the_title">' . $row_value['initiative_title'] . '</div>';
        echo '<div class="the_links">';
        foreach ( $row_value['intiative_links'] as $id )
        {
             echo '<a href="' . get_permalink( $id ) . '">' . get_the_title( $id ) . '</a>';
        }
        echo '</div>';
    }
    in reply to: Clone Group #1156
    Anh TranAnh Tran
    Keymaster

    Yes, it is. To clone a group, please add 'clone' => true to the group field.

    in reply to: Help displaying group #1147
    Anh TranAnh Tran
    Keymaster

    Can you try this code:

    $group_value = rwmb_meta( 'initiatives_group' );
    foreach ( $group_value as $row_value )
    {
        echo '<div class="the_image"><img src="' . $row_value['initiative_image'] . '"></div>
            <div class="the_title">' . $row_value['initiative_title'] . '</div>';
    }
    in reply to: Image Field - Frontend #1132
    Anh TranAnh Tran
    Keymaster

    Hi, implementing image upload in the frontend is quite complicated. I'm not sure how you code it but you can look at the code of file_input.php as a start point.

    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.

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