Hi DM,
In Synchronet's JavaScript, is there a (reliable) way to determine which message area the user is posting a message in? From what I can tell, there are 2 JavaScript variables that store sub-board codes:
bbs.smb_sub_code: The sub-board code of the message being read bbs.cursub_code: The sub-board code of the user's current sub-board
The problem is that those two sub-board codes can be different, and the
user could be posting a message in either of those sub-boards. I'm not
sure how to reliably tell which of those sub-boards the user is posting a message in.
I can change the code to make one of those properties reflect the sub being posted on (probably smb_sub_*) or possibly introduce a new property, but tha won't help you with existing sbbs installations.
Of course, if the posting is initiated from a JS shell/module, then you know what sub is being posted to already, but I'm pretty sure you're asking in th context of an external editor (i.e. SlyEdit), in which case the answer is "currently, no".
I can change the code to make one of those properties reflect the sub being posted on (probably smb_sub_*) or possibly introduce a new property, but that won't help you with existing sbbs installations.
Of course, if the posting is initiated from a JS shell/module, then you know what sub is being posted to already, but I'm pretty sure you're asking in the context of an external editor (i.e. SlyEdit), in which case the answer is "currently, no".
what about User.cursub?
Re: Determining the posting message area
By: Digital Man to Nightfox on Mon Feb 18 2013 01:29:32
I can change the code to make one of those properties reflect the sub being posted on (probably smb_sub_*) or possibly introduce a new property, but tha won't help you with existing sbbs installations.
Of course, if the posting is initiated from a JS shell/module, then you know what sub is being posted to already, but I'm pretty sure you're asking in th context of an external editor (i.e. SlyEdit), in which case the answer is "currently, no".
what about User.cursub?
Re: Determining the posting message area
By: Nightfox to Digital Man on Sun Feb 17 2013 11:42 am
Hi DM,
In Synchronet's JavaScript, is there a (reliable) way to determine which message area the user is posting a message in? From what I can tell, there are 2 JavaScript variables that store sub-board codes: bbs.smb_sub_code: The sub-board code of the message being read bbs.cursub_code: The sub-board code of the user's current sub-board
The problem is that those two sub-board codes can be different, and the user could be posting a message in either of those sub-boards. I'm not sure how to reliably tell which of those sub-boards the user is posting
a message in.
I can change the code to make one of those properties reflect the sub being posted on (probably smb_sub_*) or possibly introduce a new property, but that won't help you with existing sbbs installations.
Of course, if the posting is initiated from a JS shell/module, then you
know what sub is being posted to already, but I'm pretty sure you're asking in the context of an external editor (i.e. SlyEdit), in which case the answer is "currently, no".
I can change the code to make one of those properties reflect the sub
being posted on (probably smb_sub_*) or possibly introduce a new
property, but that won't help you with existing sbbs installations.
I just committed a change to writemsg.cpp which I believe does what you want: the bbs.smb_sub* properties will now reflect the sub-board being posted to, always.
Re: Determining the posting message area
By: Digital Man to Nightfox on Tue May 07 2013 01:50:49
I can change the code to make one of those properties reflect the sub
being posted on (probably smb_sub_*) or possibly introduce a new
property, but that won't help you with existing sbbs installations.
I just committed a change to writemsg.cpp which I believe does what
you want: the bbs.smb_sub* properties will now reflect the sub-board being posted to, always.
Cool, thanks for making the change.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,042 |
Nodes: | 15 (0 / 15) |
Uptime: | 05:09:46 |
Calls: | 500,304 |
Calls today: | 5 |
Files: | 95,203 |
D/L today: |
273 files (31,950K bytes) |
Messages: | 465,488 |