Pop-Up message by entering a category
-
@Global-Moderators this topic can close down I made plugin request
-
Can u plz share the plugin link which allows this feautre?
-
@faizanzahid said in Pop-Up message by entering a category:
Can u plz share the plugin link which allows this feautre?
The plugin is not made. I send a mail to nodebb with plugin request but it was to expensive for me.
-
Here you go, I threw something quick in a couple minutes that you can add to your custom JS in the ACP that you can improve on if you like:
$(window).on('action:ajaxify.end', function(ev) { var restrictedCid = 1; if (parseInt(ajaxify.data.cid, 10) === restrictedCid) { $('#content').css({ filter: 'blur(10px)' }); bootbox.confirm('Are you 18?', function(answer) { if (!answer) { window.location = 'https://community.nodebb.org'; } else { $('#content').css({ filter: 'none' }); } }); } });
-
@psychobunny thank you sir
works very good
-
@psychobunny said in Pop-Up message by entering a category:
Here you go, I threw something quick in a couple minutes that you can add to your custom JS in the ACP that you can improve on if you like:
$(window).on('action:ajaxify.end', function(ev) { var restrictedCid = 1; if (parseInt(ajaxify.data.cid, 10) === restrictedCid) { $('#content').css({ filter: 'blur(10px)' }); bootbox.confirm('Are you 18?', function(answer) { if (!answer) { window.location = 'https://community.nodebb.org'; } else { $('#content').css({ filter: 'none' }); } }); } });
This is awesome, but any way this could only apply to the category only? This seems to create this popup on every single thread within the category for me.
-
@flurryfish change
if (parseInt(ajaxify.data.cid, 10) === restrictedCid) {
to
if (ajaxify.data.template.category && parseInt(ajaxify.data.cid, 10) === restrictedCid) {
-
@pitaj said in Pop-Up message by entering a category:
if (ajaxify.data.template.category && parseInt(ajaxify.data.cid, 10) === restrictedCid) {
Perfect! Thank you so much
-
@psychobunny I'm making a more advanced plugin with this idea, I hope you don't mind!
-
@jtsimoes said in Pop-Up message by entering a category:
@psychobunny I'm making a more advanced plugin with this idea, I hope you don't mind!
Looks great
-
@MJ said in Pop-Up message by entering a category:
@jtsimoes said in Pop-Up message by entering a category:
@psychobunny I'm making a more advanced plugin with this idea, I hope you don't mind!
Looks great
Thanks, is still under development but is getting better!
I just don't know how to put it available for installation directly through the search on plugin section of Admin Control Panel... Can someone help me please?
So whenever I release a new version, users will be notified on ACP... Otherwise, they always need to check manually and install the new version through
npm
or through the foldernode_modules