• Message base: Editing existing messages

    From Nightfox@VERT/DIGDIST to All on Thursday, June 11, 2009 15:57:54
    Hi all -

    One of the toggle options for a message area is whether or not a user can
    edit existing messages. I've been looking at Synchronet's JS documentation trying to find a function that will allow a user to edit an existing message, but the docs don't seem to mention a function that would do that. Is
    there a way to do that in JavaScript?

    Eric


    ---
    þ Synchronet þ Digital Distortion BBS
  • From Digital Man@VERT to Nightfox on Thursday, June 11, 2009 19:20:28
    Re: Message base: Editing existing messages
    By: Nightfox to All on Thu Jun 11 2009 03:57 pm

    Hi all -

    One of the toggle options for a message area is whether or not a user can edit existing messages. I've been looking at Synchronet's JS documentation trying to find a function that will allow a user to edit an existing message, but the docs don't seem to mention a function that would do that. Is
    there a way to do that in JavaScript?

    If you're looking for a high-level method (where it automatically uses the user's configured editor, etc.) there is no such function. You can however load the message's text (using the MsgBase class) into a buffer, save to a file, then use the console.editfile() function to edit the contents, load the file contents back into a buffer an duse the MsgBase class to save the modified message body.

    It's probably not worth the effort. :-)

    The C++ method that would need to be exposed via JS (and isn't) is sbbs_t::editmsg() and it wouldn't be trivial to do since it needs an open message as an argument. I'll add it to the to-do list however.

    digital man

    Snapple "Real Fact" #73:
    The average person spends 2 weeks of it's life waiting for a traffic light to change.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Thursday, June 11, 2009 20:43:25
    Re: Message base: Editing existing messages
    By: Digital Man to Nightfox on Thu Jun 11 2009 19:20:28

    If you're looking for a high-level method (where it automatically uses th user's configured editor, etc.) there is no such function. You can howeve the message's text (using the MsgBase class) into a buffer, save to a fil then use the console.editfile() function to edit the contents, load the f contents back into a buffer an duse the MsgBase class to save the modifie message body.

    Thanks. :)

    Nightfox


    ---
    þ Synchronet þ Digital Distortion BBS