• It’s a great plugin with some issues:

    Test Environment:Wordpress 3.9.2+the twentyfourteen theme,without any other plugins.

    1. I18n:
    1.1 Warning: _() expects exactly 1 parameter, 2 given in xxx\wp-content\plugins\cubepoints\modules\donate\donate.php on line 165
    it should be:
    'somethingWentWrongText' => __('Oops, something went wrong! Please try again later.', 'cp');
    1.2 the backup.php file should add some ,'cp'to _();
    1.3 line 80 of post_authors_points.php should be:
    _e('Comment on your post was removed','cp'); and so on;

    2. BUGS?
    2.1 the ajax user search form on the wp-admin/admin.php?page=cp_admin_add_points page may be have some issue;
    2.2 if I activate the Paid content module and set the ‘Multiply points earned by’ to 2, when some user pay for a post need to pay 10, Cubepoints will deduct 20 points from the user’s account.

    3.for better I18n:

    /**
     * Update Cubepoints database for better i18n support
     * @author suifengtec http://suoling.net/cubepoints-mysql
     * @since 2014.09.09
     */
    add_action('init','cwp_update_cubepoints_db_for_i18n');
    function cwp_update_cubepoints_db_for_i18n(){
    if(get_option('wp_cp_has_be_updated'))
        return;
        global $wpdb;
        $charset_collate = '';
        if ( ! emptyempty( $wpdb->charset ) ) {
            $charset_collate = "DEFAULT CHARACTER SET {$wpdb->charset}";
        }
        if ( ! emptyempty( $wpdb->collate ) ) {
            $charset_collate .= " COLLATE {$wpdb->collate}";
        }
        $charset_sql="ALTER TABLE <code>{$wpdb->prefix}cp</code> DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
        $charset_done=$wpdb->query($charset_sql);
        //latin1_swedish_ci
        $type_sql="ALTER TABLE <code>{$wpdb->prefix}cp</code> CHANGE <code>type</code> <code>type</code> VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;";
        $type_done=$wpdb->query($type_sql);
        //latin1_swedish_ci
        $data_sql="ALTER TABLE <code>{$wpdb->prefix}cp</code> CHANGE <code>data</code> <code>data</code> TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;";
        $data_done=$wpdb->query($data_sql);
        if($charset_done&&$type_done&&$data_done)
            update_option('wp_cp_has_be_updated',true);
    }

    detail:CubePoints mysql charset issue

  • The topic ‘some issues about CubePoints’ is closed to new replies.