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 00000000..5008ddfc Binary files /dev/null and b/css/.DS_Store differ diff --git a/customer_index.php b/customer_index.php index cea66902..dbe61d99 100644 --- a/customer_index.php +++ b/customer_index.php @@ -93,6 +93,8 @@ if ($page == 'overview') { if ($userinfo['perlenabled'] == '1') $se[] = "Perl/CGI"; $services_enabled = implode(", ", $se); + $news_feed_url = Settings::Get('customer.news_feed_url'); + eval("echo \"" . getTemplate('index/index') . "\";"); } elseif ($page == 'change_password') { if (isset($_POST['send']) && $_POST['send'] == 'send') { diff --git a/install/froxlor.sql b/install/froxlor.sql index 392d9cd3..b2e64de8 100644 --- a/install/froxlor.sql +++ b/install/froxlor.sql @@ -341,6 +341,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('customer', 'ftpprefix', 'ftp'), ('customer', 'mysqlprefix', 'sql'), ('customer', 'ftpatdomain', '0'), + ('customer', 'show_news_feed', '0'), + ('customer', 'news_feed_url', ''), ('ticket', 'noreply_email', 'NO-REPLY@SERVERNAME'), ('ticket', 'worktime_all', '1'), ('ticket', 'worktime_begin', '00:00'), diff --git a/install/updates/froxlor/0.9/update_0.9.inc.php b/install/updates/froxlor/0.9/update_0.9.inc.php index 6202f019..7b0ed368 100644 --- a/install/updates/froxlor/0.9/update_0.9.inc.php +++ b/install/updates/froxlor/0.9/update_0.9.inc.php @@ -2770,3 +2770,14 @@ if (isFroxlorVersion('0.9.32-rc3')) { showUpdateStep("Updating from 0.9.32-rc3 to 0.9.32 final", false); updateToVersion('0.9.32'); } + +if (isFroxlorVersion('0.9.32')) { + showUpdateStep("Updating from 0.9.32 to 0.9.33-dev1", false); + + showUpdateStep("Adding settings for custom newsfeed on customer-dashboard"); + Settings::AddNew("customer.show_news_feed", isset($_POST['customer_show_news_feed']) ? (int)$_POST['customer_show_news_feed'] : '0'); + Settings::AddNew("customer.news_feed_url", isset($_POST['customer_news_feed_url']) ? $_POST['customer_news_feed_url'] : ''); + lastStepStatus(0); + + updateToVersion('0.9.33-dev1'); +} diff --git a/install/updates/preconfig/0.9/preconfig_0.9.inc.php b/install/updates/preconfig/0.9/preconfig_0.9.inc.php index f830de38..a408b41c 100644 --- a/install/updates/preconfig/0.9/preconfig_0.9.inc.php +++ b/install/updates/preconfig/0.9/preconfig_0.9.inc.php @@ -658,4 +658,14 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) { eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } + if (versionInUpdate($current_version, '0.9.33-dev1')) { + $has_preconfig = true; + $description = 'You can enable/disable the display/usage of the custom newsfeed for customers.

'; + $question = 'Do you want to enable the custom newsfeed for customer? (default: no): '; + $question.= makeyesno('customer_show_news_feed', '1', '0', '0').'
'; + $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 00000000..4cacc4a5 Binary files /dev/null and b/js/.DS_Store differ diff --git a/lib/.DS_Store b/lib/.DS_Store new file mode 100644 index 00000000..0bad3fad Binary files /dev/null and b/lib/.DS_Store differ 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 00000000..d4389600 Binary files /dev/null and b/lib/classes/.DS_Store differ diff --git a/lib/functions/froxlor/.DS_Store b/lib/functions/froxlor/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/lib/functions/froxlor/.DS_Store differ diff --git a/lib/navigation/.DS_Store b/lib/navigation/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/lib/navigation/.DS_Store differ diff --git a/lib/tables.inc.php b/lib/tables.inc.php index 4742169d..8f493600 100644 --- a/lib/tables.inc.php +++ b/lib/tables.inc.php @@ -51,6 +51,6 @@ define('TABLE_PANEL_DOMAIN_SSL_SETTINGS', 'domain_ssl_settings'); define('TABLE_DOMAINTOIP', 'panel_domaintoip'); // VERSION INFO -$version = '0.9.32'; +$version = '0.9.33-dev1'; $dbversion = '2'; $branding = ''; diff --git a/lng/.DS_Store b/lng/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/lng/.DS_Store differ diff --git a/lng/english.lng.php b/lng/english.lng.php index 1f5e88ee..7043d8b9 100644 --- a/lng/english.lng.php +++ b/lng/english.lng.php @@ -1818,3 +1818,7 @@ $lng['error']['cannotdeletedefaultphpconfig'] = 'This PHP-configuration is set a $lng['serversettings']['system_cron_allowautoupdate']['title'] = 'Allow automatic database updates'; $lng['serversettings']['system_cron_allowautoupdate']['description'] = '
ATTENTION:
This settings allows the cronjob to bypass the version-check of froxlors files and database and runs the database-updates in case a version-mismatch occurs.

Auto-update will always set default values for new settings or changes. This might not always suite your system. Please think twice before activating this option
'; $lng['error']['passwordshouldnotbeusername'] = 'The password should not be the same as the username.'; + +// Added in Froxlor 0.9.33 +$lng['admin']['customer_show_news_feed'] = "Show custom newsfeed on customer-dashboard"; +$lng['admin']['customer_news_feed_url'] = "RSS-Feed for the custom newsfeed"; diff --git a/lng/german.lng.php b/lng/german.lng.php index 0202baea..3072c990 100644 --- a/lng/german.lng.php +++ b/lng/german.lng.php @@ -1542,3 +1542,7 @@ $lng['error']['cannotdeletedefaultphpconfig'] = 'Diese PHP-Konfiguration ist als $lng['serversettings']['system_cron_allowautoupdate']['title'] = 'Erlaube automatische Datenbank-Aktualisierungen'; $lng['serversettings']['system_cron_allowautoupdate']['description'] = '
WARNUNG:
Diese Einstellung erlaubt es dem Cronjob die Prüfung der Dateien- und Datenbank-Version zu umgehen und bei einem Versions-Unterschied die Datenbank-Aktualisierungen automatisiert auszuführen.

Das automatische Update setzt für neue Einstellungen und Änderungen immer die default-Werte. Diese müssen nicht zwingend zu dem genutzten System passen. Bitte zwei mal nachdenken, bevor diese Option aktiviert wird.
'; $lng['error']['passwordshouldnotbeusername'] = 'Das Passwort sollte nicht mit dem Benutzernamen übereinstimmen.'; + +// Added in Froxlor 0.9.33 +$lng['admin']['customer_show_news_feed'] = "Zeige benutzerdefinierten Newsfeed im Kunden-Dashboard"; +$lng['admin']['customer_news_feed_url'] = "RSS-Feed für den benutzerdefinierten Newsfeed"; diff --git a/templates/Sparkle/.DS_Store b/templates/Sparkle/.DS_Store new file mode 100644 index 00000000..9c5e162c Binary files /dev/null and b/templates/Sparkle/.DS_Store differ diff --git a/templates/Sparkle/assets/css/.DS_Store b/templates/Sparkle/assets/css/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/templates/Sparkle/assets/css/.DS_Store differ diff --git a/templates/Sparkle/assets/img/.DS_Store b/templates/Sparkle/assets/img/.DS_Store new file mode 100644 index 00000000..d8d844af Binary files /dev/null and b/templates/Sparkle/assets/img/.DS_Store differ 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 00000000..45f10161 Binary files /dev/null and b/templates/Sparkle/customer/.DS_Store differ diff --git a/templates/Sparkle/customer/index/index.tpl b/templates/Sparkle/customer/index/index.tpl index aea2c088..7b6681ea 100644 --- a/templates/Sparkle/customer/index/index.tpl +++ b/templates/Sparkle/customer/index/index.tpl @@ -149,6 +149,18 @@ $header
+ + + + + + + + + +
News
+
+ @@ -174,10 +186,17 @@ $header + +
{$lng['customer']['services']}: $services_enabled
+ + + - + - + + +
{$lng['index']['customerdetails']}{$lng['index']['customerdetails']}
{$lng['customer']['customernumber']}: {$userinfo['customernumber']}