on browsing getting directories list

General Discussion

Suggested Topics

  • How to get uid from @userslug?

    Solved General Discussion
    0 Votes
    8 Posts

    @baris very thanks
    This is the JS code I write for new chat with users, thanks to the help you give me

    require(['autocomplete'], autocomplete => { var modal = bootbox.dialog({ title: '[[flags:start-new-chat]]<i class="fa fa-comments-o" style="margin: 0 7px;"></i>', message: '<input class="form-control input-lg" placeholder="[[user:username]]">', buttons: { cancel: { label: '[[modules:bootbox.cancel]]', className: 'btn-default', callback: () => modal.modal('hide') }, ok: { label: '[[modules:bootbox.ok]]', className: 'btn-primary', callback: () => false } }, onEscape: true, backdrop: true, show: true }); modal.on('shown.bs.modal', () => { var inputEl = modal.find('input'); inputEl.focus(); autocomplete.user(inputEl); modal.find('.btn-primary').click(() => { utils.isUserNameValid(inputEl.val()) ? require(['slugify'], slugify => $.getJSON(`/api/user/${slugify(inputEl.val())}`, data => { app.newChat(data.uid); if (app.user.uid != data.uid) modal.modal('hide'); }).catch(() => app.alertError('[[error:no-user]]')) ) : app.alertError('[[error:invalid-username]]') }); }); });
  • 0 Votes
    1 Posts

    Hello all,

    I am using NodeBB 1.16.2 with Oxide theme. No other plugins except the ones that came with the installation. Every time I call a page I get the following 404 message in the nginx log:

    178.xxx.xxx.xxx - - [09/Apr/2021:10:52:02 +0000] "GET /assets/src/client/footer.js?v=4u8ga71iu38 HTTP/2.0" 404 9 "https://xxxx.xx/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0"

    I just can't find the appropriate call to it though:

    # locate footer.js /var/www/nodebb/build/public/templates/admin/footer.js /var/www/nodebb/build/public/templates/admin/partials/settings/footer.js /var/www/nodebb/build/public/templates/emails/partials/footer.js /var/www/nodebb/build/public/templates/footer.js /var/www/nodebb/install/data/footer.json /var/www/nodebb# grep -R "footer.js" * CHANGELOG.md:* add partials/footer/js.tpl (94da9fe5) node_modules/nodebb-theme-vanilla/templates/footer.tpl: <!-- IMPORT partials/footer/js.tpl --> node_modules/nodebb-theme-persona/templates/footer.tpl: <!-- IMPORT partials/footer/js.tpl --> src/install.js: fs.promises.readFile(path.join(__dirname, '../', 'install/data/footer.json'), 'utf8'),

    Can someone please help me or point me in the right direction? I am unfortunately a newbie in the NodeBB area. Thanks!

    Translated with www.DeepL.com/Translator (free version)

  • 0 Votes
    4 Posts

    Unfortunately the "GET API" as you call it is integral to the functionality of NodeBB on the client-side. During the normal usage of NodeBB, it is constantly using the /api to load new pages, etc. It's not something that can be turned off, but it might be possible to restrict it to only accessible to users with a certain cookie. This doesn't currently exist, though.

    You can open an issue on Github if you'd like this looked into further.

  • 0 Votes
    2 Posts

    @thefsb https://nodebb.org/ has everything listed

  • 0 Votes
    7 Posts

    Looks fine to me as well, confirmed here.
    Screen Shot 2014-05-27 at 2.59.52 PM.png