Did you activate it in your ACP? I think the option is disabled by default.
rbeer
Posts
-
Unable To Upload Avatars -
Raspberry Pihttp://redis.io/download#installation
I just now followed the "Install" steps on my Pi B (don't think it's a +, not sure) and it compiled fine. Took about half an hour, maybe 3/4.You are using raspbian, don't you? If so, I could even wrap my compilation into a .deb and just upload it.
-
Class For Progress BarYou are referring to the one up top, thats rushing from left to right, when clicking links, correct?
That would be#nprogress .bar { background: #29d; position: fixed; z-index: 1031; top: 0; left: 0; width: 100%; height: 2px }
I think this is what's being used here:
http://ricostacruz.com/nprogress/ -
[nodebb-plugin-expiring-uploads] Hide and expire users uploads0.2.1
- FIX: Automatic 'fa-toggle-on/off' requires checkbox to be nested in label
0.2.0
- ADDED: Languages de, en_GB, en_US
- ADDED: Seperate error messages for 403, 404, 410
- FIX: ACP not showing custom timestamp correctly
- FIX: ACP not showing confirmation, when storage path not changed.
... more in the CHANGELOG.
-
[nodebb-plugin-expiring-uploads] Hide and expire users uploads(Hopefully) As requested by @chrismccoy
Thanks for the idea!nodebb-plugin-expiring-uploads
Hide and expire users uploads.
The name actually only tells half the story. This plugin lets you:
-
Hide uploads of definable filetypes behind a hash/timestamp/filename combination. Uploads are not stored in the standard path (public/uploads). This ensures, that even when the filename is known, it's pretty hard to guess its location.
-
Set an expiration time(range) for those hash/timestamp/filename urls. Every setting > 0 will have uploads handled by this plugin expire.
PLEASE NOTE: Expiration is calculated at request time. If you uploaded a file 7 days ago and now decide to lower the expiration time from 10 to 5 days, this file will be treated as expired.
Installation
-
npm install nodebb-plugin-expiring-uploads
-
Activate the plugin in the ACP.
-
Adjust the settings! Standard expiration time is 0 = uploads never expire.
-
-
User managment with flaskI haven't used mongoDB since my very first test, so the collections name could be different now.
But essentially you wanna do something like:db.getCollection('objects').find({_key: /user:\d*$/})
That's a common find() query over the
_key
, using a regex matchinguser:userIDs
.
This gives you the basic user objects, holding name, password, etc. There are other user related objects, though.db.getCollection('objects').find({_key: /user:\d*:settings/})
for example might be of interest. To get the full load, just omit the
$
in the first query. -
[nodebb-plugin-portal-homepage] menu problemsSorry, this time I got absolutely no clue what you're getting at. Page name? What menu?
-
Raspberry PiThe biggest problem surely would be to get the underlying software (nodeJS, Redis) to work. Back when I tried it the first time, there was for example no nodeJS for the ARM architecture (which the Pi is).
But even if there was, nowadays; I really wouldn't do that in terms of production. For a single-user development/testing setup maybe. But for everything apart from that, the Pi is just not powerful enough.
That doesn't necessarily mean though, that the experience of still doing it would be a waste of time. What exactly is your recent problem?
-
[nodebb-plugin-portal-homepage] menu problemsNice to see, that it's working.
What exactly do you mean by "Twitter script doesn't work" ? The page looks like it did before, on my end:
Same result whether I refresh the page (F5) or click the menu button. Unlikely, but maybe me not being logged in makes a difference.The logo problem is also a routing one and just as easy to fix - I hope.
tl;dr first:
Addingrouter.get('/api/', renderHomepage);
to
Plugin.init()
should do the trick.It's indeed basically the same issue as with your first problem:
When you load the page by typing the adress in your browser, or refreshing, the browser asks the server forhttp://forums.latasquita.com/
, which is handled byrouter.get('/', params.middleware.buildHeader, renderHomepage);
All clicks in the menu (like almost all clicks in the forum, actually) are send through XHR requests to the API. So this is then what's happening when you click the logo, too:
Compare the "Request URL"s I highlighted on the right side!
Now, this might break the forum; I'm actually not sure about what will happen. But on first sight there's nothing else that is using this route, so replacing it should be fine.
Demacia!!
(Lux main )
-
[nodebb-plugin-portal-homepage] menu problemsHi!
Are you working on this, right now? Otherwise, I just might have crashed your site - sorry, if so.
From the looks of it, the menu clicks trigger requests to /api/home, which are answered with an empty JSON response.
Try to replace thefunction (req, res, next...
part here withrenderHomepage
, but without thatparams.middleware.buildHeader
. buildHeader is basically the menu up top, which obviously hasn't to be generated again, when you click on a link in it.router.get('/api/home', function (req, res, next) { res.json({}); });
router.get('/api/home', renderHomepage);
-
Social Sharing plugin including BufferOh... See! I would've done complete nonsense if I hadn't asked.
Well, this then is actually a completely different story, indeed. This requires adding an UI element, rather than changing present ones. In fact, it would be reasonable to leave it out of the core overall, as it's matter of taste whether you would want to use it or not.
Are you familiar with the template engine used (templates.js)? I'm not much of a UI guy and if you used it before, I would guess you are familiar with buffer-buttons and how to embed them (HTML/CSS). Maybe you could place those buttons in the (your) theme and I'll provide the needed data from the backend (i.e. plugin).
I really gotta sleep. Needed like 10 minutes for those few lines now. xD
But I'm pretty confident, that this is not too complicated, after all! -
Social Sharing plugin including Buffer@Blue-Orange
Point well taken.
But please bear in mind, I myself am fairly new to the software and its code. I should've pointed out, that I might be wrong about what I wrote there.As for the word "community": I think the slogan tries to transport the idea of enabling you to create a community. Obviously, interconnected services are the way to go, nowadays. But from what I've seen so far, the core team (which I'm not a part of) is mostly concerned with making the internal community's (as in: your community in your forums) experience as enjoyable as possible. And finally: The sharing option is quite new, that's true. If I'm not mistaken, your request here is the first of its kind (i.e. sharing to other services than the big 3). It's a little bit like with every new road, where the tar is still boiling hot: It's bound to throw some bubbles. I'll wait a few days for any vetos to arise, because we are talking about core changes here. There;s nothing worse than breaking the core - then It'd be mayhem all around. Also a reason why changes sometimes take a while. I think it's in everyones interest to take some time and get it right, rather than doing it in a hurry and plowing everything over along the way. If that hasn't happened then, I'll jumpstart my steamroller and see what I can do. As stated, it's in my interest, too.
What, btw., do you mean by "buffer button"? This little menu attached to every post, right?
-
Creating a Page and Altering TemplatesThat would be in the plugin's own templates folder. NodeBB takes those folders and compiles them into the mentioned public/ folder. In case of the header-widget in custom-pages, that would be https://github.com/rbeer/nodebb-plugin-custom-pages/blob/tplCopyIssue/templates/custom-page.tpl#L3 - I think. I'm not all too familiar with the widgets. In a nodeBB install, this also would be in node_modules/nodebb-plugin-custom-pages/templates.
-
Creating a Page and Altering TemplatesRegarding the custom-pages plugin: I fixed that in a fork https://github.com/rbeer/nodebb-plugin-custom-pages/tree/tplCopyIssue.
For the categories.tpl: Do you edit it in the public/ folder? If so, then is the reset by design. The public folder holds - let's say - runtime files, that are compiled at startup, i.e. deleted and newly created.
To make your changes permanent, you'd have to locate the categories.tpl in your theme (e.g. node_modules/nodebb-theme-persona/templates/partials/categories).
-
Social Sharing plugin including BufferThere is the 'share' module you could require. The problem though is, that it doesn't expose the needed function
addHandler
.openShare
as well. Is this by design?Otherwise I might just look further into it and introduce a hook, extend the ACP or something, not sure yet. Suficed to say, that this generally is on my list for a week now, since plugin-smoothshorts would make use of something like this, as well.
-
ajaxify.variables.get deprecatedALRIGHT! ALRIGHT! I believe you.
-
Download Token - bounty offeredDownload the latest version
npm update nodebb-plugin-expiring-uploads
You still have to edit the settings by hand in the .js file, though. I tend to procrastinate UI, but it's definetly next on the list.
-
Download Token - bounty offered@julian
Wow! How about that for incentive? Well, let me tell you: To me it's a great one. I fell in love with NodeBB the second I tested it. Becoming a part of its development puts a satisfied grin on my face - they have yet to invent an emoji for that. (see; not even close) -
Download Token - bounty offered@chrismccoy
Is this, more or less, what you are looking for?
Please consider this an early alpha preview, that will most definetly clutter the * peep * out of your log.npm i nodebb-plugin-expiring-uploads
I've taken the liberty to replace the md5- with xx-hashs. MD5 is outdated since years and quite verbose (aa1469dd64687462ee30378e14d34105 vs. 6edebbb6).
The outcoming url is of the form:
ht*p://nodebb/uploads/xxhash/CreationTimestamp-in-hex/filename.ext
e.g.ht*p://lsw.local/uploads/705bab4a/14e6b6e49dc/droid-sans-mono.zip
The seed of xxhash is the first part (up to the first
-
) of your nodeBB's secret (config.json).On the HDD, files are stored in
/nodeBB/expiring_uploads/
as opposed to/nodeBB/public/uploads/files/
, since everything in/public/
could be guessed, as all of its contents seem to be blindly exposed to the clients. Please note, that my lazily hardcoding the/
could make this plugin fail on Windows. I'll change that, or at least check whether the NodeBB core takes care of it.The created links are routed, but you can't actually download the file, yet.
The plugin hook (filter:uploadFile) is pretty needy - or powerful; depending on your point of view. Anyway, it breaks out of (returns from) the core function, handling uploads, as early as it can get. Meaning, that the plugin has to handle everything like allowed filetypes, -sizes and such. I assume, that you e.g. don't want to have uploaded pictures expire. It's in there, but only rudimentarily, for now. That's why I haven't started the ACP part of it, yet.
In the end the plugin will surely have an option to choose, but for starters: What's your preference, the least setup effort for you? Would you rather define filetypes which should be expiring or those who should not?
Another aproach would be to add a second "Expiring Upload" button to the composer. This way the built-in button would follow the general setup (e.g. allowed filetypes images) and the added button would only accept .zip, .gz, .pdf, what have you. -
Share post in short link@fiag
Sure thing!
Actually, I have to thank you! This very post of yours gave me the idea for the plugin, in the first place.
And never hesitate to throw any bugs or suggestions my way!