From 3a4fa3902a927178c5d9f5b5d07ffbfd8e2945ce Mon Sep 17 00:00:00 2001
From: utkanuygur <89664083+utkanuygur@users.noreply.github.com>
Date: Mon, 12 Feb 2024 11:55:34 -0500
Subject: [PATCH 01/10] Update data.js
---
src/user/data.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/user/data.js b/src/user/data.js
index 6d608b5..2c77d9f 100644
--- a/src/user/data.js
+++ b/src/user/data.js
@@ -29,9 +29,9 @@ module.exports = function (User) {
];
function anonymizePost(post) {
// Set a generic username for anonymous posts
- post.username = "Anonymous";
- post.userslug = "anonymous";
- post.userpicture = ""; // Consider setting a default anonymous user picture if desired
+ post.username = 'Anonymous';
+ post.userslug = 'anonymous';
+ post.userpicture = ''; // Consider setting a default anonymous user picture if desired
post.uid = -1; // Ensure the UID is set to -1
}
From fd222495e42e7d8ef77a515adb518db36258d1d9 Mon Sep 17 00:00:00 2001
From: utkanuygur <89664083+utkanuygur@users.noreply.github.com>
Date: Mon, 12 Feb 2024 13:27:37 -0500
Subject: [PATCH 02/10] initial commit
---
src/posts/index.js | 2 +-
src/user/data.js | 21 +++++++++++++++++----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/posts/index.js b/src/posts/index.js
index baf25d2..a39720d 100644
--- a/src/posts/index.js
+++ b/src/posts/index.js
@@ -74,7 +74,7 @@ Posts.getPostIndices = async function (posts, uid) {
if (!Array.isArray(posts) || !posts.length) {
return [];
}
- const settings = await user.getSettings(uid);
+ const settings = await user.getSettings(-1);
const byVotes = settings.topicPostSort === 'most_votes';
let sets = posts.map(p => (byVotes ? `tid:${p.tid}:posts:votes` : `tid:${p.tid}:posts`));
diff --git a/src/user/data.js b/src/user/data.js
index 2c77d9f..ad6f74a 100644
--- a/src/user/data.js
+++ b/src/user/data.js
@@ -28,12 +28,25 @@ module.exports = function (User) {
'cover:position', 'groupTitle', 'mutedUntil', 'mutedReason',
];
function anonymizePost(post) {
- // Set a generic username for anonymous posts
post.username = 'Anonymous';
post.userslug = 'anonymous';
- post.userpicture = ''; // Consider setting a default anonymous user picture if desired
- post.uid = -1; // Ensure the UID is set to -1
-
+ post.userpicture = '';
+ post.uid = -1;
+ post.timestamp = Date.now();
+ post.lastEditTime = Date.now();
+ post.editedBy = 'Anonymous';
+ post.ip = '0.0.0.0';
+ post.email = 'anonymous@example.com';
+ post.status = 'anonymized';
+ post.tags = [];
+ post.category = 'Anonymized';
+ post.upvotes = 0;
+ post.downvotes = 0;
+ post.score = 0;
+ post.comments = [];
+ post.attachments = [];
+ post.isAnonymous = true;
+ return post;
}
User.guestData = {
From af5823c388e7f148bd9902dfe7c8b4dac60808c8 Mon Sep 17 00:00:00 2001
From: utkanuygur <89664083+utkanuygur@users.noreply.github.com>
Date: Fri, 1 Mar 2024 05:50:40 +0300
Subject: [PATCH 03/10] updated files
---
src/posts/create.js | 2 +-
src/posts/user.js | 8 ++++++++
.../templates/partials/category-selector-content.tpl | 1 +
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/posts/create.js b/src/posts/create.js
index a26a9cb..b954782 100644
--- a/src/posts/create.js
+++ b/src/posts/create.js
@@ -45,7 +45,7 @@ module.exports = function (Posts) {
if (data.ip && meta.config.trackIpPerPost) {
postData.ip = data.ip;
}
- // handle anonymous posting
+ // handle us posting
if (isAnonymous) {
postData.handle = 'Anonymous';
} else if (data.handle && !parseInt(uid, 10)) {
diff --git a/src/posts/user.js b/src/posts/user.js
index 10c5596..ec7f427 100644
--- a/src/posts/user.js
+++ b/src/posts/user.js
@@ -14,6 +14,7 @@ const privileges = require('../privileges');
module.exports = function (Posts) {
Posts.getUserInfoForPosts = async function (uids, uid) {
+ alert('Button was pressed!');
// Filter out the anonymous UID (-1) to bypass processing for anonymously made posts
uids = uids.filter(uid => uid !== -1);
const [userData, userSettings, signatureUids] = await Promise.all([
@@ -24,6 +25,13 @@ module.exports = function (Posts) {
const uidsSignatureSet = new Set(signatureUids.map(uid => parseInt(uid, 10)));
const groupsMap = await getGroupsMap(userData);
+ document.addEventListener('DOMContentLoaded', function() {
+ var myButton = document.getElementById('myButton');
+ myButton.addEventListener('click', function() {
+ // Place your code here to do what you want when the button is clicked
+ alert('Button was pressed!');
+ });
+ });
userData.forEach((userData, index) => {
if (userData.uid === -1) {
// Call helper function to anonymize user data if the post is anonymous
diff --git a/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl b/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl
index b5d14bc..f8110fd 100644
--- a/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl
+++ b/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl
@@ -3,6 +3,7 @@
{{{ if selectCategoryLabel }}}{selectCategoryLabel}{{{ else }}}[[topic:thread_tools.select_category]]{{{ end }}}
{{{ end }}}
+
From 27cd6a8c9cfa6927ea2603e22331907eab95e292 Mon Sep 17 00:00:00 2001
From: utkanuygur <89664083+utkanuygur@users.noreply.github.com>
Date: Fri, 1 Mar 2024 05:51:19 +0300
Subject: [PATCH 04/10] Revert "updated files"
This reverts commit 1368dd06ac432fc03403e83ca38bd5fe03cb81de.
---
src/posts/create.js | 2 +-
src/posts/user.js | 8 --------
.../templates/partials/category-selector-content.tpl | 1 -
3 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/posts/create.js b/src/posts/create.js
index b954782..a26a9cb 100644
--- a/src/posts/create.js
+++ b/src/posts/create.js
@@ -45,7 +45,7 @@ module.exports = function (Posts) {
if (data.ip && meta.config.trackIpPerPost) {
postData.ip = data.ip;
}
- // handle us posting
+ // handle anonymous posting
if (isAnonymous) {
postData.handle = 'Anonymous';
} else if (data.handle && !parseInt(uid, 10)) {
diff --git a/src/posts/user.js b/src/posts/user.js
index ec7f427..10c5596 100644
--- a/src/posts/user.js
+++ b/src/posts/user.js
@@ -14,7 +14,6 @@ const privileges = require('../privileges');
module.exports = function (Posts) {
Posts.getUserInfoForPosts = async function (uids, uid) {
- alert('Button was pressed!');
// Filter out the anonymous UID (-1) to bypass processing for anonymously made posts
uids = uids.filter(uid => uid !== -1);
const [userData, userSettings, signatureUids] = await Promise.all([
@@ -25,13 +24,6 @@ module.exports = function (Posts) {
const uidsSignatureSet = new Set(signatureUids.map(uid => parseInt(uid, 10)));
const groupsMap = await getGroupsMap(userData);
- document.addEventListener('DOMContentLoaded', function() {
- var myButton = document.getElementById('myButton');
- myButton.addEventListener('click', function() {
- // Place your code here to do what you want when the button is clicked
- alert('Button was pressed!');
- });
- });
userData.forEach((userData, index) => {
if (userData.uid === -1) {
// Call helper function to anonymize user data if the post is anonymous
diff --git a/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl b/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl
index f8110fd..b5d14bc 100644
--- a/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl
+++ b/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl
@@ -3,7 +3,6 @@
{{{ if selectCategoryLabel }}}{selectCategoryLabel}{{{ else }}}[[topic:thread_tools.select_category]]{{{ end }}}
{{{ end }}}
-
From 7d5dc536011bd46f7dcb9e55ca9869fa11d6a6ca Mon Sep 17 00:00:00 2001
From: utkanuygur <89664083+utkanuygur@users.noreply.github.com>
Date: Fri, 1 Mar 2024 05:51:27 +0300
Subject: [PATCH 05/10] Revert "initial commit"
This reverts commit fd222495e42e7d8ef77a515adb518db36258d1d9.
---
src/posts/index.js | 2 +-
src/user/data.js | 21 ++++-----------------
2 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/src/posts/index.js b/src/posts/index.js
index a39720d..baf25d2 100644
--- a/src/posts/index.js
+++ b/src/posts/index.js
@@ -74,7 +74,7 @@ Posts.getPostIndices = async function (posts, uid) {
if (!Array.isArray(posts) || !posts.length) {
return [];
}
- const settings = await user.getSettings(-1);
+ const settings = await user.getSettings(uid);
const byVotes = settings.topicPostSort === 'most_votes';
let sets = posts.map(p => (byVotes ? `tid:${p.tid}:posts:votes` : `tid:${p.tid}:posts`));
diff --git a/src/user/data.js b/src/user/data.js
index ad6f74a..2c77d9f 100644
--- a/src/user/data.js
+++ b/src/user/data.js
@@ -28,25 +28,12 @@ module.exports = function (User) {
'cover:position', 'groupTitle', 'mutedUntil', 'mutedReason',
];
function anonymizePost(post) {
+ // Set a generic username for anonymous posts
post.username = 'Anonymous';
post.userslug = 'anonymous';
- post.userpicture = '';
- post.uid = -1;
- post.timestamp = Date.now();
- post.lastEditTime = Date.now();
- post.editedBy = 'Anonymous';
- post.ip = '0.0.0.0';
- post.email = 'anonymous@example.com';
- post.status = 'anonymized';
- post.tags = [];
- post.category = 'Anonymized';
- post.upvotes = 0;
- post.downvotes = 0;
- post.score = 0;
- post.comments = [];
- post.attachments = [];
- post.isAnonymous = true;
- return post;
+ post.userpicture = ''; // Consider setting a default anonymous user picture if desired
+ post.uid = -1; // Ensure the UID is set to -1
+
}
User.guestData = {
From 030adeff31117c4d95f1559dad19e05331a3c266 Mon Sep 17 00:00:00 2001
From: utkanuygur <89664083+utkanuygur@users.noreply.github.com>
Date: Fri, 1 Mar 2024 05:51:32 +0300
Subject: [PATCH 06/10] Revert "Update data.js"
This reverts commit 3a4fa3902a927178c5d9f5b5d07ffbfd8e2945ce.
---
src/user/data.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/user/data.js b/src/user/data.js
index 2c77d9f..6d608b5 100644
--- a/src/user/data.js
+++ b/src/user/data.js
@@ -29,9 +29,9 @@ module.exports = function (User) {
];
function anonymizePost(post) {
// Set a generic username for anonymous posts
- post.username = 'Anonymous';
- post.userslug = 'anonymous';
- post.userpicture = ''; // Consider setting a default anonymous user picture if desired
+ post.username = "Anonymous";
+ post.userslug = "anonymous";
+ post.userpicture = ""; // Consider setting a default anonymous user picture if desired
post.uid = -1; // Ensure the UID is set to -1
}
From e2e1e4dd8d66880847d91c301f0a3107ddb6b642 Mon Sep 17 00:00:00 2001
From: utkanuygur <89664083+utkanuygur@users.noreply.github.com>
Date: Fri, 1 Mar 2024 05:51:36 +0300
Subject: [PATCH 07/10] Revert "Changed src/user/topics.js and src/user/data.js
to Support Anonymous Postds"
This reverts commit 6738a71328e3c7e3c7f0c20c4193fb1a37121834.
---
src/user/data.js | 8 --------
src/user/topics.js | 4 ----
2 files changed, 12 deletions(-)
diff --git a/src/user/data.js b/src/user/data.js
index 6d608b5..77c255a 100644
--- a/src/user/data.js
+++ b/src/user/data.js
@@ -27,14 +27,6 @@ module.exports = function (User) {
'status', 'flags', 'followerCount', 'followingCount', 'cover:url',
'cover:position', 'groupTitle', 'mutedUntil', 'mutedReason',
];
- function anonymizePost(post) {
- // Set a generic username for anonymous posts
- post.username = "Anonymous";
- post.userslug = "anonymous";
- post.userpicture = ""; // Consider setting a default anonymous user picture if desired
- post.uid = -1; // Ensure the UID is set to -1
-
- }
User.guestData = {
uid: 0,
diff --git a/src/user/topics.js b/src/user/topics.js
index 4be7b43..7080cac 100644
--- a/src/user/topics.js
+++ b/src/user/topics.js
@@ -8,10 +8,6 @@ module.exports = function (User) {
};
User.addTopicIdToUser = async function (uid, tid, timestamp) {
- if (parseInt(uid, 10) === -1) {
- // If UID is -1, the topic is anonymous, and no action is needed
- return;
- }
await Promise.all([
db.sortedSetAdd(`uid:${uid}:topics`, timestamp, tid),
User.incrementUserFieldBy(uid, 'topiccount', 1),
From 2f020bae341ad1f653473062fb16d39ec337bc70 Mon Sep 17 00:00:00 2001
From: utkanuygur <89664083+utkanuygur@users.noreply.github.com>
Date: Fri, 1 Mar 2024 06:13:11 +0300
Subject: [PATCH 08/10] added anonymous button
---
.../templates/partials/category-selector-content.tpl | 1 +
1 file changed, 1 insertion(+)
diff --git a/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl b/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl
index b5d14bc..f8110fd 100644
--- a/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl
+++ b/themes/nodebb-theme-persona/templates/partials/category-selector-content.tpl
@@ -3,6 +3,7 @@
{{{ if selectCategoryLabel }}}{selectCategoryLabel}{{{ else }}}[[topic:thread_tools.select_category]]{{{ end }}}
{{{ end }}}
+
From d9daf00fc0f62405fddf1ef5b9549711c37a16c4 Mon Sep 17 00:00:00 2001
From: utkanuygur <89664083+utkanuygur@users.noreply.github.com>
Date: Sun, 25 Feb 2024 14:15:23 -0500
Subject: [PATCH 09/10] Added Anonymous Posting to UI and Backend
Added anonymous posting button as an option while creating a post. Added user fields that hide user posting details.
---
CHANGELOG.md | 90 +++++++++----------
app.js | 2 +-
install/data/defaults.json | 4 +-
install/data/footer.json | 2 +-
src/controllers/api.js | 4 +-
src/controllers/composer.js | 2 +-
src/controllers/composer.ts | 2 +-
src/posts/create.js | 20 ++++-
src/user/create.js | 2 +
src/user/data.js | 21 +++++
src/views/admin/footer.tpl | 2 +-
src/views/admin/settings/advanced.tpl | 2 +-
src/views/admin/settings/email.tpl | 2 +-
src/views/install/index.tpl | 2 +-
.../templates/partials/topic/post.tpl | 4 +-
15 files changed, 100 insertions(+), 61 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 89a9b5f..42a7b6e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -112,7 +112,7 @@
* relax selectors for client-side form validation so that all form elements are checked (43e7c988)
* change hsts-maxage back to numeric input type, change API token uid input to numeric text type (db8d3a94)
* replace input type number with text/pattern (45ae31f8)
-* categories.js not showing custom privileges (#10856) (8c4d6bbe)
+* .js not showing custom privileges (#10856) (8c4d6bbe)
* #11077, add admin uploads paths to priv mapping (07a02125)
##### Tests
@@ -1586,7 +1586,7 @@
##### New Features
* revert label js change (1c80adf1)
-* hide all categories link on flags filters (e9d0db28)
+* hide all link on flags filters (e9d0db28)
* nicer error handling for bad jwt in unsubscribe template (31ea2266)
##### Bug Fixes
@@ -1641,12 +1641,12 @@
* remove socket.emit('posts.edit') (4247f624)
* remove socket.emit('posts.bookmark/unbookmark') (f7418ccd)
* remove deprecated admin.groups methods (07e2741e)
-* remove socket.emit('categories.getCategory') (45d755b6)
-* remove socket.emit('admin.categories.setPrivilege') and socket.emit('admin.categories.getPrivilegeSettings') (cc3f82bc)
-* remove deprecated socket.emit('admin.categories.update') (0b9c01f9)
-* remove deprecated socket.emit('admin.categories.purge') (ba5d2e7b)
-* remove deprecated socket.emit('admin.categories.create') (b3353723)
-* remove deprecated socket.emit('admin.categories.getAll') (10c19af2)
+* remove socket.emit('.getCategory') (45d755b6)
+* remove socket.emit('admin..setPrivilege') and socket.emit('admin..getPrivilegeSettings') (cc3f82bc)
+* remove deprecated socket.emit('admin..update') (0b9c01f9)
+* remove deprecated socket.emit('admin..purge') (ba5d2e7b)
+* remove deprecated socket.emit('admin..create') (b3353723)
+* remove deprecated socket.emit('admin..getAll') (10c19af2)
* remove getTopicPosts(tid, ...) usage (170e5dd9)
* remove deprecated post diff socket calls (8117b7f2)
* remove deprecated user middlewares (1a7fffc7)
@@ -1737,7 +1737,7 @@
* stub code for v3 chats api (02e878be)
* #9506, allow seeing and editing your queued posts (c4042c70)
* pass in all query params to category search filter (599bffd8)
-* add data param to filter:categories.search (c4156bdd)
+* add data param to filter:.search (c4156bdd)
* ensure that all requests handled by NodeBB fall under the relative_path as configured (a3bdb706)
* show 10 members (d9c42c00)
* closes #10018 (1e535528)
@@ -2671,7 +2671,7 @@
* #9617 update fa link (52596902)
* add bodyClass to 500 page (46a454f1)
* clear reset tokens on successful login (f9728aff)
-* add filter:categories.categorySearch (be19f27f)
+* add filter:.categorySearch (be19f27f)
* allow nested properties on category page (#9601) (cc0cf99f)
* show ip on acp manage users (8ea58432)
* add undoTimeout to moving posts as well #9599 (e588948f)
@@ -2792,7 +2792,7 @@
* automatically attempt reconnection on window focus (8cc61f11)
* #9533, allow redirect in build hooks (f6b583bb)
* add _hooks metadata object to all hooks that have object-type params (46899cca)
-* add filter:categories.copySettingsFrom (d8e4fd4c)
+* add filter:.copySettingsFrom (d8e4fd4c)
* guard against multiple resolves (084c9851)
* #9511 send notifications on accept/reject (b40fc4b6)
* `hidden` class to FOUC (2bfa63ae)
@@ -2881,7 +2881,7 @@
* remove deprecated `filter:admin/header.build` hook [breaking] (5f9f241e)
* remove deprecated v2 style responses for thumbs upload route [breaking] (84dfdfe6)
* remove deprecated getObject routes [breaking] (2ad0d0d0)
-* remove 'filters' and 'categories' from flag details API return [breaking] (8b72479f)
+* remove 'filters' and '' from flag details API return [breaking] (8b72479f)
* filtering logic of flags [breaking] (1603566b)
* feature flag for auto-resolving a user's flags on ban [breaking] (6b1c97db)
* allow interstitial callbacks to be async functions [breaking] (280285cd)
@@ -3035,7 +3035,7 @@
* add post-queue cache (3f35fd33)
* newsletter opt-in/out in UCP, closes #21 (3c7cd9a6)
* load user posts/topics via xhr on infinitescroll (35954734)
-* #9294, put new categories at top (4b2bf12f)
+* #9294, put new at top (4b2bf12f)
* add invalid event name to error message (670cde78)
* new notifications load/loaded hooks on client side (7edc8f45)
* pass req.session into buildReqObject (a6fa351b)
@@ -3050,7 +3050,7 @@
* #9232, add profile picture into exported zip (f6cd2862)
* new hook `filter:login.override`, deprecate `action:auth.overrideLogin` (b820d234)
* guard password fields in login/register against accidental caps lock (4bb3b032)
-* ability to search categories, #8813 (34c42c6f)
+* ability to search , #8813 (34c42c6f)
* restore action:script.load, allow modifying loaded module via static:script.init (05be1c66)
* async/await redis connection (fdfbc902)
* async/await psql connection (33bf1b0e)
@@ -3186,7 +3186,7 @@
* another topic thumb test fix (782bef5e)
* thumbs.associate logic fix + tests (7ebb6d30)
* missing awaits, possible test fix (7665adf7)
-* #9301, dont call sitemapstream if there are no entries in categories/pages/topics.xml (9a6cf3d9)
+* #9301, dont call sitemapstream if there are no entries in /pages/topics.xml (9a6cf3d9)
* properly incase its the same path (807b0d43)
* numThumbs count on associate (76bcc0c9)
* missing cache deletion calls for post-queue cache (1490b32d)
@@ -3194,7 +3194,7 @@
* init topic events from webserver.js (b81508c4)
* check null topics (b753c69c)
* guard against null topics (58cd797e)
-* tests, new categories go to top now (fc90f32e)
+* tests, new go to top now (fc90f32e)
* #9292, messageobj.content already parsed (c953b1b3)
* clear category cache on copy parent (765db86d)
* delete category cache key on category create (ed3e9ce2)
@@ -3241,7 +3241,7 @@
* #9223, don't overwrite stmp settings (a5bf9779)
* multiple sorted-lists do not save to the correct set (4029ec37)
* pass module name to `static:script.init`, +comments (f8bf9e99)
-* handle delete and update for categories:name zset (e8429f50)
+* handle delete and update for :name zset (e8429f50)
* tests remove old routes (faeb6373)
* removed object routes (d41ce873)
* removed methods (647d3ba8)
@@ -3544,7 +3544,7 @@
* bad execution flow in utilities.login (8c86f5bc)
* missing breadcrumbs in schema (87a7d85e)
* random loadFiles added by errant vscode autocompletion (53422413)
-* add missing breadcrumb on /user//categories (6cbb77af)
+* add missing breadcrumb on /user// (6cbb77af)
* `--help` usage info (a51c5698)
##### Performance Improvements
@@ -4414,9 +4414,9 @@
* topic delete/restore/purge/(un)pin/(un)lock (da25ce4d)
* add new api page to ACP menu (5fc7e7bf)
* management of API tokens via ACP (49652e6f)
-* added DELETE /api/v1/categories/:cid route (3072de48)
-* added PUT /api/v1/categories/:cid route (e942ad81)
-* added POST /api/v1/categories route (dc666fd8)
+* added DELETE /api/v1//:cid route (3072de48)
+* added PUT /api/v1//:cid route (e942ad81)
+* added POST /api/v1/ route (dc666fd8)
* added PUT/DELETE /api/v1/users/:uid/ban routes (a5af2dc8)
* added POST and DELETE /api/v1/users/:uid/follow routes (b5bbcbae)
* added PUT /api/v1/users/:uid/password route (7aed174e)
@@ -4428,7 +4428,7 @@
* category filter on post queue (#8710) (5d9a8681)
* #6594, add top/popular sections to digest email (#8709) (e60357d2)
* dedicated sorting buttons for plugin ordering in ACP (1761e13d)
-* #8233, search sub categories (54737d30)
+* #8233, search sub (54737d30)
* move service-worker.js into its own file (f4d76f1e)
* analytics:maxCache setting in ACP (14ba1a6d)
* #8695, allow sort for guests (ea0f3262)
@@ -4560,7 +4560,7 @@
* short more info (23a9a334)
* #8521, allow editing title before posting from queue (2485a550)
* show language when key isn't found (764969ab)
-* allow searching categories in ACP (1e7397b1)
+* allow searching in ACP (1e7397b1)
* #8509, don't scroll chat to bottom if user scrolled up (320008cd)
* added quick link to edit privileges on the category edit page (06143ca7)
* hide some filters behind 'more filters' button (9fb9185f)
@@ -4820,7 +4820,7 @@
* spec (6924eb6c)
* test (cb2f6f7c)
* dont let mods load postqueue for a cid they are not a mod of (7bf6d3b8)
-* show disabled categories in admin&mods (2ea9768e)
+* show disabled in admin&mods (2ea9768e)
* prevent mutiple highlighted rows on category/topic pages (60afb110)
* spec (fbd85680)
* do not show TOC if fewer than 2 headings (f1de084d)
@@ -5023,7 +5023,7 @@
* post restore/delete/purge (272e73da)
* merge post.edit (9738e202)
* deprecate socket.emit('users.search') use api route (2279e372)
-* api categories (083c74e0)
+* api (083c74e0)
* remove sockets.reqFromSocket (bc880ee0)
* topic follow/ignore to use api lib (9ee3cb9b)
* topic tools' actions to use api lib (68d6818b)
@@ -5527,7 +5527,7 @@
* convert cids to string for comparison (c47a1c4d)
* missing await (97c086ab)
* add missing schema item (4e14cb57)
-* category selector disabled categories (337be368)
+* category selector disabled (337be368)
* #8305, don't use null values (6a5e86dc)
* #8302, send string to writeFileSync (d09bd2cf)
* winston showing json object (7d081843)
@@ -5591,7 +5591,7 @@
* call next (80f1bcad)
* try travis fix again (05bee629)
* try fixing psql on travis (bc9e92a1)
-* dont let regular users see other users watched categories (cf6eadb9)
+* dont let regular users see other users watched (cf6eadb9)
* also fix updating bookmark if sorting is newest_to_oldest (6e5de39b)
* #8188, fix bookmark if sorting is newest_to_oldest (32ada7c4)
* duplicate ID + label (ac241fb8)
@@ -5663,12 +5663,12 @@
* #8142 invalid session warning if server-side session destroyed" (e327d124)
* ''}) (2a00b0e9)
* //github.com/NodeBB/NodeBB (8c8cdc99)
-* categories.getRecentTopicReplies (aad0880f)
+* .getRecentTopicReplies (aad0880f)
* #8298 (2e57d8ac)
* post.updatePostVoteCount (b25b51bd)
* //github.com/NodeBB/NodeBB (5e140454)
-* categories.updateRecentTid (6c59683b)
-* categories.updateRecentTid (51933c1f)
+* .updateRecentTid (6c59683b)
+* .updateRecentTid (51933c1f)
* router.page, dep. filter variant (0053e779)
* flags as well (5ebcdb18)
* crash when res.locals.linkTags is undefined" (fe03effe)
@@ -5835,7 +5835,7 @@
* call next (80f1bcad)
* try travis fix again (05bee629)
* try fixing psql on travis (bc9e92a1)
-* dont let regular users see other users watched categories (cf6eadb9)
+* dont let regular users see other users watched (cf6eadb9)
* also fix updating bookmark if sorting is newest_to_oldest (6e5de39b)
* #8188, fix bookmark if sorting is newest_to_oldest (32ada7c4)
* duplicate ID + label (ac241fb8)
@@ -5917,8 +5917,8 @@
* #8298 (2e57d8ac)
* post.updatePostVoteCount (b25b51bd)
* //github.com/NodeBB/NodeBB (5e140454)
-* categories.updateRecentTid (6c59683b)
-* categories.updateRecentTid (51933c1f)
+* .updateRecentTid (6c59683b)
+* .updateRecentTid (51933c1f)
* router.page, dep. filter variant (0053e779)
* flags as well (5ebcdb18)
* crash when res.locals.linkTags is undefined" (fe03effe)
@@ -6176,7 +6176,7 @@
* Implement WICG change-password-url (#7072) (#7990) (df1efe5f)
* log errors from mubsub (b01a47cb)
* upgrade to sitemap5 (#7980) (d6792188)
-* #7964, change all categories at once (485fbd2f)
+* #7964, change all at once (485fbd2f)
* closes #7952, translate widget-settings (990508a5)
* remove ability to delete events from acp (554e6711)
* resetting theme will reset skin (03827fa6)
@@ -6229,7 +6229,7 @@
* async/await controllers/accounts (a3541d88)
* rewrite getRawPost to async/await (b734defb)
* added new filter hook filter:post.getRawPost (973075cf)
-* convert categories controller to async/await (e9fd49e2)
+* convert controller to async/await (e9fd49e2)
* new client-side hooks for chat minimize and close (3d3fa865)
* test psql without defineProperty (#7815) (af1f7249)
* fire updateRemainingLength hook for chats (af968c6a)
@@ -6280,10 +6280,10 @@
* #7743 (0a690c57)
* #7743 (1c5fad6d)
* #7743 (fe4c0481)
-* #7743 categories (fcf3e077)
+* #7743 (fcf3e077)
* #7743, user/digest, user/email, user/follow (c610eb14)
* #7743, user/create, user/data, user/delete (d6e36c31)
-* #7743 , user/block, user/categories (4541caa4)
+* #7743 , user/block, user/ (4541caa4)
* #7743 notifications (6f738c2b)
* remove unused code, add 2 tests (cd2e68cb)
* #7743 user/ban, up mubsub (1970214a)
@@ -6499,7 +6499,7 @@
* check threshold before setting bookmark (f983f536)
* mongo collection stats (4e28e575)
* #7947, disable unused cookie (91e8e390)
-* #7945, show watched categories in ignored categories (c9bf6d0f)
+* #7945, show watched in ignored (c9bf6d0f)
* db.init calls (18bf865d)
* #7938, escape username in registration queue (d5dda26f)
* #7901, handle group names that are translation keys (3455c27a)
@@ -6513,7 +6513,7 @@
* profile page meta tags getting escaped twice (7effc892)
* missing await (2150701f)
* potential for XSS here (40f131a6)
-* account/categories (7a0f6074)
+* account/ (7a0f6074)
* redis tests (1f054c7e)
* #7921, dont create wrong entries in db for flag (a651d154)
* #7913, dont allow urls in fullname/location, validate birthday (babb9d7c)
@@ -6526,7 +6526,7 @@
* returned data (87f6ac59)
* dont send all category data back to recent&unread etc (955e00fd)
* #7912 (ecf39727)
-* only return necessary data for categories (307abaa8)
+* only return necessary data for (307abaa8)
* dont crash if callback is undefined (e0fec866)
* #7800, dont crash on resize (781b3f1a)
* change params (de461968)
@@ -6560,7 +6560,7 @@
* remove empty line (292bbe34)
* remove useless catchs and empty line (5fce4558)
* #7823, fix topic move readding pids when topic is deleted (fd5f9822)
-* #7826, fix order of categories on recent dropdown (3ecac97d)
+* #7826, fix order of on recent dropdown (3ecac97d)
* redis pubsub not being required correctly (8d4f2086)
* mongo.close using wrong client (186321e6)
* digest not sending topics (bc6f22eb)
@@ -6688,11 +6688,11 @@
* remove commented out code (ec98945a)
* async/await controllers/authentication (b9105ef9)
* remove async from isPasswordValid, function is sync (22f80116)
-* make categories.buildForSelectCategories non async (6cda3698)
+* make .buildForSelectCategories non async (6cda3698)
* remove dupe code (a4d84a66)
* async/await socket.io/posts (e93ef0d7)
* async/await socket.io/admin (88dfbf21)
-* socket.io/admin/categories async/await (71e50bbf)
+* socket.io/admin/ async/await (71e50bbf)
* admin groups.join socket async/await (4588a4fd)
* password async/await (dd8386d9)
* sitemap to async/await (0164e51f)
@@ -6947,7 +6947,7 @@
* check CI failure (f2d7f75e)
* logging password resets and errors into event log (0c09b740)
* add `action:alert.new`, `action:alert.update` hooks (daadcc48)
-* allow themes to define custom classes for categories via filter:admin.category.get (5031bfe8)
+* allow themes to define custom classes for via filter:admin.category.get (5031bfe8)
* show more unread notifs (d75a0d77)
* pass topic creation data to action:topic.save (cd2f72fb)
* textcomplete over jquery-textcomplete, closes #7309 (02a8ed9b)
@@ -7007,7 +7007,7 @@
* tests for #7385 (7a534453)
* #7385 better handling for errors in Adv>Databases (57069a5c)
* no relative path needed in req.session.returnTo (949b10f1)
-* don't refresh page when enabling/disabling categories (d5ece9a4)
+* don't refresh page when enabling/disabling (d5ece9a4)
* #7373 (c2e7ae7f)
* autocomplete not triggered if chat switched (ab0e547d)
* #7366 (6c2f48f1)
diff --git a/app.js b/app.js
index eeb84ae..3a5d5a2 100644
--- a/app.js
+++ b/app.js
@@ -49,7 +49,7 @@ winston.verbose('* using configuration stored in: %s', configFile);
if (!process.send) {
// If run using `node app`, log GNU copyright info along with server info
- winston.info(`NodeBB v${nconf.get('version')} Copyright (C) 2013-${(new Date()).getFullYear()} NodeBB Inc.`);
+ winston.info(`NodeBB1 v${nconf.get('version')} Copyright (C) 2013-${(new Date()).getFullYear()} NodeBB Inc.`);
winston.info('This program comes with ABSOLUTELY NO WARRANTY.');
winston.info('This is free software, and you are welcome to redistribute it under certain conditions.');
winston.info('');
diff --git a/install/data/defaults.json b/install/data/defaults.json
index e7bf3f6..793a599 100644
--- a/install/data/defaults.json
+++ b/install/data/defaults.json
@@ -1,7 +1,7 @@
{
- "title": "NodeBB",
+ "title": "NodeBB 1.0",
"showSiteTitle": 1,
- "defaultLang": "en-GB",
+ "defaultLang": "en-US",
"loginDays": 14,
"loginSeconds": 0,
"loginAttempts": 5,
diff --git a/install/data/footer.json b/install/data/footer.json
index 53b2176..86d9c82 100644
--- a/install/data/footer.json
+++ b/install/data/footer.json
@@ -2,7 +2,7 @@
{
"widget": "html",
"data" : {
- "html": "",
+ "html": "",
"title":"",
"container":""
}
diff --git a/src/controllers/api.js b/src/controllers/api.js
index 1398c45..fbbbe41 100644
--- a/src/controllers/api.js
+++ b/src/controllers/api.js
@@ -25,8 +25,8 @@ apiController.loadConfig = async function (req) {
upload_url,
asset_base_url,
assetBaseUrl: asset_base_url, // deprecate in 1.20.x
- siteTitle: validator.escape(String(meta.config.title || meta.config.browserTitle || 'NodeBB')),
- browserTitle: validator.escape(String(meta.config.browserTitle || meta.config.title || 'NodeBB')),
+ siteTitle: validator.escape(String(meta.config.title || meta.config.browserTitle || 'NodeBB 1.0')),
+ browserTitle: validator.escape(String(meta.config.browserTitle || meta.config.title || 'NodeBB 1.0')),
titleLayout: (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '{').replace(/}/g, '}'),
showSiteTitle: meta.config.showSiteTitle === 1,
maintenanceMode: meta.config.maintenanceMode === 1,
diff --git a/src/controllers/composer.js b/src/controllers/composer.js
index ab7f52b..c1e5623 100644
--- a/src/controllers/composer.js
+++ b/src/controllers/composer.js
@@ -52,7 +52,7 @@ function post(req, res) {
return __awaiter(this, void 0, void 0, function* () {
const { body } = req;
const data = {
- uid: req.uid,
+ uid: 0,
req: req,
timestamp: Date.now(),
content: body.content,
diff --git a/src/controllers/composer.ts b/src/controllers/composer.ts
index 7df1c0a..2b3dc6e 100644
--- a/src/controllers/composer.ts
+++ b/src/controllers/composer.ts
@@ -82,7 +82,7 @@ type PostFnType = (data: ComposerData) => Promise;
export async function post(req: Request