rbeer
Posts
-
Share post in short link -
How to Make Admin panel accessbile via Localhost only@psychobunny @julian
A special user/group for the ACP would be nice to have, though.I am thinking in terms of: Intrusion starts with spotting the user with desired credentials. This way administrator/moderator/team accounts couldn't be targets to any attacks. As such a username (account with ACP access) wouldn't be exposed to the public, whatsoever.
But since many BBs, for many years did well without it, I come around to the first line: "Nice to have".
-
Retrieve setting value from the client sideAlways makes me smile when I can help.
Your plugin also opened nodeBB to a more scientific audience, which I personaly find extra apealing. -
Retrieve setting value from the client sideI'm not sure if I understood you correctly, but I think you want to use the PluginSocket (socket.io) for this:
Server:
https://github.com/rbeer/nodebb-plugin-smoothshorts/blob/master/smoothshorts_be.js#L60-L67
Client:
https://github.com/rbeer/nodebb-plugin-smoothshorts/blob/master/static%2Flib%2Fsmoothshorts_fe.js#L21-L24 -
[nodebb-widget-steamserverstatus] Steam Server StatusYou might have forgotten to post the link? Can't give feedback without seeing it.
-
Download Token - bounty offeredIndeed, there is: filter:uploadFile.
-
Download Token - bounty offeredJust to clarify, that I understood correctly:
A user uploads a file, it's stored on the server as, let's say,
./uploads/file-123.txt
.
But instead of publishinghttps://yourboard.org/uploads/file-123.txt
, you wanthttps://yourboard.org/files/someHash
, which expires after a configurable time?
But anyway, my credo is: Nothing's impossible in programming; only a matter of time.I'm fairly new to nodeBB myself, but I have extended/created two plugins alongside some other minor fixes, so far:
topic-events and smoothshorts.
Leave me a message here or at [email protected] for specifics, in case you're interested. -
[nodebb-plugin-smoothshorts] Short URLs built in...0.1.0 is here!
Added ACP page, hashing old topics/posts and different domain for short urls.
As well as the ability to use a modifier key for replacing urls. I highly suggest to use this feature, since the context menu offers more options than just copying links.Here's a preview of the ACP page:
-
[nodebb-plugin-smoothshorts] Short URLs built in...Indeed a very good idea.
Messenger got the best of me again, though. I fell a little bit behind, but this is noted for 0.0.3 then.I'm taking any suggestions/ideas/bugs also on GitHub. I would actually prefer it.
-
[nodebb-plugin-smoothshorts] Short URLs built in...@leksar said:
Ah. That's the point. I've tried to get hash from old topics. With new topics it works well, thank you.
Yay!
Nevertheless, your post enabled me to fix some things; Vanilla actually wasn't working before. Thanks again.
-
[nodebb-plugin-smoothshorts] Short URLs built in...Do you get any errors in chrome's console (Ctrl+Shift+J) ?
Oh, and: The link you are trying to copy, is the topic an old one or created after you activated the plugin? Because the hashs are generated and saved in the DB whenever you create a topic or post. Old ones just wouldn't have a hash to build the URL from.
Creating hashs for already existing topics/posts will be part of the ACP/patch tonight.
-
[nodebb-plugin-smoothshorts] Short URLs built in...@leksar said:
Doesn't work on my edited Vanilla theme : (
Ouch.
I indeed did some bad checks there. I just made some changes and tested against the original Vanilla. Does it help if you replace the frontend file (https://github.com/rbeer/nodebb-plugin-smoothshorts/blob/master/static/lib/smoothshorts_fe.js)?
I'm gonna bump to 0.0.2 some time tonight, when I got the ACP stuff ready to go. Then you could update via npm.
Thanks for your feedback!
-
[nodebb-plugin-smoothshorts] Short URLs built in..... well, almost. It's a plugin, after all.
npm install nodebb-plugin-smoothshorts
Features
(README.md)
Once a user opens the browser's context menu upon a topic link, the href value of that link gets replaced with its assigned hash:
This also works on posts (theme-persona; couldn't find post links in theme-lavender).
The now copied address is one of the formhttps://yourNodeBB.org/ss/HASH
. Visiting it will set some logic in motion, finding the associated post or topic and redirecting accordingly:
The original address is restored on any next
mousedown
event. This way, even if the just hashed and copied link is clicked, the user will be visiting that original, since the event is processed before the browser attempts to follow the link. (Tested in FireFox 38.05 and Chrome 43.0; please let me know if your browser doesn't work!)Changelog
0.1.0
- Added ACP page.
- Settings
- Create missing hashs topics/posts.
- Added modifier key (ctrl, alt or shift) to replace urls.
- Added ability to change domain for short urls.
(https://prettylongdomain.org/topic/2/slug/ -> https://short.org/ss/hash)
- Added ACP page.
-
[nodebb-plugin-soundcloud] SoundCloud embed pluginWell, again: that's odd.
Try to
- run
./nodebb dev
, - visit the ACP and deactivate both soundcloud plugins
- restart nodeBB (click the little popup in upper right corner, after disabling plugins)
- wait for nodeBB to be up again
- enable only one of the soundcloud plugins.
If that still doesn't do the trick, you might want to update all plugins with the "update" button in the ACP. You have a lot warnings, regarding outdated plugins. If that again does nothing, my last two cents would be to deactivate those outdated plugins to see if they cause any trouble.
- run
-
[nodebb-plugin-soundcloud] SoundCloud embed plugin@Kalbaskin
Did you look for it in the nodeBB output? (./nodebb start
, then./nodebb log
; or./nodebb dev
; I would suggest the later for debuging.)
If you add the line as @a_5mith asked you to, the text does not show up in your browser's console, but rather in the log output of your server, since the file in question is executed on server, not client side.I tested both plugins against nodeBB 0.7 and they work as expected.
@Kalbaskin said:
Content: "link text" - instead of player soundcloud.
This looks like none of the plugins (soundcloud, soundcloud-35hz) are activated.
What does your ACP under Extend -> Plugins show? I imagine that having both plugins (soundcloud and soundcloud-35hz) active at the same time could cause some hickups.
When you start your nodeBB with./nodebb dev
, do you see any errors or a line that says:24/6 07:35 [18969] - verbose: [plugins] Loaded plugin: nodebb-plugin-soundcloud
or
24/6 07:35 [18969] - verbose: [plugins] Loaded plugin: nodebb-plugin-soundcloud-35hz
respectively.Which of the two plugins do you want to use, anyway?
I'm quite sure that this is not a bug in either of the plugins you're facing now. -
[nodebb-plugin-soundcloud] SoundCloud embed plugin@Kalbaskin
Well, that's odd.
Does your browser's JS log show errors/warnings?
Does the post with the soundcloud link look like the screenshots?Just to be sure: What does the
"version"
field in/yourNodeBB/node_modules/templates.js/package.json
say? -
[nodebb-plugin-soundcloud] SoundCloud embed plugin@Kalbaskin @a_5mith
Both plugins are fine.
The second parameter was just overlooked in templates.js, but fixed: https://github.com/psychobunny/templates.js/issues/34
Updating templates.js solves the problem for me:npm update templates.js
-
[nodebb-plugin-soundcloud] SoundCloud embed plugin -
[nodebb-plugin-soundcloud] SoundCloud embed pluginIt is working for me, too.
But it throws a pretty nasty error, nonetheless.I suspect that the
self
in question is intended to be the WebWorker in use there. WebWorker.postMessage, as opposed to window.postMessage (which the global self is set to at the time of the error being thrown), allows the second parameter to be optional.'use strict'; /*global require, module, self*/ (function(module) { var templates = { cache: {}, globals: {} }, helpers = {}, loader, worker; var regexes = { ... }; if (typeof self !== 'undefined' && self.addEventListener) { self.addEventListener('message', function(ev) { var data = ev.data; self.postMessage({ // THROWING ERROR result: !data.block ? templates.parse(data.template, data.object) : templates.parse(data.template, data.block, data.object), signature: data.signature }); }, false); }
-
[nodebb-plugin-blog-comments] Unable to post topic error@Danny-McWilliams
Yes, that's wordpress.js, Line #185. But before that, since .send() executes the request. You'll have to set it up, i.e. add headers, before calling it.But I stumbled upon something else: https://html.spec.whatwg.org/multipage/browsers.html#same-origin
Just ain't got the time to go through this. Maybe that's also of interest to you, @psychobunny. I can imagine, same-origin applies more often with this plugin. And maybe there's the difference, since e.g. blog.nodebb.org sits on another (sub-)domain, opposed to what @Danny-McWilliams is trying to do here (http://domain.com to http://domain.com/wordpress)