From 1312d1fc00cc79fad42dc956366a249e3b0a1d8c Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 7 May 2019 23:45:32 -0400 Subject: [PATCH] [pledgie] Service has been discontinued since January 2018 --- pledgie/README | 11 ----- pledgie/lang/C/messages.po | 0 pledgie/pledgie.css | 28 ------------- pledgie/pledgie.php | 82 -------------------------------------- 4 files changed, 121 deletions(-) delete mode 100644 pledgie/README delete mode 100644 pledgie/lang/C/messages.po delete mode 100644 pledgie/pledgie.css delete mode 100644 pledgie/pledgie.php diff --git a/pledgie/README b/pledgie/README deleted file mode 100644 index bcc7fe07..00000000 --- a/pledgie/README +++ /dev/null @@ -1,11 +0,0 @@ -Pledgie - -Allows administrators to add a Pledgie-Donation Button to all their friendica pages. -This could be useful f.e. for public nodes that want to raise some money for server -maintenance costs. - -Usage: -Add the campaign number of your pledgie campaign in the first field. To find out the campaign number, -go to your Pledgie campaign webpage. The campaign number is the number at the end of the URL. - -Add a describtion of your campaign in the second field. \ No newline at end of file diff --git a/pledgie/lang/C/messages.po b/pledgie/lang/C/messages.po deleted file mode 100644 index e69de29b..00000000 diff --git a/pledgie/pledgie.css b/pledgie/pledgie.css deleted file mode 100644 index 5195871c..00000000 --- a/pledgie/pledgie.css +++ /dev/null @@ -1,28 +0,0 @@ -#pledgie-label { - float: left; - width: 300px; - margin-top: 10px; -} - -#pledgie-campaign { - float: left; - margin-top: 10px; - width: 100px; -} - -#pledgie-describe { - float: left; - margin-top: 10px; - width: 300px; -} - -#pledgie-submit { - margin-top: 15px; -} - -.pledgie { - text-align: center; - width: 100%; - margin-top: 25px; - font-size: 20px; -} diff --git a/pledgie/pledgie.php b/pledgie/pledgie.php deleted file mode 100644 index 8a4378bc..00000000 --- a/pledgie/pledgie.php +++ /dev/null @@ -1,82 +0,0 @@ - - * Hauke Altmann - * - */ -use Friendica\Core\Config; -use Friendica\Core\Hook; -use Friendica\Core\L10n; - -function pledgie_install() { - Hook::register('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active'); - Hook::register('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings'); - Hook::register('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post'); -} - -function pledgie_uninstall() { - Hook::unregister('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active'); - Hook::unregister('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings'); - Hook::unregister('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post'); -} - -function pledgie_addon_settings(&$a,&$s) { - - if(! is_site_admin()) - return; - - /* Add our stylesheet to the page so we can make our settings look nice */ - - $a->page['htmlhead'] .= '' . "\r\n"; - - $campaign = Config::get('pledgie-campaign','text'); - $describe = Config::get('pledgie-describe','text'); - - if(! $campaign) - $campaign = ''; - - if(! describe) - $describe = ''; - - $s .= '
'; - $s .= '

' . L10n::t('"pledgie" Settings') . '

'; - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - $s .= '
'; - - return; -} - -function pledgie_addon_settings_post(&$a,&$b) { - - if(! is_site_admin()) - return; - - if($_POST['pledgie-submit']) { - Config::set('pledgie-describe','text',trim(strip_tags($_POST['pledgie-describe']))); - Config::set('pledgie-campaign','text',trim(strip_tags($_POST['pledgie-campaign']))); - info(L10n::t('pledgie Settings saved.') . EOL); - } -} - -function pledgie_active(&$a,&$b) { - $campaign = Config::get('pledgie-campaign','text'); - $describe = Config::get('pledgie-describe','text'); - $b .= '
'; - $b .= $describe . '
Click here to lend your support to: ' . $describe .  '!
'; -} -- 2.39.5