• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Pop-Up message by entering a category

Scheduled Pinned Locked Moved Solved General Discussion
17 Posts 9 Posters 3.7k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MJM Offline
    MJM Offline
    MJ
    replied to pichalite on last edited by
    #3

    @pichalite is it hard to make?
    what would it cost to let make this?

    TelokisT 1 Reply Last reply
    0
  • TelokisT Offline
    TelokisT Offline
    Telokis
    replied to MJ on last edited by
    #4

    @MJ I suggest you create a plugin request here

    1 Reply Last reply
    0
  • MJM Offline
    MJM Offline
    MJ
    wrote on last edited by
    #5

    @Global-Moderators this topic can close down I made plugin request

    1 Reply Last reply
    0
  • F Offline
    F Offline
    faizanzahid Gamers
    wrote on last edited by
    #6

    Can u plz share the plugin link which allows this feautre?

    MJM 1 Reply Last reply
    0
  • MJM Offline
    MJM Offline
    MJ
    replied to faizanzahid on last edited by
    #7

    @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.

    1 Reply Last reply
    0
  • psychobunnyP Offline
    psychobunnyP Offline
    psychobunny
    wrote on last edited by
    #8

    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'
                    });
                }
            });
        }
    });
    
    MJM F 2 Replies Last reply
    4
  • MJM Offline
    MJM Offline
    MJ
    replied to psychobunny on last edited by
    #9

    @psychobunny thank you sir 🙂

    works very good 🙂

    1 Reply Last reply
    0
  • F Offline
    F Offline
    flurryfish
    replied to psychobunny on last edited by
    #10

    @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.

    PitaJP 1 Reply Last reply
    1
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to flurryfish on last edited by
    #11

    @flurryfish change

    if (parseInt(ajaxify.data.cid, 10) === restrictedCid) {
    

    to

    if (ajaxify.data.template.category && parseInt(ajaxify.data.cid, 10) === restrictedCid) {
    
    F 1 Reply Last reply
    2
  • F Offline
    F Offline
    flurryfish
    replied to PitaJ on last edited by
    #12

    @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

    1 Reply Last reply
    0
  • jtsimoesJ Offline
    jtsimoesJ Offline
    jtsimoes GNU/Linux
    wrote on last edited by
    #13

    @psychobunny I'm making a more advanced plugin with this idea, I hope you don't mind!

    GitHub - jtsimoes/nodebb-plugin-nsfw: NodeBB plugin that displays a confirm box with a 'not safe for work' warning when entering in specific categories

    NodeBB plugin that displays a confirm box with a 'not safe for work' warning when entering in specific categories - GitHub - jtsimoes/nodebb-plugin-nsfw: NodeBB plugin that displays a confirm box with a 'not safe for work' warning when entering in specific categories

    favicon

    GitHub (github.com)

    MJM 1 Reply Last reply
    3
  • MJM Offline
    MJM Offline
    MJ
    replied to jtsimoes on last edited by
    #14

    @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!

    GitHub - jtsimoes/nodebb-plugin-nsfw: NodeBB plugin that displays a confirm box with a 'not safe for work' warning when entering in specific categories

    NodeBB plugin that displays a confirm box with a 'not safe for work' warning when entering in specific categories - GitHub - jtsimoes/nodebb-plugin-nsfw: NodeBB plugin that displays a confirm box with a 'not safe for work' warning when entering in specific categories

    favicon

    GitHub (github.com)

    Looks great 🙂

    jtsimoesJ 1 Reply Last reply
    1
  • jtsimoesJ Offline
    jtsimoesJ Offline
    jtsimoes GNU/Linux
    replied to MJ on last edited by
    #15

    @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!

    GitHub - jtsimoes/nodebb-plugin-nsfw: NodeBB plugin that displays a confirm box with a 'not safe for work' warning when entering in specific categories

    NodeBB plugin that displays a confirm box with a 'not safe for work' warning when entering in specific categories - GitHub - jtsimoes/nodebb-plugin-nsfw: NodeBB plugin that displays a confirm box with a 'not safe for work' warning when entering in specific categories

    favicon

    GitHub (github.com)

    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 folder node_modules

    barisB 1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    replied to jtsimoes on last edited by
    #16

    @jtsimoes You have to publish it to npm with npm publish

    jtsimoesJ 1 Reply Last reply
    1
  • jtsimoesJ Offline
    jtsimoesJ Offline
    jtsimoes GNU/Linux
    replied to <baris> on last edited by
    #17

    @baris It worked! Thank you 😄

    1 Reply Last reply
    1

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development