• msgbase.get_msg_header

    From datavase@VERT/DATAVASE to All on Fri Mar 26 16:50:27 2010
    Hi,

    I'm writing an .js with the aim of exporting mesage areas to a PHP forum
    based.
    On my .js I have:

    var msg_header = msgbase.get_msg_header(6); console.print("\r\n\1n"+msg_header);

    Instead of the header of the message 6, what I get on the screen is:
    [object MsgHeader]

    Please, could somebody point me to the right direction? What I'm doing wrong? Thanks a lot.

    Cheers,
    datavase

    -+-
    ß Synchronet ß datavase BBS (telnet/WWW: bbs.datavase.info) - 2:250/8

    ---
    þ Synchronet þ datavase BBS - telnet://bbs.datavase.info
  • From Digital Man@VERT to datavase on Fri Mar 26 17:19:41 2010
    Re: msgbase.get_msg_header
    By: datavase to All on Fri Mar 26 2010 09:50 am


    I'm writing an .js with the aim of exporting mesage areas to a PHP forum based.
    On my .js I have:

    var msg_header = msgbase.get_msg_header(6); console.print("\r\n\1n"+msg_header);

    Instead of the header of the message 6, what I get on the screen is:
    [object MsgHeader]

    Please, could somebody point me to the right direction? What I'm doing wrong? Thanks a lot.

    msg_header is an object. To view the properties of an object, you need to reference them (like msg_header.from). See http://synchro.net/docs/jsobjs.html#MsgBase_methods save_msg() method for a complete list of header fields (properties). You can also enumerate through the properties and display them all using code such as:

    for (p in msg_header)
    print(p +'='+ msg_header[p]);

    And see the examples .js files in your exec dir.

    digital man

    Snapple "Real Fact" #148:
    The tallest man was 8 ft. 11 in.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From datavase@VERT/DATAVASE to Digital Man on Sat Mar 27 18:01:59 2010
    Re: msgbase.get_msg_header
    By: datavase to All on Fri Mar 26 2010 09:50 am


    I'm writing an .js with the aim of exporting mesage areas to a PHP forum based.
    On my .js I have:

    var msg_header = msgbase.get_msg_header(6); console.print("\r\n\1n"+msg_header);

    Instead of the header of the message 6, what I get on the screen is: [object MsgHeader]

    Please, could somebody point me to the right direction? What I'm doing wrong? Thanks a lot.

    msg_header is an object. To view the properties of an object, you need to reference them (like msg_header.from). See http://synchro.net/docs/jsobjs.html#MsgBase_methods save_msg() method for a complete list of header fields (properties). You can also enumerate through the properties and display them all using code such as:

    for (p in msg_header)
    print(p +'='+ msg_header[p]);

    And see the examples .js files in your exec dir.

    digital man

    Snapple "Real Fact" #148:
    The tallest man was 8 ft. 11 in.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net

    Thanks a lot DM,

    the information was excellent. Now I'm getting the information I wanted using the properties.

    Cheers,
    datavase

    -+-
    ß Synchronet ß datavase BBS (telnet/WWW: bbs.datavase.info) - 2:250/8

    ---
    þ Synchronet þ datavase BBS - telnet://bbs.datavase.info