Chủ Nhật, 23 tháng 12, 2018

mysql: Error while executing group action [solved]

While installing XAMPP for Linux 7.2.13 on Puppy Linux, I received the following errors:
"mysql: Error while executing group action"

"Problem running post-install step. Installation may not compllete correctly
Error running chown -R root:mysql /opt/lampp/var/mysql:
chown: unknow user/group root:mysql
"

Seem that Xampp installer cannot create user "mysql" on Puppy Linux. So i create "mysql" user manual, re install XAMPP.
It work for me :).

To create user in Puppy Linux, open Terminal and type:
"adduser mysql"

Thứ Ba, 13 tháng 3, 2018

How to add new currency to LearnPress




To add new currency to LearnPress, you need add bellow code to functions.php file in your WordPress theme

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
# add currency in to LearnPress 
add_filter('learn_press_get_payment_currencies', 'my_cbf_learn_press_get_payment_currencies', 10, 1 ); // for LearnPress 2
add_filter('learn-press/currencies''my_cbf_learn_press_get_payment_currencies', 10, 1 ); // for LearnPress 3
function my_cbf_learn_press_get_payment_currencies( $currencies ){
    $currency_new = 'MCR'; # Currency Code
    $currency_name = __('My Currency (MCR)', 'learnpress'); # Full name of Currency    
    if( !isset($currencies[$currency_new]) || ( isset($currencies[$currency_new]) && $currencies[$currency_new] !== $currency_name ) ) {
        $currencies[$currency_new] = $currency_name;
    }
    return $currencies;
}
add_filter( 'learn_press_currency_symbol', 'my_cbf_learn_press_currency_symbol', 10, 2 );
function my_cbf_learn_press_currency_symbol( $currency_symbol, $currency ) {
    $currency_new = 'MCR'; # Currency Code
    if( $currency == $currency_new ) {
        $currency_symbol = '<i class="fa fa-thumbs-up"></i>'; # Symbol of currency
    }
    return $currency_symbol;
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Results:



How to disable alt + mouse click actions in JWM

In Puppy Linux , you can move windows by use Alt key with Right mouse click . Sometimes it's quite convenient, but it conflict with key...