Okay
  Public Ticket #1269604
Custom metaboxes and avatar icon change
Closed

Comments

  • mihai started the conversation

    Issues:

    1. Regarding Custom Metaboxes created as new listing steps, we want to change the appearance order of them but for an unknown reason this is not allowed. Also here if the fields in those metaboxes  are filled the information is not saved.

    2. We want to change that default avatar Icon on the meniu with another one. Here also we have an error.

    Bellow is what my designer informed me:

    A. New metabox with new fields, and rearrange metaboxes

    We use this code to add a new metaboxes (evenimente_articole_metabox) on listing type "eveniment"

    add_action( 'cmb2_init', 'evenimente_articole_metabox' );

    function evenimente_articole_metabox() {
        $details_metabox = new_cmb2_box( array(
            'id'            => INVENTOR_LISTING_PREFIX . 'evenimente_articole',
            'title'         => __( 'Articole', 'domain' ),
            'object_types'  => array( 'eveniment' ),
            'context'       => 'normal',
            'priority'      => 'high',
            'skip'          => true
        ) );

        $details_metabox->add_field( array(
        'name'    => 'Primul articol',
        'desc'    => 'Articol de tip blog (optional)',
        'id'      => 'first_article',
        'type'    => 'wysiwyg',
        'options' => array(
            'wpautop' => true, // use wpautop?
            'media_buttons' => true, // show insert/upload button(s)
            'textarea_name' => $editor_id, // set the textarea name to something different, square brackets [] can be used here
            'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
            'tabindex' => '',
            'editor_css' => '', // intended for extra styles for both visual and HTML editors buttons, needs to include the `<style>` tags, can use "scoped".
            'editor_class' => '', // add extra class(es) to the editor textarea
            'teeny' => false, // output the minimal editor config used in Press This
            'dfw' => false, // replace the default fullscreen with DFW (needs specific css)
            'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
            'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
        ),
        ) );

        $details_metabox->add_field( array(
        'name'    => 'Al doilea articol',
        'desc'    => 'Articol de tip blog (optional)',
        'id'      => 'second_article',
        'type'    => 'wysiwyg',
        'options' => array(
            'wpautop' => true, // use wpautop?
            'media_buttons' => true, // show insert/upload button(s)
            'textarea_name' => $editor_id, // set the textarea name to something different, square brackets [] can be used here
            'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
            'tabindex' => '',
            'editor_css' => '', // intended for extra styles for both visual and HTML editors buttons, needs to include the `<style>` tags, can use "scoped".
            'editor_class' => '', // add extra class(es) to the editor textarea
            'teeny' => false, // output the minimal editor config used in Press This
            'dfw' => false, // replace the default fullscreen with DFW (needs specific css)
            'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
            'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
        ),
        ) );

    }

    and this code to rearange the fields

    add_action( 'cmb2_init', 'evenimente_fields' );

    function evenimente_fields() {
        Inventor_Post_Types::add_metabox( 'eveniment', array(
            'general',
            'gallery',
            'banner',
            'contact',
            'social',
            'video',
            'location',
            'listing_category',
            'evenimente_articole',
        ) );
    }

    and we have the next error:

    Fatal error: Call to undefined method Inventor_Metaboxes::metabox_evenimente_articole() in
    /home/r45699zago/public_html/wp-content/plugins/inventor/includes/class-inventor-post-types.php on line 296

    we try with: listing_evenimente_articole,  listing_evenimet_evenimente_articole but we have the same error.

    Because the metabox is not added, I beliwe, the metabox is show on listing but the fields of this metabox are not saved.

    B. Change default avatar image

    We use this code (https://codex.wordpress.org/How_to_Use_Gravatars_in_WordPress):

    /* Custom Default Avatar Start */
    add_filter( 'avatar_defaults', 'new_default_avatar' );

    function new_default_avatar ( $avatar_defaults ) {
            //Set the URL where the image file for your avatar is located
            $new_avatar_url = get_stylesheet_directory_uri() . '/images/gravatar-zago.png';
            //Set the text that will appear to the right of your avatar in Settings>>Discussion
            $avatar_defaults[$new_avatar_url] = 'Zago Default Avatar';
            return $avatar_defaults;
    }
    /* Custom Default Avatar End */

    but the link of the image is:

    http://i2.wp.com/zago.ro/wp-content/themes/superlist-child/images/gravatar-zago.png

    instead of

    http://zago.ro/wp-content/themes/superlist-child/images/gravatar-zago.png

    Thank you in advance!

  •  76
    Erik replied

    Hi mihai.

    To your issues:

    1. To change the order of the submission steps you can use WP filter inventor_submission_steps

    http://inventorwp.com/documentation/helpdesk/code-samples.html#inventor-submission-steps

    To change the order of the sections on the listing detail page, use inventor_listing_detail_sections:

    http://inventorwp.com/documentation/helpdesk/code-samples.html#inventor-listing-detail-sections

    2. The default avatar icon is loaded from WordPress itself. You can change it in the WordPress settings in the WP admin > Settings > Discussion.

    3. if you are not familiar with writing the source code, feel free to submit a custom work request 

    Hope it helps.

  • mihai replied

    Dear sir 

    Please dont mess with my money because that is not good for you .This is not support. This is a joke. And I have not paid 45 $ more than 2 weeks ago to have you joking with me and replying  with generic answers. I have asked to support me and tell me what was done wrong  following the documentation  at submision_steps. We did what you recomended and it is not working . That is the reason I have asked for help ,that is the reason you asked us to ask for help here  and that is the reason  I have sent you the code . To annalyse it and tell what was wrong. That means to give support. It is not about custom workout. Please  do your best and give TODAY the support  you owe or refund the money. I told you in emai ..if you think you are not able to respect your customers and their money ...DONT ask they to use this support forum and DONT ask them to pay in advance for nothing. 

  • mihai replied

    Please dont ask for patience because I was patient for 15 days

  •  76
    Erik replied

    Hello sir. We gave you the exact solutions to your issues. If you are not able to solve them yourself using our instructions or you are not familiar with customizing the item, feel free to submit a custom work request. Thank you for your understanding.

  • mihai replied

    Hello sir

    When a new metabox is created I dont think that is called ''item modification'' as you suggest. If you think that way it means if  a new text is inserted or a colour is changed you may call it item modification  and ...that is absurd. It is called using item's features.

     I paid you for support and your ''support'' came 2 weeks after payment and it was like ''Use documentation''. Thank you but that is not support. We used your documentation we did what you specified there . And for an unknown reason ( to us) that was not working. Here your support was and is very welcome. Taking a look at the code we sent you you could very easy figure out what is wrong  and tell us. Very simple and without too much noise . So please reconsider your position and give that support and you will have only to gain and nothing to lose.