Start NodeBB with ./nodebb watch
and it will reload automatically whenever detects a change.
xuso
Posts
-
Efficiently developing a theme -
Maximum Post Length -
Maximum Post LengthNow there is only max length for title but I think it should be also for posts.
Actually, IMO, it's not just a feature request, it could be even a security problem to allow a user to post a message with hundreds of thousands of characters and then try to parse it with each plugin (that's what happened to me). -
Shouldn't be the Watched Topics list, sorted by last message? -
Shouldn't be the Watched Topics list, sorted by last message?ping @julian @psychobunny @baris
-
Shouldn't be the Watched Topics list, sorted by last message? -
Automatic "Scroll to top" after a topic finishes loadingThanks
-
Problem with IOS/safariTry to clear cookies.
-
Automatic "Scroll to top" after a topic finishes loadingPlease, any solution for this?
@psychobunny @julian -
Shouldn't topics have different titles?Totally agree.
-
How to add "Rules" button on composer like this?I think using the client hook
action:composer.loaded
and adding the button via Javascript is the best way. -
Navigating to a different page after selecting "New Topic" or "Reply" doesn't close the New Topic/Reply boxI think it is, so you can move across different pages without losing whatever you wrote. But maybe would be better minimize it to the bottom bar.
-
How can I get the list of topics an user is following?@baris Exactly. The relation is "topic -> list of users", and I needed "user -> list of topics" so I extended the method toggleFollow from threadTools.js and every time a user starts following a thread, a new tid is stored in
uid:x:followingtopics
. -
How can I get the list of topics an user is following?No, that's not what I was looking for. Those are favourites posts, I want the topics you follow (and receive notifications when someone replies) by pressing the button I said above.
The truth is that button is from the Vanilla Theme and it's not showing on this forum.
Anyway, reviewing the core I think there isn't a way, so I did it by myself. Nevermind.
-
How to create a new route for a new custom page -
Automatic "Scroll to top" after a topic finishes loadingAfter loading a topic, sometime (really often) the page scrolls to top automatically even if I navigate to a post anchor. It is really annoying and I noticed that it happens also in this forum. Reviewing the core code I saw the guilty lines:
app.processPage = function () { ... setTimeout(function () { window.scrollTo(0, 1); // rehide address bar on mobile after page load completes. }, 100); };
File:
public/src/app.js:241
I suppose those lines should only be executed on a mobile (Well, the 'scroll to top' could happen too)
Example: https://community.nodebb.org/topic/180/who-is-using-nodebb/110
That link should scroll directly to the #110 post, and it does, but right after, scroll to the top of the page. -
How can I get the list of topics an user is following?I mean the topics you mark with this button:
Is there any way to obtain all those topics?
Thanks.
-
How to create a new route for a new custom pageHi again. A question related: Is it possible to obtain all the same data retrieved by the calls 'getFollow', 'getFollowers', etc. ? I mean all this attributes:
userData.uid = userData.uid; userData.yourid = callerUID; userData.theirid = userData.uid; userData.isSelf = self; userData.showSettings = self || isAdmin; userData.groups = Array.isArray(results.groups) && results.groups.length ? results.groups[0] : []; userData.disableSignatures = meta.config.disableSignatures !== undefined && parseInt(meta.config.disableSignatures, 10) === 1; userData['email:confirmed'] = !!parseInt(userData['email:confirmed'], 10); userData.profile_links = results.profile_links; userData.status = websockets.isUserOnline(userData.uid) ? (userData.status || 'online') : 'offline'; userData.banned = parseInt(userData.banned, 10) === 1; userData.websiteName = userData.website.replace('http://', '').replace('https://', ''); userData.followingCount = results.followStats.followingCount; userData.followerCount = results.followStats.followerCount;
Those calls use the method
getUserDataByUserSlug
fromaccounts.js
but I can't, because it is a private method.I need it to make a seamless integration of my plugin and be able to show the same dropdown menu that the other sections of the profile show. That includes the 'profile_links' for example.
-
How to create a new route for a new custom page@psychobunny said:
Looks like there was a bug in core specifically for adding routes to
user/xxx/route
Update to latest or this commit for the fix
Thank you, I'll try
Edit: It worked
-
How to create a new route for a new custom pageYes, the API call seems to retrieve both routes:
{ "availableTemplates": [ ... "account/ignored.tpl", ... ], "templatesConfig": { "custom_mapping": { ... "^user/.*/ignored": "account/ignored" ... }, "force_refresh": { "logout": true } } }
Here is the public repo: https://github.com/exo-do/nodebb-plugin-ignore-users
If it helps, when the redirection fails, the template displays something like this:
(Like you can see at the picture, it loads the profile view -broken- instead the new ignored view)