From cf4ba51ed64d019e24033fa35fa0b9cfd90293ac Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 29 Aug 2010 16:20:04 +0000 Subject: [PATCH] Added donation block; --- .../portal/portal_announcements_module.php | 4 +- .../portal/portal_birthday_list_module.php | 2 +- .../en/mods/portal/portal_clock_module.php | 2 +- .../en/mods/portal/portal_donation_module.php | 69 ++++++++++++ .../portal/portal_stylechanger_module.php | 2 +- .../mods/portal/portal_topposters_module.php | 4 +- root/portal/modules/portal_donation.php | 100 ++++++++++++++++++ .../portal/modules/donate_center.html | 39 ------- .../portal/modules/donation_center.html | 49 +++++++++ .../portal/modules/donation_side.html | 36 +++++++ .../prosilver/theme/images/portal/paypal.gif | Bin 0 -> 2923 bytes .../theme/images/portal/portal_donation.png | Bin 0 -> 738 bytes 12 files changed, 263 insertions(+), 44 deletions(-) create mode 100644 root/language/en/mods/portal/portal_donation_module.php create mode 100644 root/portal/modules/portal_donation.php delete mode 100644 root/styles/prosilver/template/portal/modules/donate_center.html create mode 100644 root/styles/prosilver/template/portal/modules/donation_center.html create mode 100644 root/styles/prosilver/template/portal/modules/donation_side.html create mode 100644 root/styles/prosilver/theme/images/portal/paypal.gif create mode 100644 root/styles/prosilver/theme/images/portal/portal_donation.png diff --git a/root/language/en/mods/portal/portal_announcements_module.php b/root/language/en/mods/portal/portal_announcements_module.php index 7c2b3cca..19f7be7a 100644 --- a/root/language/en/mods/portal/portal_announcements_module.php +++ b/root/language/en/mods/portal/portal_announcements_module.php @@ -1,6 +1,6 @@ 'Jump to first post', 'JUMP_TO_POST' => 'Jump to post', 'BACK' => 'Back', + + // ACP 'ACP_PORTAL_ANNOUNCE_SETTINGS' => 'Global announcements settings', 'ACP_PORTAL_ANNOUNCE_SETTINGS_EXPLAIN' => 'This is where you customize the global announcements block.', 'PORTAL_ANNOUNCEMENTS' => 'Display global announcements', diff --git a/root/language/en/mods/portal/portal_birthday_list_module.php b/root/language/en/mods/portal/portal_birthday_list_module.php index ffe79a07..0120c153 100644 --- a/root/language/en/mods/portal/portal_birthday_list_module.php +++ b/root/language/en/mods/portal/portal_birthday_list_module.php @@ -1,6 +1,6 @@ 'PayPal donations', + 'DONATION_TEXT' => 'is a group supplying services with no intention of any monetary profit. Your donations are welcome so that the cost of our server, domain name, etc. can be covered.', + 'PAY_MSG' => 'Please use a decimal point (not a comma) as the separator, e.g. 3.50', + 'PAY_ITEM' => 'Donate!', // paypal item + + 'AUD' => 'Australian Dollars (AUD)', + 'CAD' => 'Canadian Dollars (CAD)', + 'CZK' => 'Czech Koruna (CZK)', + 'DKK' => 'Danish Kroner (DKK)', + 'HKD' => 'Hong Kong Dollars (HKD)', + 'HUF' => 'Hungarian Forint (HUF)', + 'NZD' => 'New Zealand Dollars (NZD)', + 'NOK' => 'Norwegian Kroner (NOK)', + 'PLN' => 'Polish Zlotych (PLN)', + 'GBP' => 'British Pounds (GBP)', + 'SGD' => 'Singapore Dollars (SGD)', + 'SEK' => 'Swedish Kronor (SEK)', + 'CHF' => 'Swiss Francs (CHF)', + 'JPY' => 'Japanese Yen (JPY)', + 'USD' => 'U.S. Dollars (USD)', + 'EUR' => 'Euros (EUR)', + 'MXN' => 'Mexican Pesos (MXN)', + 'ILS' => 'Israeli New Shekels (ILS)', + + // ACP + 'ACP_PORTAL_PAYPAL_SETTINGS' => 'Paypal settings', + 'ACP_PORTAL_PAYPAL_SETTINGS_EXPLAIN' => 'This is where you customize the Paypal block.', + 'PORTAL_PAY_C_BLOCK' => 'Display paypal center block', + 'PORTAL_PAY_C_BLOCK_EXPLAIN' => 'Display this block on the portal.', + 'PORTAL_PAY_S_BLOCK' => 'Display paypal small block', + 'PORTAL_PAY_S_BLOCK_EXPLAIN' => 'Display this block on the portal.', + 'PORTAL_PAY_ACC' => 'Paypal account to use', + 'PORTAL_PAY_ACC_EXPLAIN' => 'Enter your Paypal e-mail address eg. xxx@xxx.com', +)); + +?> \ No newline at end of file diff --git a/root/language/en/mods/portal/portal_stylechanger_module.php b/root/language/en/mods/portal/portal_stylechanger_module.php index 5dd544be..c087b0ae 100644 --- a/root/language/en/mods/portal/portal_stylechanger_module.php +++ b/root/language/en/mods/portal/portal_stylechanger_module.php @@ -1,6 +1,6 @@ 'Top Posters', 'TOPPOSTERS_CONFIG' => 'Top Poster settings', + + // ACP 'NUM_TOPPOSTERS' => 'Number of Top Posters', - 'NUM_TOPPOSTERS_EXP' => 'Enter how many users should be displayed in the top posters block.', + 'NUM_TOPPOSTERS_EXP' => 'Enter how many users should be displayed in the top posters block.', )); ?> \ No newline at end of file diff --git a/root/portal/modules/portal_donation.php b/root/portal/modules/portal_donation.php new file mode 100644 index 00000000..40fbbfcc --- /dev/null +++ b/root/portal/modules/portal_donation.php @@ -0,0 +1,100 @@ +lang}/mods/portal/" + */ + var $language = 'portal_donation_module'; + + function get_template_center($module_id) + { + global $config, $template; + + $template->assign_var('PAY_ACC', $config['board3_pay_acc']); + + return 'donation_center.html'; + } + + function get_template_side($module_id) + { + global $config, $template; + + $template->assign_var('PAY_ACC', $config['board3_pay_acc']); + + return 'donation_side.html'; + } + + function get_template_acp($module_id) + { + return array( + 'title' => 'ACP_PORTAL_PAYPAL_SETTINGS', + 'vars' => array( + 'legend1' => 'ACP_PORTAL_PAYPAL_SETTINGS', + 'board3_pay_acc' => array('lang' => 'PORTAL_PAY_ACC' , 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true), + ) + ); + } + + /** + * API functions + */ + function install($module_id) + { + set_config('board3_pay_acc', 'your@paypal.com'); + return true; + } + + function uninstall($module_id) + { + global $db; + + $del_config = array( + 'board3_pay_acc', + ); + $sql = 'DELETE FROM ' . CONFIG_TABLE . ' + WHERE ' . $db->sql_in_set('config_name', $del_config); + return $db->sql_query($sql); + } +} + +?> \ No newline at end of file diff --git a/root/styles/prosilver/template/portal/modules/donate_center.html b/root/styles/prosilver/template/portal/modules/donate_center.html deleted file mode 100644 index 5120168b..00000000 --- a/root/styles/prosilver/template/portal/modules/donate_center.html +++ /dev/null @@ -1,39 +0,0 @@ - -{SITENAME} {L_DONATION_TEXT} -
-
-
-
- - - - - - - - - - -
-
-
-{L_PAY_MSG} \ No newline at end of file diff --git a/root/styles/prosilver/template/portal/modules/donation_center.html b/root/styles/prosilver/template/portal/modules/donation_center.html new file mode 100644 index 00000000..f86328fd --- /dev/null +++ b/root/styles/prosilver/template/portal/modules/donation_center.html @@ -0,0 +1,49 @@ + +{$C_BLOCK_H_L}
{L_DONATION}
{$C_BLOCK_H_R} + +{$C_BLOCK_F_L}{$C_BLOCK_F_R} \ No newline at end of file diff --git a/root/styles/prosilver/template/portal/modules/donation_side.html b/root/styles/prosilver/template/portal/modules/donation_side.html new file mode 100644 index 00000000..98f19fe0 --- /dev/null +++ b/root/styles/prosilver/template/portal/modules/donation_side.html @@ -0,0 +1,36 @@ + +{$LR_BLOCK_H_L} {L_DONATION}{$LR_BLOCK_H_R} +
+
+
+ + + + + + + + + + +
+
+
+{$LR_BLOCK_F_L}{$LR_BLOCK_F_R} \ No newline at end of file diff --git a/root/styles/prosilver/theme/images/portal/paypal.gif b/root/styles/prosilver/theme/images/portal/paypal.gif new file mode 100644 index 0000000000000000000000000000000000000000..0044501d82b7f3d4f2cb9ba534ac99c2cc267f60 GIT binary patch literal 2923 zcmV-x3zYOnNk%w1VMzci0QUy~IBT8%@Y?^mL&TO%|K`28xv}Ei$IJi##>Tq-^UeR@ zt50EjuZvXw+@;YM6#vR&Nq3_EswPKTdH?6Ya+9n7?8#b#rtr&>rIdDSd5izvsvtXN z|Jj`I#)bc|F)c)D|Mu4Z>bw5RfB(Eyl$)K3m6-p-RC$Gy>D#ye_t}c1wEx6d|GY?A zYlQ#hw*S<2qoIR0OKJbCE%3T$dvn_)x7`FjQ{S&*SmQCvO3bKX^3`P_|0|L)HJ>c#)`(EsSe-rB`9OK{k- zX8-8G<;#Wg<;ZGhWB;!+($d2JzgzU{%irJ4|G{DZ>c&1(by9t#|Enn3*2Mqhu%xM} z$<4z4pdA10&-3ED|E@0o?ZW@sfs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S`#W3QSPT7qCNF!g#?71W*G3s1gz^h$0|hsRmTiG99+W zWjb_ef@-p|2AFuIKFT570~{l& zk1)^z5Z}avNJT2eO$fjQWY~`op16sOTC@~0&?qeR(a{J1q7)t&DM@pPh@QrDqckn! zKVl(JSQ>Q=G^J@#AIa25-ZTkLsKN(6u!slT(2+*XDpHfW)TTy&7PQFfQIjgvSS0nV zXie)`V>!!enxK_$vkO7E10py9+0J_QvyW8+K`0x9(wg?ProBTIe85^B^y0K#h;3|9 zOWV``-eCZ*t*vfRdk2Daffc|Fu5g9xi+vc^xEtujaF@&6;qqV~zG$v=h1&&!oT3%j z&8~K}JAi%opcPTwhaIpxfG;p0yG|Iu6BzJ?Ct%kJ>_rB48L*EH$oC26b;5S{yWLX| z1R5gr15Ctzpu@76=!Va^T!9IpC0|(oI7ZkRI zhiRbVCZ{+L1TlpxrcC83SNQ|`@WPa7u#Y9Mm<+BE@;+QaVP24VA2ZN}9k9HQD!2mw z$GY%BeeF18E8DrsrXa{DUcu)+`?=4zFfN~;VO$~L7zwYyz&<_@=nuT2(Ze`f4p_W| zS5P?7LtcWWG4SV3``Lg0_yjCQP3lsU8VQT0LJlaL16WWY$K}8>6;SO6SkU?xi$(&4 zk#LRr3ZVmw#sHRoVd`R+`V$1v0uYwX>}E6j)eok^vM<16<2nKeudW3UaR8Wu)&&v}06T>Yz8wGn literal 0 HcmV?d00001 diff --git a/root/styles/prosilver/theme/images/portal/portal_donation.png b/root/styles/prosilver/theme/images/portal/portal_donation.png new file mode 100644 index 0000000000000000000000000000000000000000..42c52d05f6f8242e4de6fd953d9fcfcfcde81f3e GIT binary patch literal 738 zcmV<80v-K{P)kKmx=vV@a|w4d?1G z{A&|1yzGF~TZ8KHTl_r*T3@s<=A;pUk6t|eFbv0%74?%+OlCdki0e@06yy3x1%Foo zZA8IP3kLWJ+!ohD8&$%-Xu;s38IP9-L1$fP3CnTSerf$50rgDty6Lr^*!3d)Z5bO| z-!b-f1e)3AZ8+nCGAzU8!LrRAB^VQ3$5hYdKYA07xLVs{S`MaSy~ut|Ll;xQn;C~< zTE=EZ#ZWme+JuKV0b`<5t|FFt=DRug$%=#6R&beFSRGVu!=XktGv>d{p(*$PrItbs zC%{@V&UayoG-zyPh^uwrJq0zft&6HKksgOU)PPF&4Gy0B97SX;1Yuth&KvTM@H8_D zI|j&k17#5C^Q5`mXHM}n5yer~ z1v@0vf}XSMShQ`!KZ;`Qm@#H#oe^ U8%xtYa{vGU07*qoM6N<$f()ing#Z8m literal 0 HcmV?d00001