+
T_FORUM
+
+
-
-
-
T_OFFLINEPLACEHOLDER
+
+
+
T_OFFLINEPLACEHOLDER
+
+
diff --git a/src/Mod/Start/StartPage/StartPage.js b/src/Mod/Start/StartPage/StartPage.js
index 238a5ed65a..2f8f39b17b 100644
--- a/src/Mod/Start/StartPage/StartPage.js
+++ b/src/Mod/Start/StartPage/StartPage.js
@@ -1,5 +1,5 @@
var allowDownloads = 0;
-
+var showForum = 0;
function toggle(tab) {
@@ -36,13 +36,15 @@ function load() {
tobj.buildScriptTag(); // Build the script tag
tobj.addScriptTag(); // Execute (add) the script tag
ddiv.innerHTML = "Downloading addons list...";
- // load forum recent posts
- ddiv = document.getElementById("forum");
- ddiv.innerHTML = "Connecting...";
- var tobj=new JSONscriptRequest('https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fforum.freecadweb.org%2Ffeed.php&api_key=s9yqcsrevp9irkqworzmvnrjs4jotjac2g4ybs95&callback=printForum');
- tobj.buildScriptTag(); // Build the script tag
- tobj.addScriptTag(); // Execute (add) the script tag
- ddiv.innerHTML = "Downloading addons list...";
+ if (showForum == 1) {
+ // load forum recent posts
+ ddiv = document.getElementById("forum");
+ ddiv.innerHTML = "Connecting...";
+ var tobj=new JSONscriptRequest('https://www.freecadweb.org/xml-to-json.php?callback=printForum&url=https://forum.freecadweb.org/feed.php');
+ tobj.buildScriptTag(); // Build the script tag
+ tobj.addScriptTag(); // Execute (add) the script tag
+ ddiv.innerHTML = "Downloading addons list...";
+ }
}
}
@@ -88,8 +90,8 @@ function printForum(data) {
ddiv.innerHTML = "Received";
var html = ['
');
diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py
index 83f29ac82d..31b0cdaea7 100644
--- a/src/Mod/Start/StartPage/StartPage.py
+++ b/src/Mod/Start/StartPage/StartPage.py
@@ -329,7 +329,7 @@ def handle():
UL_WORKBENCHES = '
'
FreeCAD.getResourceDir()
- for wb in FreeCADGui.listWorkbenches().keys():
+ for wb in sorted(FreeCADGui.listWorkbenches().keys()):
if wb.endswith("Workbench"):
wn = wb[:-9]
if wb in iconbank:
@@ -353,7 +353,7 @@ def handle():
iconbank[wb] = img
UL_WORKBENCHES += ''
UL_WORKBENCHES += '
'
HTML = HTML.replace("UL_WORKBENCHES",UL_WORKBENCHES)
@@ -390,6 +390,11 @@ def handle():
if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("AllowDownload",False):
HTML = HTML.replace("var allowDownloads = 0;","var allowDownloads = 1;")
+ # enable or disable forum
+
+ if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowForum",False):
+ HTML = HTML.replace("var showForum = 0;","var showForum = 1;")
+ HTML = HTML.replace("display: none; /* forumbox */","display: block; /* forumbox */")
# encode if necessary