From f53154a4318f52dd330e291d8853884b8183819b Mon Sep 17 00:00:00 2001 From: hauke Date: Wed, 29 Apr 2015 20:31:16 +0200 Subject: [PATCH 1/7] Pageheader addon now accepts bbcode --- pageheader/pageheader.css | 2 ++ pageheader/pageheader.php | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pageheader/pageheader.css b/pageheader/pageheader.css index 49232cfa..24608edb 100755 --- a/pageheader/pageheader.css +++ b/pageheader/pageheader.css @@ -7,6 +7,8 @@ #pageheader-words { float: left; margin-top: 10px; + width: 400px; + height: 150px; } #pageheader-submit { diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php index 947926cd..068b6cc9 100755 --- a/pageheader/pageheader.php +++ b/pageheader/pageheader.php @@ -6,9 +6,13 @@ * Description: Inserts a page header * Version: 1.0 * Author: Keith Fernie + * Hauke Altmann * */ +require_once('include/bbcode.php'); +require_once('mod/proxy.php'); + function pageheader_install() { register_hook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch'); register_hook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings'); @@ -49,7 +53,8 @@ function pageheader_addon_settings(&$a,&$s) { $s .= '
'; $s .= '

' . t('"pageheader" Settings') . '

'; $s .= '
'; $s .= '
'; @@ -73,9 +78,9 @@ function pageheader_fetch($a,&$b) { $a->page['htmlhead'] .= '' . "\r\n"; - $s = get_config('pageheader','text'); + $s = proxy_parse_html(bbcode(get_config('pageheader', 'text'), true)); if(! $s) $s = ''; if ($s != '') - $b .= ''; + $b .= ''; } From 28ac912e51e0a6e1b6e3efe626423185803ef6e1 Mon Sep 17 00:00:00 2001 From: hauke Date: Wed, 29 Apr 2015 20:38:04 +0200 Subject: [PATCH 2/7] documentation update, updated archive file --- pageheader.tgz | Bin 2653 -> 3711 bytes pageheader/README | 2 ++ pageheader/pageheader.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) mode change 100755 => 100644 pageheader.tgz diff --git a/pageheader.tgz b/pageheader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b1752b..613affbd 100755 --- a/pageheader/README +++ b/pageheader/README @@ -3,3 +3,5 @@ Page Header For server admins only. Displays a text message for system announcements' The message is entered in the admin account at settings, Plugin settings. + +BBcode can be used to format text or add links. diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php index 068b6cc9..1e71dec4 100755 --- a/pageheader/pageheader.php +++ b/pageheader/pageheader.php @@ -4,7 +4,7 @@ /** * Name: Page Header * Description: Inserts a page header - * Version: 1.0 + * Version: 1.1 * Author: Keith Fernie * Hauke Altmann * From 9e8edd103d9803721045df0efb535d5e4bee9ae8 Mon Sep 17 00:00:00 2001 From: hauke Date: Wed, 13 May 2015 22:28:09 +0200 Subject: [PATCH 3/7] Pledgie addon allows to configure the Pledgie campaign to use --- pledgie/pledgie.css | 28 ++++++++++++++++ pledgie/pledgie.php | 82 +++++++++++++++++++++++++++++++++++++++------ 2 files changed, 100 insertions(+), 10 deletions(-) create mode 100755 pledgie/pledgie.css diff --git a/pledgie/pledgie.css b/pledgie/pledgie.css new file mode 100755 index 00000000..9cb9896d --- /dev/null +++ b/pledgie/pledgie.css @@ -0,0 +1,28 @@ +#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 index c88dcbeb..af72a45f 100644 --- a/pledgie/pledgie.php +++ b/pledgie/pledgie.php @@ -1,17 +1,79 @@ - * Status: Unsupported - * */ + * Name: Pledgie + * Description: Show link to Friendica pledgie account for donating + * Version: 1.1 + * Author: tony baldwin + * Hauke Altmann + * + */ -function pledgie_install() { register_hook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active'); } +function pledgie_install() { + register_hook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active'); + register_hook('plugin_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings'); + register_hook('plugin_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post'); +} +function pledgie_uninstall() { + unregister_hook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active'); + unregister_hook('plugin_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings'); + unregister_hook('plugin_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post'); +} -function pledgie_uninstall() { unregister_hook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active'); } +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 = get_config('pledgie-campaign','text'); + $describe = get_config('pledgie-describe','text'); + + if(! $campaign) + $campaign = ''; + + if(! describe) + $describe = ''; + + $s .= '
'; + $s .= '

