From 3acfcd4a95c81d91830c92992e76ef4c5fa9034e Mon Sep 17 00:00:00 2001 From: "Roman Schmerold (BNoiZe)" Date: Sun, 1 Jun 2014 18:46:15 +0200 Subject: [PATCH] Adding a custom newsfeed to the customer-dashboard, fixes #1408 Signed-off-by: Roman Schmerold (BNoiZe) --- actions/admin/settings/100.panel.php | 18 ++++++++++++++ css/.DS_Store | Bin 0 -> 6148 bytes customer_index.php | 2 ++ install/froxlor.sql | 2 ++ .../updates/froxlor/0.9/update_0.9.inc.php | 11 +++++++++ .../preconfig/0.9/preconfig_0.9.inc.php | 10 ++++++++ js/.DS_Store | Bin 0 -> 6148 bytes lib/.DS_Store | Bin 0 -> 12292 bytes lib/ajax.php | 6 ++++- lib/classes/.DS_Store | Bin 0 -> 6148 bytes lib/functions/froxlor/.DS_Store | Bin 0 -> 6148 bytes lib/navigation/.DS_Store | Bin 0 -> 6148 bytes lib/tables.inc.php | 2 +- lng/.DS_Store | Bin 0 -> 6148 bytes lng/english.lng.php | 4 +++ lng/german.lng.php | 4 +++ templates/Sparkle/.DS_Store | Bin 0 -> 6148 bytes templates/Sparkle/assets/css/.DS_Store | Bin 0 -> 6148 bytes templates/Sparkle/assets/img/.DS_Store | Bin 0 -> 6148 bytes templates/Sparkle/assets/js/main.js | 8 ++++-- templates/Sparkle/customer/.DS_Store | Bin 0 -> 6148 bytes templates/Sparkle/customer/index/index.tpl | 23 ++++++++++++++++-- 22 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 css/.DS_Store create mode 100644 js/.DS_Store create mode 100644 lib/.DS_Store create mode 100644 lib/classes/.DS_Store create mode 100644 lib/functions/froxlor/.DS_Store create mode 100644 lib/navigation/.DS_Store create mode 100644 lng/.DS_Store create mode 100644 templates/Sparkle/.DS_Store create mode 100644 templates/Sparkle/assets/css/.DS_Store create mode 100644 templates/Sparkle/assets/img/.DS_Store create mode 100644 templates/Sparkle/customer/.DS_Store diff --git a/actions/admin/settings/100.panel.php b/actions/admin/settings/100.panel.php index 7c390e3f..690081b9 100644 --- a/actions/admin/settings/100.panel.php +++ b/actions/admin/settings/100.panel.php @@ -202,6 +202,24 @@ return array( 'default' => true, 'save_method' => 'storeSettingField', ), + 'customer_show_news_feed' => array( + 'label' => $lng['admin']['customer_show_news_feed'], + 'settinggroup' => 'customer', + 'varname' => 'show_news_feed', + 'type' => 'bool', + 'default' => true, + 'save_method' => 'storeSettingField', + ), + 'customer_news_feed_url' => array( + 'label' => $lng['admin']['customer_news_feed_url'], + 'settinggroup' => 'customer', + 'varname' => 'news_feed_url', + 'type' => 'string', + 'string_type' => 'url', + 'string_emptyallowed' => true, + 'default' => '', + 'save_method' => 'storeSettingField', + ), 'panel_allow_domain_change_admin' => array( 'label' => $lng['serversettings']['panel_allow_domain_change_admin'], 'settinggroup' => 'panel', diff --git a/css/.DS_Store b/css/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0'; + $question.= 'You have to set the URL for your RSS-feed here, if you have choosen to enable the custom newsfeed on the customer-dashboard: '; + $question.= '
'; + eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); + } + } diff --git a/js/.DS_Store b/js/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4cacc4a561fe8bba829b810162b749575cc1863b GIT binary patch literal 6148 zcmeHK%}(1u5S|U8*aCqo^#HfMamm5_h#av3oO-F`3JwH;El0$X<&9#eIfO_)wxxX! zL|=l(;LwL*W_J?-fg3_7nvrI|+44pUrnFDeJW<1z z8stgQ4vq69P0Fqw)H-ll$36GfN26VTt0A|W+vA2DHJg4z?(X^Hv3KV>8=E`(Ut@Lk z^Vjd|KYwp-4c!9&Of8=+PT(IJ&sP2;?B|)vFEKKynq)IF1Iz$3Fi#BFJ%fMtj})&HlAuj*2|{Txuvi(y2#PSJh^AE7Cx$TP=$AGx zuvi&1v!h??bP$0-ZkYjQ;3)$Ort8u9fAsqM|7j8Tm;q*Bt{4#Y z!|vBA{vDh8cKQ G1|9(2I$F&D literal 0 HcmV?d00001 diff --git a/lib/.DS_Store b/lib/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..0bad3fad633b7967f07c403927908c3396b286ea GIT binary patch literal 12292 zcmeI1zi-n(6vyASg~ly{ATbmcEFpdjMM~3(b^)RgCWM3(LY0U;Qp! zJo3YB1b!>Z<-UuN(XkUJ$1|2?ow81!v7VG`vQv(nsNE_$&ByfVffLnSv;R=aU~k`X zANkeJa`xOE8AgsDR+}o=_p0c!wCIPP>=b1?^jb@0J-Fz5QB5T^19;kuwVa(=U!Tj( zOxyYS{KmAsK0lwEw&!l-Ha4^ax)BMxQa(e z{UolBgb<#B538yV=sinJt=QR2_w1?u`tAM|^h?dzQ-6?WY!)Ln<(xom5}Hs~8msu7 z@&;9Y^wa$MG;UpAq;$#o`V{W#7uWZb@>!^>jT|cwAxR<{XE^%ybFx>0wuD>>$`ZU{ zx-vVYYXX%xu%=em+0~}sq8-+&Fu#z;t8jMVuUv(R^N)SI;ns2*r{3CZU;K56a3=HY zt|^|wt^cq^6P4=La=TU2Sm$+rNJiz|VgLo;xPM1egF5 bU;<2l2`~XBzyz286JP>NfC(^xV@=>U9E4>= literal 0 HcmV?d00001 diff --git a/lib/ajax.php b/lib/ajax.php index ab8a6816..03df366f 100644 --- a/lib/ajax.php +++ b/lib/ajax.php @@ -25,7 +25,11 @@ if(isset($_POST['action'])) { } if ($action == "newsfeed") { - $feed = "http://inside.froxlor.org/news/"; + if (isset($_GET['url'])) { + $feed = $_GET['url']; + } else { + $feed = "http://inside.froxlor.org/news/"; + } if (function_exists("simplexml_load_file") == false) { die(); diff --git a/lib/classes/.DS_Store b/lib/classes/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..d4389600d970150c5fb198434fce1c2b85f5b92e GIT binary patch literal 6148 zcmeHKy-ve05VqR_i9iq}hO&8M=@5QIN1{?D7Nj5;0F^|kXrvIMHl;(Ul#$=}K=2Yg z1_KYno$Xdsg@pm3>P|X;=kuK{e~ElHV~p3j(K=%eW6T0YEZER|BRGyaAqC?>s*D2459xq5lxQ&$N+x361!vpi&^sZ`-N9Y+{s+`ofnFwnb|qZw(SLbamhaOTe9b8 zLDucmg7yja4uY%|8v9VnWMl{7QQYh`oRwXfW-DEQj;17ENj^fr`+#vx$70NQQa6+M88^fD`IQg9Soc|+ge@Q+}RK1&F$U&!{gKQ zizb@GKdEHd;1FKH814DmZ>Nb&FTgj9AI1?91H=F^Fs%%j^Uj)|)(z6Whyh~Y*9_qK zAV3j4gSkd^bU=gGM;tF9qJWKW2}EJgGni|H5fH9Z0d*=jPYkZp!7oglXE4{O(-~JQ z!#rkXZeA!{tqy*n!Ws88QcDaF1LF)7b=SfAzxVU|e>{nL!~iicRSfV_-LKbROQyC? xYz}L!06hmq!MI%GCH1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0^;c!DCaFo2p0kO--0vPaBpybv=3JOr=61Mt~C zwLOwDRtVYA`AdBE`R>ap&JmHDR@sDTOhiL8#?Ap$i*P@;hIE2u1avaS!~M-Ex8#oETe3&}QT{{T@7UCHs*t~=0;^xpV>Ac)JZ|&Z%;RHp{=~yH z$Jxwfw@);mZY=|uG6swRV_;7Vpk}iSj}%QC1IB+ju=kEVfVo=30Ny?I629TaYAMnPAE>Y!|uhMT%u^& z7%&E62DH1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T03Z5S{S@f{mqRuHX%V=n1@lpdf;*plH37=kjR2`83O7r-kwcCNG)HOUNsB zc0@#%xBWt7CL$BKp*(Epo9&zTY>*KJ!g0p+zPU7~b93nBz6%(4EJxYNS(*;tc4$<9 z3Qz$mKn1A4rxnNwJDGm^V4g<>sKC!FVBd!VH>`Bxq5@RluN2VHYO`A6Nm*NakF#1^;9I!mJmF@TI|YN6W1yE~EUX;QJt^{v&9Pq- U+d!uy?sOo3222+k75KISFBrfS)c^nh literal 0 HcmV?d00001 diff --git a/templates/Sparkle/assets/js/main.js b/templates/Sparkle/assets/js/main.js index b9147e6c..2bab8d7d 100644 --- a/templates/Sparkle/assets/js/main.js +++ b/templates/Sparkle/assets/js/main.js @@ -28,13 +28,17 @@ $(document).ready(function() { // Load Newsfeed var ajax_load = "
Loading newsfeed...
"; - $("#newsfeeditems").html(ajax_load).load("lib/ajax.php?action=newsfeed", function() { + var url = ""; + if (typeof $("#newsfeed").data("url") !== "undefined") { + url = "&url=" + $("#newsfeed").data("url"); + } + $("#newsfeeditems").html(ajax_load).load("lib/ajax.php?action=newsfeed" + url, function() { if ($("#newsfeeditems").html().length > 0) { $(window).trigger('resize'); $("#newsfeed").slideDown(); } }); - + // Enable Infobubbles $(".tipper").tipper({ direction: "right" diff --git a/templates/Sparkle/customer/.DS_Store b/templates/Sparkle/customer/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..45f101613410fe6b9b1bdb6d7b2c2099ef6d7207 GIT binary patch literal 6148 zcmeH~O-chn5QVEWLLdlPX4ywDH)z7-1i65a2_hKd!hp-!d5BykcMxyns~^R27?&>O z6;!|J>Z)$$TTD%hh^~(9Qe-Y7Q@E+T+AuU*Hy_wVMoiWBczL*6ZnlU0(;#;&V6|6r zFOSm7PJYziocgQ#L({a!=dH-w_4$2lOU6ln1W14cNPq->A%LE3Hl2lXBmoj2fiD8~ zeJF6#n%af>rvrmu0iY9v-SF&p323nZw5E2Uh`=;Tp;4-N#n326ykuTY?Lwnm)KA7f zd9vmWMg4Tdi>Hg$P>v)(0(}CPF`ZlgU&BZ4|NSD)NPq
+ + + + + + + + + +
News
+
+ @@ -174,10 +186,17 @@ $header + +
{$lng['customer']['services']}: $services_enabled
+ + + - + - + + +
{$lng['index']['customerdetails']}{$lng['index']['customerdetails']}
{$lng['customer']['customernumber']}: {$userinfo['customernumber']}