Results 1 to 8 of 8

Thread: Intranet Hyperlink Generator Question

  1. #1
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Intranet Hyperlink Generator Question

    Well, I'm not sure if I'm wording the title correctly but I do think the people at this site can solve this question.

    I am tasked with creating a webpage on a company server not accessible to the internet. There are too many folders and subfolders with various types of documents in each. I have googled and looked at various websites to find something that will automatically create hyperlinks to a file. I will be copy/paste/edit any hyperlink created and import them into a webpage for a graphical navigation through a shared drive to selected documents.

    Any ideas would be greatly appreciated.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    More data about your server is required.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Type: Network Drive
    File System: NWFS

    I'm thinking that whatever program or script that could work on a local hard drive trying to accomplish the same thing would work. I know using windows explorer is the normal way to navigate through a local hard drive, but they are wanting something that looks like a website to navigate to the same files that they could just simply use shortcuts for.

    If I edited a hyperlink on a blank webpage to navagate to file.xls I can use any of the following three path's and it works fine using internet explorer.

    \\DRIVE\VOL1\SHARDATA\MAIN_FOLDER\SUB_FOLDER\FILE.XLS
    FILE:///H:/MAIN_FOLDER/SUB_FOLDER/FILE.XLS
    H:\MAIN_FOLDER\SUB_FOLDER\FILE.XLS

    Hope this helps

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It doesn't.
    "Network Drive" is not a real protocol. It's an abstraction laid over (I believe) several protocols in Microsoft Windows.
    The filesystem on the server isn't all that useful, although it is interesting (NetWare FS? Is this a Novell NetWare server?).

    I will presume that you're talking about the SMB (System Message Block) protocol here, which is the most common for use with Windows "Shared Drives," but I could be wrong -- your choice of filesystem causes me to wonder about that. In this case there is, insofar as I am aware, no way of executing scripts before sending the output to the client implemented on either of the two popular servers (Samba and Microsoft Windows Server). This makes the effect you wish to achieve virtually impossible with any degree of temporal accuracy. I would suggest running a protocol that does allow this in common implementations, such as HTTP or, I believe, FTP.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    I must clarify a couple of things ... I'm not a computer specialist and it's not my server, and I'm just trying to get an initial path to those files, not something that runs continuous. I'm just trying to save myself time of creating literally hundreds of links. I understand that the beginning of the link may have to be edited, but not the complete link. Once I have a list of all the hyperlinks to the files, I will maintain it manually. I just want a simple plain page of links so I can copy them as I need to a web site design that I'm working on.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Aaah, that makes a lot more sense.
    What scripting languages do you have available? Or must this be done with a binary? Do you have Java?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Php, htm, and java

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    PHP will be simplest, methinks...
    Code:
    <?php
    function recurseDir($c) {
      echo("<ul>");
      $d = opendir($c);
      while($f = readdir($d)) {
        if(strpos($f, ".") === 0) continue;
        $ff = $c . "/" . $f;
        echo("<li><a href=\"$ff\">$ff</a>\n");
        if(is_dir($ff)) recurseDir($ff);
        echo("</li>");
      }
      echo("</ul>");
    }
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
      <head>
        <title>
          The Head Doom Fish Recursor, by Twey
        </title>
      </head>
      <body>
        <p>
        <?php
          recurseDir(".");
        ?>
        </p>
      </body>
    </html>
    It's in HTML format because it's easier to read. If you require it to be in text form, that's not too difficult; try this:
    Code:
    <?php
    header("Content-Type: text/plain");
    
    function recurseDir($c, $l = -1) {
      ++$l;
      $d = opendir($c);
      while($f = readdir($d)) {
        if(strpos($f, ".") === 0) continue;
        $ff = $c . "/" . $f;
        for($i=0;$i<$l;$i++) echo(" ");
        echo("$ff\n");
        if(is_dir($ff)) recurseDir($ff, $l + 1);
      }
      --$l;
    }
    
    recurseDir(".");
    ?>
    Remove the header() call if you're running it from the command-line rather than a browser.
    Last edited by Twey; 06-14-2006 at 03:58 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •