Is there some way to hide all topics within a category from all feeds (recent, popular, new, the digest)?
I need the topics to be accessible (and usable) to all users directly, but not searchable or showing up at random.
Is there some way to hide all topics within a category from all feeds (recent, popular, new, the digest)?
I need the topics to be accessible (and usable) to all users directly, but not searchable or showing up at random.
Thank you for the response @gotwf!
The issue is that I cannot delete an invite if I leave the inviter uid blank. I would think that an error would've been sent if this would cause problems. I have added a field in my plugin that will let admins select who will work as the inviter. in my case it's a system user, like no_reply@service...
The sender is a no-person email so that's not the issue. The issue is that the invite needs to (in the system) be sent my a user. Which doesn't make sense in my opinion. It's great if an admin sends an invite, but why prevent me from deleting an invite that doesn't have an error?
Is it possible to send an email invitation without having a user attached to it?
I'm trying to use User.sendInvitationEmail(uid, email)
, but if I send in null
, undefined
or 0
as the uid I get no feedback that it's wrong. What I do get is, in the ACP, no ability to delete the invite.
All I get is
I have a locked down forum but I'm working on a feature to automate the invitation process based on some parameters. So in the end I need to run something automagically.
The delete function used is this I guess?
@baris That's it! Thanks a lot.
I'm trying to figure this out. Is there a way to add a listener for a server side hook in runtime without adding it to plugin.json
?
Something like Plugins.registerHook('filter:groups.get', myRuntimeFunc)
.
The plugin I'm creating would benefit from this so the user have more control over when data should be fetched from an external API. I believe the answer will be no, but I need to ask.
Thanks for the clarification @PitaJ! I did a lot of experimenting but I guess I didn't get the right combination. I think I never tried naming the module with its extension. That might have been it. For anyone who might be interested in the actual solution, here it is:
In file-explorer.js:
define('azure/file-explorer', ['components'], function (components) {
const FileExplorer = {};
FileExplorer.init = function () {
// Init stuff here
});
return FileExplorer;
});
In plugin.json:
"modules": {
"azure/file-explorer.js": "static/lib/file-explorer.js"
},
In admin.js:
define('admin/plugins/azure', ['settings', 'azure/file-explorer'], function (settings, fileExplorer) {
fileExplorer.init();
});
In main.js:
$(document).ready(function () {
require(['azure/file-explorer'], (fileExplorer) => {
fileExplorer.init();
});
});
Only thing that seems to work is using define
and placing it in either scripts or acpScripts, but not in both.
@julian, I tried what you suggested and I'm not sure I made a mistake but it doesn't seem like it's accepted as a module. I tried:
"modules": {
"file-explorer.js": "static/lib/file-explorer.js"
},
and the require it require(['file-explorer.js'], (fileExplorer) => {...}
, require(['file-explorer'], (fileExplorer) => {...}
and require('file-explorer.js', (fileExplorer) => {...}
but nothing seems to work.
It's defined like this:
define('azure/file-explorer', ['components'], function (components) {...});
also tried to do module.exports = fileExplorer
without the define part.
Tried to require it with it's defined name azure/file-explorer
, but no cigar. The fileExplorer comes out as undefined.
Is it possible to set viewable for non guests for posts or threads?
So I'm having an issue which I hope you, the community, can shed some light on. I'm currently building a plugin to incorporate a external storage solution on Azure (not replacing post and topic file storage).
I made a client script that I want to be able to use both in the admin panel and in the forum views. I use define('my-thing/the-script')
and add it to plugin.json
under scripts.
But I cannot require it in the admin script. Not with require or by placing it in the define function.
I tried to add it in acpScript in plugin.json
, but then everything broke.
My last attempt was to make a clone of the original script and appending it with -admin
. So, script name, define name, everything. And it worked.
So I guess my question is: Is it not possible to add the same script to both backend and frontend. They both serve the same purpose so just duplicating it doesn't really make sense.