yes, its working!
thank you!
Yehonatan Albert
Posts
-
code block is rtl align -
code block is rtl align -
code block is rtl alignits not working
-
code block is rtl align@baris no, its working only if i adding to ul (1):
but then all topic is ltr -
code block is rtl alignmy forum is rtl, but the code blocks is also rtl align
thank you! -
Image HTML for global header widgetcan you with text widget
![](/assets/uploads/system/header-feb.jpg)
-
NodeBB install fail@PitaJ Thank you!
-
NodeBB install failHi
I don't success to install the NodeBB
the error:Dependencies outdated or not yet installed. Installing them now... npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: support for ECMAScript is superseded by `uglify-js` as of v3.13.0 npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm ERR! code 1 npm ERR! path C:\Users\User\Desktop\NodeBB\node_modules\sharp npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.12.2/libvips-8.12.2-win32-x64.tar.br npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies npm ERR! sharp: Installation error: unable to get local issuer certificate npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2022-04-19T17_36_51_616Z-debug-0.log Error installing dependencies! message: Command failed: npm install --production stdout: null stderr: null C:\Users\User\Desktop\NodeBB\src\cli\package-install.js:142 throw e; ^ Error: Command failed: npm install --production at checkExecSyncError (node:child_process:828:11) at Object.execSync (node:child_process:902:15) at Object.pkgInstall.installAll (C:\Users\User\Desktop\NodeBB\src\cli\package-install.js:133:9) at Object.<anonymous> (C:\Users\User\Desktop\NodeBB\src\cli\index.js:51:18) at Module._compile (node:internal/modules/cjs/loader:1097:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:999:19) at require (node:internal/modules/cjs/helpers:102:18) { status: 1, signal: null, output: [ null, null, null ], pid: 14724, stdout: null, stderr: null } Node.js v17.4.0
How to fix it?
Thank you -
Get req username in server-side@baris the problem is: if I use with await - then route not work
I triedinit: async params => { RouteHelpers.setupAdminPageRoute(params.router, '/admin/plugins/myplugin', params.middleware, [], (req, res) => { res.render('admin/plugins/myplugin', { username: await User.getUserField(req.uid, 'username') }) }) }
or
init: async params => { User.getUserField(req.uid, 'username', username => { RouteHelpers.setupAdminPageRoute(params.router, '/admin/plugins/myplugin', params.middleware, [], (req, res) => { res.render('admin/plugins/myplugin', { username: username }) }) }) }
The admin route waiting and not load..
What you think? -
Get req username in server-sideHi,
I don't know to get the username of request sender
There isreq.uid
in RouteHelpers, but withoutreq.username
.
Can render temp with username?
Thank you! -
Remove plugin from nbbpmHi, I have package/plugin in nbbpm
nodebb-plugin-change-reputation-test
how to remove it?
(I already removed it from npm)
ThanksThanks @administrators for the removed
-
How to use with require in admin.js@julian thanks!
I successed with plugin socket https://community.nodebb.org/post/76984 -
How to use with require in admin.jsHi
I building plugin, I don't know how to add therequire.main.require('./src/user')
to admin.js (ACP settings)const User = require.main.require('./src/user'); define('admin/plugins/quickstart', ['settings', 'autocomplete'], function (settings, autocomplete) { var ACP = {}; ACP.init = function () { autocomplete.user($('#username'), (ev, ui) => { console.log(ui.item.user.uid) }) settings.load('quickstart', $('.quickstart-settings')); $('#save').on('click', saveSettings); }; function saveSettings() { settings.save('quickstart', $('.quickstart-settings'), function () { app.alert({ type: 'success', alert_id: 'quickstart-saved', title: 'Settings Saved', message: 'Please reload your NodeBB to apply these settings', clickfn: function () { socket.emit('admin.reload'); }, }); }); } return ACP; });
there is error in first line
Uncaught TypeError: Cannot read properties of undefined (reading 'require') at admin.js:1
How to do it?
Thanks! -
Error after uploader modalHi there
I'm trying to upload file in JS
I'm running this code in the console:require(['uploader'], uploader => { uploader.show({ route: '/api/post/upload' }, console.log) })
And the file uploaded, but the console return error:
uploader.js:99 Uncaught TypeError: Cannot read properties of undefined (reading 'url')
In this location https://github.com/NodeBB/NodeBB/blob/master/public/src/modules/uploader.js#L99What needs fixing?
Thanks -
How to get uid from @userslug?@baris very thanks
This is the JS code I write for new chat with users, thanks to the help you give merequire(['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]]') }); }); });
-
How to get uid from @userslug?Hi, I want to more question
How to get uid from username? (with spaces)
Thanks