• Determining the posting message area

    From Nightfox@DIGDIST to Digital Man on Sunday, February 17, 2013 11:42:23
    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.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man to Nightfox on Monday, February 18, 2013 01:29:32
    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".

    digital man

    Synchronet "Real Fact" #78:
    172 Synchronet Match Maker registrations were sold (@$69) between 1995 and 1996.
    Norco, CA WX: 47.7°F, 92.0% humidity, 1 mph SE wind, 0.00 inches rain/24hrs
  • From MCMLXXIX@MDJ to Digital Man on Monday, February 18, 2013 09:34:18
    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?

    ---
    ■ Synchronet ■ The BRoKEN BuBBLE (MDJ.ATH.CX)
  • From Nightfox@DIGDIST to Digital Man on Monday, February 18, 2013 09:04:00
    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 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".

    Yeah, it was for SlyEdit.. Thanks for the reply. A property to store which message sub is being posted into might be good in future versions of Synchronet.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com
  • From Nightfox@DIGDIST to MCMLXXIX on Monday, February 18, 2013 09:12:51
    Re: Determining the posting message area
    By: MCMLXXIX to Digital Man on Mon Feb 18 2013 09:34:18

    what about User.cursub?

    Interesting - The documentation makes it sound like user.cursub might be the one, but that doesn't seem to reflect the user's current sub-board. I tried using Synchronet's Message Read prompt in my current sub-board (to make sure all the JS variables are set properly) and then wrote a test JS script to output user.cursub, and it was for a different sub-board, into which I had posted a message last night. So I'm not sure which sub-board user.cursub is meant to refer to.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man to MCMLXXIX on Monday, February 18, 2013 15:48:33
    Re: Determining the posting message area
    By: MCMLXXIX to Digital Man on Mon Feb 18 2013 09:34 am

    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?

    No, that property reflects what sub-board they have selected from the main menu
    (sort of like the current working directory in DOS). This may or may not be the
    sub they are posting to (depending on how they got to that point, e.g. using a new-message-scan).

    digital man

    Synchronet "Real Fact" #10:
    DOVE-Net was originally an exclusive ("elite") WWIVnet network in O.C., Calif. Norco, CA WX: 62.3°F, 53.0% humidity, 8 mph NNW wind, 0.00 inches rain/24hrs
  • From Digital Man to Nightfox on Tuesday, May 07, 2013 01:50:49
    Re: Determining the posting message area
    By: Digital Man to Nightfox on Mon Feb 18 2013 01:29 am

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

    digital man

    Synchronet "Real Fact" #17:
    Rob Swindell first learned to program in C by hacking on WWIV BBS software. Norco, CA WX: 56.8°F, 74.0% humidity, 2 mph NNE wind, 0.04 inches rain/24hrs
  • From Nightfox@DIGDIST to Digital Man on Tuesday, May 07, 2013 19:28:10
    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.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man to Nightfox on Wednesday, May 08, 2013 23:12:43
    Re: Determining the posting message area
    By: Nightfox to Digital Man on Tue May 07 2013 07:28 pm

    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.

    No problem. Please let me know how it works for you.

    digital man

    Synchronet "Real Fact" #46:
    The Synchronet Museum is online at http://wiki.synchro.net/history:museum: Norco, CA WX: 58.9°F, 63.0% humidity, 7 mph NW wind, 0.00 inches rain/24hrs