' . 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']) { + set_config('pledgie-describe','text',trim(strip_tags($_POST['pledgie-describe']))); + set_config('pledgie-campaign','text',trim(strip_tags($_POST['pledgie-campaign']))); + info( t('pledgie Settings saved.') . EOL); + } +} function pledgie_active(&$a,&$b) { - //$b .= '
\'Click
'; -} + $campaign = get_config('pledgie-campaign','text'); + $describe = get_config('pledgie-describe','text'); + $b .= '
'; + $b .= $describe . '
\'Click
'; +} \ No newline at end of file From 76dd616a5cb8b5f0ca7f1d78de197da500e78b00 Mon Sep 17 00:00:00 2001 From: hauke Date: Wed, 13 May 2015 22:30:10 +0200 Subject: [PATCH 4/7] created new archive file --- pledgie.tgz | Bin 586 -> 1375 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/pledgie.tgz b/pledgie.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13 May 2015 22:51:00 +0200 Subject: [PATCH 5/7] pageheader plugin now allows to use a html file for pageheader --- pageheader.tgz | Bin 3711 -> 0 bytes pageheader/README | 3 ++- pageheader/pageheader.php | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) delete mode 100644 pageheader.tgz diff --git a/pageheader.tgz b/pageheader.tgz deleted file mode 100644 index 8b3a5b100c94253e212a22c88ba5c54c01a93794..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3711 zcmV-_4uJ6=iwFSFBtcaG1MMAMZ{x=CUM(R1VNZ5WQesLZC0Q5Q@||<`B}VM?!S)qs zbAhlTSJKAhQsplFl^hTxXrEfNk9{ec00n|Pq$t`1C;~KnaPxlm8=AK0zvwPWeVC#p z>x=Rw9Nby_n4Q_LnVp@TUAABYH4)U2oiiY5( z@EGaYF3EY<#E%oYEt8uW4=xX-Qt@i}7xLoEzoM?FT>kUs$hE1>@o zoqj(Uq5XaRUnr@Cxc#GmVEbd1GZCfyDIfi<>F^jb{wphaH6Z^bMV907KMGg`8=ISZ zk3hE{Bo@H~t954MMw5Z`gABhvY+?%P*g$~)>R1fxHHRS`I7AHTtcmz&ZX#e{4H1d} zr0%naHbz9p8tkDCpsrhlKhTc&vn(g>{X4WFp$24@P0ReY4r?|(JvG6aca=Rg?>9_{ zjjU#w>&rmpIwE1x2G+UpATD^G#8vXKZM}~)CT;7|PmoQqMarPw&c{>2G4@f*vYE6i z5=(D74JsX4W#GPgymu%)un}ZDnY0NRDhoz=NmeDb1mt2_RwTJ7%RaKSkB%|DgjzpP zPm|$1iftagP21D8LeN+4w$TR|xFh9?Co+zCXX44Ck^i9nx2?I3|Gxe&l=As_{Eq^H z?eES1r^{n>`>&W+SK{`M0{ZO#`O1IS{+HwSj{<`2ug!P<*U|rR`$q%8_HP+CL;mw| z`$qyH`hU94|69ZT|9M#n`u`QB5YPXkfHD04ftMQ%%hs*;2d)Ynh}r1Ks{-#>gd&?y zvD-Wd&{6LkEM7L47((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..9ba60788 100755 --- a/pageheader/README +++ b/pageheader/README @@ -4,4 +4,5 @@ For server admins only. Displays a text message for system announcements' The message is entered in the admin account at settings, Plugin settings. -BBcode can be used to format text or add links. +If you want to use HTML in the pageheader, create a file called pageheader.html +in the document root of your friendica instance and add the html there. diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php index 1e71dec4..33853954 100755 --- a/pageheader/pageheader.php +++ b/pageheader/pageheader.php @@ -75,10 +75,16 @@ function pageheader_addon_settings_post(&$a,&$b) { } function pageheader_fetch($a,&$b) { + + if(file_exists('pageheader.html')){ + $s = file_get_contents('pageheader.html'); + } else { + $s = get_config('pageheader', 'text'); + } $a->page['htmlhead'] .= '' . "\r\n"; - $s = proxy_parse_html(bbcode(get_config('pageheader', 'text'), true)); + if(! $s) $s = ''; if ($s != '') From d067044f43cc27e7eb647123aa77ed7bef41db54 Mon Sep 17 00:00:00 2001 From: hauke Date: Wed, 13 May 2015 22:52:06 +0200 Subject: [PATCH 6/7] added pageheader archive file --- pageheader.tgz | Bin 0 -> 3773 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pageheader.tgz diff --git a/pageheader.tgz b/pageheader.tgz new file mode 100644 index 0000000000000000000000000000000000000000..209180332763abb40564368ea7fc282667ee9d94 GIT binary patch literal 3773 zcmV;u4npxCiwFP)xl>gD1MMAMZyU$auOg8Du%;E0OmyVkkrW+Dl&xBFEJU&lNiNXF z0kOPWk{ccO*xNmQB?f{7?Nf{Pu`fjvpg@p^6h)f=MS!LcO5W|?P`5?@MR)Imq>d+2 z{Lqn3Zje~_F*mbcGdnvwvuwi#Y9gp3D`!B`$dQ^v%p7GFCJmZxH`_NR2U(VvmkWUZ zRZ2y<_pb}8q5?%Ns{BGO6%`;}tN9y1o&xWoU{eMyUX&)Z577X;Vej3lfX?4n1Xl0z zK7K9nT4E7OYhJg%n|zvVcgDrjB-lrci5JQDKm{a|D*^0%yVkcmiTc(w`X$K#)Hd4sZ_jN{)N1F@~^1NDwqF!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 2015 23:21:27 +0200 Subject: [PATCH 7/7] removed unneeded require statements --- pageheader/pageheader.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php index 33853954..7c65f8b5 100755 --- a/pageheader/pageheader.php +++ b/pageheader/pageheader.php @@ -10,9 +10,6 @@ * */ -require_once('include/bbcode.php'); -require_once('mod/proxy.php'); - function pageheader_install() { register_hook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch'); register_hook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');