Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • in reply to: long name broke page layout #73703
     jerryd
    Participant

    others are now working, but the breadcrumb still doesn’t work with this code

    COPY CODE
    #main .alternate-color h1 {
        max-width: 80% !important;
        word-wrap: break-word;
    }
    Attachments:
    You must be logged in to view attached files.
    in reply to: how to switch to different language? #72419
     jerryd
    Participant

    Hi Radu,

    I have tried that, but it is still not working. I place is_textdomain_loaded into kleo-child/functions.php for checking if the text domain is loaded, and the result is false.

    I have activated the kleo-child theme not the kleo
    I have enabled the WordPress MU.

    The following is the header of kleo_framework-zh_CN.po

    COPY CODE
    "Project-Id-Version: Kleo v3.0.4\n"
    "Report-Msgid-Bugs-To: \n"
    "POT-Creation-Date: \n"
    "PO-Revision-Date: Mon Aug 10 2015 19:13:48 GMT+1000 (AEST)\n"
    "Last-Translator: wp-dev-admin <wp-dev-admin@gmail.com>\n"
    "Language-Team: \n"
    "Language: Chinese (China)\n"
    "Plural-Forms: nplurals=1; plural=0\n"
    "MIME-Version: 1.0\n"
    "Content-Type: text/plain; charset=UTF-8\n"
    "Content-Transfer-Encoding: 8bit\n"
    "X-Poedit-SourceCharset: utf-8\n"
    "X-Generator: Loco - https://localise.biz/\n"
    "X-Poedit-Language: English\n"
    "X-Poedit-Country: UNITED STATES\n"
    "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
    "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
    "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
    "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
    "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
    "X-Poedit-Basepath: ../../../\n"
    "X-Poedit-Bookmarks: \n"
    "X-Poedit-SearchPath-0: .\n"
    "X-Textdomain-Support: yes\n"
    "X-Loco-Target-Locale: zh_CN"

    I have placed if ($domain == "kleo_framework") throw new \Exception(var_export($l10n[$domain],true)); inside wp-includes/l10n.php for list all registered text domain, and the result is 'Exception' with message 'NULL'
    it seems that the text domain has not been registered.

    Attachments:
    You must be logged in to view attached files.
     jerryd
    Participant

    unfortunately, it didn’t work. I have also trie this

    COPY CODE
    #buddypress form#whats-new-form textarea {
        resize: none;
    }

    it didn’t work neither. Any idea?

     jerryd
    Participant

    I have found this class ‘rtmedia-item-thumbnail’, when I tick off the max-width and max-height in browser, the media picture is just displayed as it should, but I don’t know which way is correct to fix it

    COPY CODE
    
    <div class="rtmedia-item-thumbnail">
                <img src="http://wp-demo/wp-content/uploads/rtMedia/users/1/2015/07/screenshot-1-150x150.png" alt="screenshot-1">
            </div>
     jerryd
    Participant

    the following is the custom css in quick css

    COPY CODE
    
    //fix comment list overlaps reply box if image is too small
    .rtm-comment-list.rtm-comment-list {
      list-style: none;
      padding-bottom: 20px;
    }
    
    //fix post-in is not aligned with others next to it
    #buddypress #whats-new-options > div {
    padding-top: 0px;
    }
    
    // hide "SITES" button on member profile
    #blogs-personal-li {
    display: none;
    }

    the following code is in bp-custom.php for adding placeholder to each customized xprofile field

    COPY CODE
    <?php
    function bp_xprofile_field_add_placeholder($elements) {
        $attributes = [
            "field_1" => ["placeholder" => "名字"],                 // qq
            "field_69" => ["placeholder" => "QQ号"],                 // qq
            "field_6" => ["placeholder" => "微信号"],                // webchat
            "field_7" => ["placeholder" => "Facebook"],             // Facebook
            "field_39" => ["placeholder" => "Twitter"],             // Twitter
            "field_8" => ["placeholder" => "如:0123456789"],         // mobile
            "field_64" => ["placeholder" => "如:123 Swanstone Street"], // address
            "field_66" => ["placeholder" => "如:墨尔本"],       // city
            "field_65" => ["placeholder" => "如:VIC"],          // state
            "field_67" => ["placeholder" => "如:澳大利亚"]          // nation
        ];
    
        foreach($attributes as $key => $value) {
            if ($elements["id"] === $key) {
                $elements['placeholder'] = $value["placeholder"];
            }
        }
    
        return $elements;
    }

    add_action(‘bp_xprofile_field_edit_html_elements’,’bp_xprofile_field_add_placeholder’);

    The following code is in kleo-child/functions.php for re-arrange the order of buttons on member profile page

    COPY CODE
    add_action( 'admin_bar_menu', 'remove_wp_logo', 999 );
    
    function remove_wp_logo( $wp_admin_bar ) {
        $wp_admin_bar->remove_node( 'wp-logo' );
    }
    
    /**
     * rearrange menu buttons
     */
    function my_change_profile_tab_order() {
        global $bp;
        
        $bp->bp_nav['activity']['position'] = 10;
        $bp->bp_nav['friends']['position'] = 11;
        /**
         * wp follower plugin
         */
        if( isset ($bp->bp_nav['following'])){
            $bp->bp_nav['following']['position'] = 12;
        }
    
        if( isset ($bp->bp_nav['followers'])){
            $bp->bp_nav['followers']['position'] = 13;
        }
        $bp->bp_nav['messages']['position'] = 14;
        $bp->bp_nav['notifications']['position'] = 15;
        // rtMedia = 16
        $bp->bp_nav['groups']['position'] = 17;
        /**
         * social-article plugin
         */
        if( isset ($bp->bp_nav['articles'])){
            $bp->bp_nav['articles']['position'] = 18;
        }
    
        //$bp->bp_nav['blogs']['position'] = 70;
        $bp->bp_nav['profile']['position'] = 19;
        $bp->bp_nav['settings']['position'] = 20;
    }
    add_action( 'bp_setup_nav', 'my_change_profile_tab_order', 999 );
    
    // re-order the rtmedia button
    add_action('bp_init','change_media_tab_position', 12);
    function change_media_tab_position(){
        global $bp;
        if( isset ($bp->bp_nav['media'])){
            $bp->bp_nav['media']['position'] = 16;
        }
    }
    
    /* my members landing tab */
    define('BP_DEFAULT_COMPONENT', 'profile' );

    apart from those, I didn’t customize any others.

     jerryd
    Participant

    I have tried to place the following code in kleo-child/functions.php, but there is nothing happened, am I doing correctly?

    COPY CODE
    
    add_filter( 'kleo_meta_boxes', 'kleo_my_metaboxes' );
    function kleo_my_metaboxes( array $meta_boxes ) {
     
    	// Start with an underscore to hide fields from custom fields list
    	$prefix = '_kleo_';
    	
    	$meta_boxes[] = array(
    		'id'         => 'general_settings',
    		'title'      => 'Theme General settings',
    		'pages'      => array( 'standard', 'link', 'image', 'gallery' ), // Post type
    		'context'    => 'normal',
    		'priority'   => 'default',
    		'show_names' => true, // Show field names on the left
    		'fields'     => array(
    			array(
    				'name' => 'Media',
    				'desc' => '',
    				'id'   => 'kleomedia',
    				'type' => 'tab'
    			),
    			array(
    				'name' => 'Slider',
    				'desc' => 'Used when you select the Gallery format. Upload an image or enter an URL.',
    				'id'   => $prefix . 'slider',
    				'type' => 'file_repeat',
    				'allow' => 'url'
    			),
    			array(
    				'name' => 'Display settings',
    				'desc' => '',
    				'id'   => 'kleodisplay',
    				'type' => 'tab'
    			),
    			array(
    				'name' => 'Centered text',
    				'desc' => 'Check to have centered text on this page',
    				'id'   => $prefix . 'centered_text',
    				'type' => 'checkbox',
    				'value' => '1'
    			)
    		)
    	);
    	return $meta_boxes;
    }
Viewing 6 posts - 1 through 6 (of 6 total)

Log in with your credentials

Forgot your details?