• Adding links

    From JahLuv@VERT/CREATI0N to All on Sun Mar 9 01:37:00 2008
    Hello everyone'

    I'm trying to add a link to the web portion of synchronet. I've added a link

    in the leftnav.inc & used the example from the webserver doc in the leftnav.ssjs

    if(http_request.virtual_path=="tiddly/crap.html")
    template.leftnav.push({html: '<span class="tlink">
    Crap</span>'});

    But I keep getting a syntax error...

    So I adjusted it to this:


    if(http_request.virtual_path=="/tiddly/crap.html")
    template.leftnav.push({html: '</span>'});

    When I click on the link I get a blank page with a text box?

    By no means am I a wiz at programming(guess I gotta add it to my to-do-list)

    Can some one help me out here? Thanks....

    ---
    þ Synchronet þ JAHLUV - jahmancreationz.kicks-ass.net
  • From Angus McLeod@VERT/ANJO to JahLuv on Sun Mar 9 06:29:00 2008
    Re: Adding links
    By: JahLuv to All on Sun Mar 09 2008 06:37:00

    in the leftnav.inc & used the example from the webserver doc in the leftnav.ssjs

    if(http_request.virtual_path=="tiddly/crap.html")
    template.leftnav.push({html: '<span class="tlink">
    Crap</span>'});

    But I keep getting a syntax error...

    Any more info as to the specific nature pf the syntax error available?

    So I adjusted it to this:


    if(http_request.virtual_path=="/tiddly/crap.html")
    template.leftnav.push({html: '</span>'});

    You just eliminated the opening tag to (and contents of) the SPAN? What
    were yiu trying to achieve?

    ---
    Playing loud: "Do That To Me One More Time" by "Captain & Tenille".
    þ Synchronet þ Where we BAJA Rob into writing our modules. The ANJO BBS
  • From JahLuv@VERT/CREATI0N to Angus McLeod on Sun Mar 9 11:26:00 2008
    > > if(http_request.virtual_path=="/tiddly/crap.html")
    template.leftnav.push({html: '<span class="tlink">
    Crap</span>'});

    But I keep getting a syntax error...

    >Any more info as to the specific nature pf the syntax error available?

    I get this error:

    !JavaScript c:\sbbs\mods\../web/lib/leftnav_html.ssjs line 102: SyntaxError: unterminated string literal

    line 102 is the :

    template.leftnav.push({html: '<span class="tlink">


    JAhLuv

    ---
    þ Synchronet þ JAHLUV - jahmancreationz.kicks-ass.net
  • From Angus McLeod@VERT/ANJO to JahLuv on Sun Mar 9 18:08:00 2008
    Re: Re: Adding links
    By: JahLuv to Angus McLeod on Sun Mar 09 2008 15:26:00

    > > if(http_request.virtual_path=="/tiddly/crap.html")
    template.leftnav.push({html: '<span class="tlink">
    Crap</span>'});


    I get this error:

    !JavaScript c:\sbbs\mods\../web/lib/leftnav_html.ssjs line 102: SyntaxError: unterminated string literal

    line 102 is the :

    template.leftnav.push({html: '<span class="tlink">

    Try joining that, and the next line like so:

    template.leftnav.push({html: '<span class="tlink"> Crap</span>'});
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    I'm not sure if you can break the string across two lines. Some languages
    are OK with it; some complain.

    ---
    Playing loud: "I Can't Tell You Why" by "Eagles".
    þ Synchronet þ Where we BAJA Rob into writing our modules. The ANJO BBS
  • From JahLuv@VERT/CREATI0N to Angus McLeod on Sun Mar 9 20:35:00 2008
    > Try joining that, and the next line like so:

    template.leftnav.push({html: '<span class="tlink"> Crap</span>'});

    Thanks for the reply Angus, I actually noticed that after I posted. It solved the syntax error.. But I still cannot connect to the html page I'm wanting, it sends me to my 404.htm. I have no clue why.
    This is what I actually have in both files.

    leftnav.inc

    <a href="/test/empty.htm">Info</a>

    leftnav_html.ssjs

    if(http_request.virtual_path=="/test/empty.html")
    template.leftnav.push({html: '<span class="tlink">Info</span>'});
    Any clues??

    Â Ú¿ Â Â Â Ú ¿ Ú ¿
    Jahmancreationz.kicks-ass.net
    ÀÄÙ À Ù Á Á ÁÄÙ ÀÄÙ ÀÙ

    ---
    þ Synchronet þ JAHLUV - jahmancreationz.kicks-ass.net
  • From JahLuv@VERT/CREATI0N to All on Mon Mar 10 16:41:00 2008
    Oh Snap!!!

    I just realized what the hell i was doing wrong...
    I had my <a href="/test/empty.htm">Info</a> correct. I just didn't have my folder in the root directory. I was thinking that /web was the root.

    JAhLuv


    Â Ú¿ Â Â Â Ú ¿ Ú ¿
    Jahmancreationz.kicks-ass.net
    ÀÄÙ À Ù Á Á ÁÄÙ ÀÄÙ ÀÙ

    ---
    þ Synchronet þ JAHLUV - jahmancreationz.kicks-ass.net