In the documentation, I read that they use include to import JavaScript files into the extension. Besides include, are there any other ways to do this? And why does "include()" work in JavaScript? Is it a custom syntax specific to SmartFoxServer2X?
Reference Link: https://docs2x.smartfoxserver.com/Exten ... nt#modules
Search found 10 matches
- 30 Sep 2024, 05:58
- Forum: SFS2X Questions
- Topic: Are there any other ways to import JavaScript files into an extension besides using include()?
- Replies: 1
- Views: 1526
- 10 Sep 2024, 06:13
- Forum: SFS2X Questions
- Topic: Is there a way to use variables for zones?
- Replies: 1
- Views: 1376
Is there a way to use variables for zones?
I'm currently looking for a way to use global variables for a zone, but the documentation only mentions buddy, user, and room variables. Can you guide me?
- 28 Aug 2024, 07:06
- Forum: SFS2X Questions
- Topic: The function getRoomListFromGroup is not working
- Replies: 2
- Views: 1464
Re: The function getRoomListFromGroup is not working
Hi Labo, I have two issues:
1. When I send a group chat using ModeratorMessageRequest as shown below, I get a log message saying "java.lang.IllegalStateException: Mod Message discarded. No recipients," but using AdminMessageRequest works fine.
function onSendGroupMessageBtClick() {
var recipMode ...
1. When I send a group chat using ModeratorMessageRequest as shown below, I get a log message saying "java.lang.IllegalStateException: Mod Message discarded. No recipients," but using AdminMessageRequest works fine.
function onSendGroupMessageBtClick() {
var recipMode ...
- 28 Aug 2024, 03:22
- Forum: SFS2X Questions
- Topic: The function getRoomListFromGroup is not working
- Replies: 2
- Views: 1464
The function getRoomListFromGroup is not working
function populateRoomsList() {
let roomsRaw = sfs.roomManager.getRoomListFromGroup("group_1");
let roomList = [];
console.log(roomsRaw)
for (let r in roomsRaw) {
let room = roomsRaw[r];
roomList.push(`
<a href="#" onclick="onRoomSelected({ id: ${room. ...
let roomsRaw = sfs.roomManager.getRoomListFromGroup("group_1");
let roomList = [];
console.log(roomsRaw)
for (let r in roomsRaw) {
let room = roomsRaw[r];
roomList.push(`
<a href="#" onclick="onRoomSelected({ id: ${room. ...
- 27 Aug 2024, 03:43
- Forum: SFS2X Questions
- Topic: How does the checkSecurePassword function and hashing work?
- Replies: 4
- Views: 1277
- 27 Aug 2024, 03:41
- Forum: SFS2X Questions
- Topic: Handling onConnection on the server?
- Replies: 1
- Views: 824
Handling onConnection on the server?
Is there any way to handle the onConnection event on the server? Currently, I've only found and read documentation that guides this on the client side. If there are any documents available, please provide me with a link. Thanks bro
- 26 Aug 2024, 10:19
- Forum: SFS2X Questions
- Topic: How does the checkSecurePassword function and hashing work?
- Replies: 4
- Views: 1277
Re: How does the checkSecurePassword function and hashing work?
My passwords in the database are hashed. When the client sends the password, I take the 'LOGIN_PASSWORD' parameter, which is already hashed by default, and then I store it in the database. However, when I retrieve it and use the 'checkSecurePassword' function, an error occurs. I don't understand why ...
- 26 Aug 2024, 06:37
- Forum: SFS2X Questions
- Topic: How does the checkSecurePassword function and hashing work?
- Replies: 4
- Views: 1277
How does the checkSecurePassword function and hashing work?
function onUserLogin(evtParams) {
var connection = dbMan.getConnection();
var username = evtParams.getParameter(SFSEventParam.LOGIN_NAME);
var loginPass = evtParams.getParameter(SFSEventParam.LOGIN_PASSWORD);
var getByUserStmt = connection.prepareStatement("SELECT ...
var connection = dbMan.getConnection();
var username = evtParams.getParameter(SFSEventParam.LOGIN_NAME);
var loginPass = evtParams.getParameter(SFSEventParam.LOGIN_PASSWORD);
var getByUserStmt = connection.prepareStatement("SELECT ...
- 23 Aug 2024, 06:42
- Forum: SFS2X Questions
- Topic: How to connect multiple databases in SmartFoxServer 2X
- Replies: 3
- Views: 1199
Re: How to connect multiple databases in SmartFoxServer 2X
Hi bro, can I connect to a NoSQL database (such as MongoDB)? Is there anything different?
- 23 Aug 2024, 02:59
- Forum: SFS2X Questions
- Topic: How to connect multiple databases in SmartFoxServer 2X
- Replies: 3
- Views: 1199
How to connect multiple databases in SmartFoxServer 2X
I am trying to learn how to connect multiple databases in a SmartFoxServer 2X JavaScript extension but can't find any documentation. Can you help me?