diff --git a/root/language/de/mods/portal/portal_donation_module.php b/root/language/de/mods/portal/portal_donation_module.php index 6bd0f8ae..ad192f0f 100644 --- a/root/language/de/mods/portal/portal_donation_module.php +++ b/root/language/de/mods/portal/portal_donation_module.php @@ -61,4 +61,5 @@ $lang = array_merge($lang, array( 'ACP_PORTAL_PAYPAL_SETTINGS_EXP' => 'Hier kannst du die Paypal Einstellungen ändern.', 'PORTAL_PAY_ACC' => 'Paypal Account', 'PORTAL_PAY_ACC_EXP' => 'Gib deine e-mail-Adresse an, die du bei Paypal benutzt, z.B. xxx@xxx.com', + 'PORTAL_PAY_CUSTOM' => 'Benutzername an die Paypal Zahlung anhängen', )); diff --git a/root/language/en/mods/portal/portal_donation_module.php b/root/language/en/mods/portal/portal_donation_module.php index e65d2b48..a7e0f654 100644 --- a/root/language/en/mods/portal/portal_donation_module.php +++ b/root/language/en/mods/portal/portal_donation_module.php @@ -61,4 +61,5 @@ $lang = array_merge($lang, array( 'ACP_PORTAL_PAYPAL_SETTINGS_EXP' => 'This is where you customize the Paypal block.', 'PORTAL_PAY_ACC' => 'Paypal account to use', 'PORTAL_PAY_ACC_EXP' => 'Enter your Paypal e-mail address eg. xxx@xxx.com', + 'PORTAL_PAY_CUSTOM' => 'Append username to Paypal donation', )); diff --git a/root/portal/modules/portal_donation.php b/root/portal/modules/portal_donation.php index b614f868..04ed6939 100644 --- a/root/portal/modules/portal_donation.php +++ b/root/portal/modules/portal_donation.php @@ -49,18 +49,24 @@ class portal_donation_module public function get_template_center($module_id) { - global $config, $template; + global $config, $template, $user; - $template->assign_var('PAY_ACC_CENTER', $config['board3_pay_acc_' . $module_id]); + $template->assign_vars(array( + 'PAY_ACC_CENTER' => $config['board3_pay_acc_' . $module_id], + 'PAY_CUSTOM_CENTER' => (!empty($config['board3_pay_custom_' . $module_id])) ? $user->data['username_clean'] : false, + )); return 'donation_center.html'; } public function get_template_side($module_id) { - global $config, $template; + global $config, $template, $user; - $template->assign_var('PAY_ACC_SIDE', $config['board3_pay_acc_' . $module_id]); + $template->assign_vars(array( + 'PAY_ACC_SIDE' => $config['board3_pay_acc_' . $module_id], + 'PAY_CUSTOM_SIDE' => (!empty($config['board3_pay_custom_' . $module_id])) ? $user->data['username_clean'] : false, + )); return 'donation_side.html'; } @@ -71,7 +77,8 @@ class portal_donation_module 'title' => 'ACP_PORTAL_PAYPAL_SETTINGS', 'vars' => array( 'legend1' => 'ACP_PORTAL_PAYPAL_SETTINGS', - 'board3_pay_acc_' . $module_id => array('lang' => 'PORTAL_PAY_ACC' , 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true), + 'board3_pay_acc_' . $module_id => array('lang' => 'PORTAL_PAY_ACC', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true), + 'board3_pay_custom_' . $module_id => array('lang' => 'PORTAL_PAY_CUSTOM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), ) ); } @@ -82,6 +89,7 @@ class portal_donation_module public function install($module_id) { set_config('board3_pay_acc_' . $module_id, 'your@paypal.com'); + set_config('board3_pay_custom_' . $module_id, true); return true; } @@ -91,6 +99,7 @@ class portal_donation_module $del_config = array( 'board3_pay_acc_' . $module_id, + 'board3_pay_custom_' . $module_id, ); $sql = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE ' . $db->sql_in_set('config_name', $del_config); diff --git a/root/styles/prosilver/template/portal/modules/donation_center.html b/root/styles/prosilver/template/portal/modules/donation_center.html index 6ccc85de..4544503d 100644 --- a/root/styles/prosilver/template/portal/modules/donation_center.html +++ b/root/styles/prosilver/template/portal/modules/donation_center.html @@ -3,45 +3,48 @@
  • - {SITENAME} {L_DONATION_TEXT} -
    -
    -
    -
    - - - - - - - - - - -
    -
    -
    - {L_PAY_MSG} -
    + {SITENAME} {L_DONATION_TEXT} +
    +
    +
    +
    + + + + + + + + + + + + + +
    +
    +
    + {L_PAY_MSG} +
  • diff --git a/root/styles/prosilver/template/portal/modules/donation_side.html b/root/styles/prosilver/template/portal/modules/donation_side.html index 3f4d4327..46c511bb 100644 --- a/root/styles/prosilver/template/portal/modules/donation_side.html +++ b/root/styles/prosilver/template/portal/modules/donation_side.html @@ -9,6 +9,9 @@ + + + + + + + + +