• Sharing content across sites (FP2002)

    Home » Forums » Developers, developers, developers » Web design and development » Sharing content across sites (FP2002)

    Author
    Topic
    #397775

    Hi;

    We’re trying to figure out a way to share common page content (usually flat html with hyperlinks, tables, etc.) across three different intranet sites.

    Nothing we’ve tried works: Server-side includes don’t work across sites, IFRAMES don’t inherit each site’s unique page/font styles, and converting the html content to JavaScript files (a simple translation of each line of html that is then document.writ(ten), and then calling it into the page) causes more behind-the-scenes maintenance than just plainly maintaining the three sites separately.

    Because the sites have different formatting (mainly font size and bullet and heading styles), none of these file-sharing attempts seems worthwhile.

    Is there a straightforward way to pull shared information into pages across sites that also inherits the local page’s inherent styles?

    Thanks,
    Dave

    Viewing 3 reply threads
    Author
    Replies
    • #755620

      Interesting problem. I’ve never tried it myself, but… assuming you have standardized on a single DOM (e.g., IE5+), you could create a DIV in your page (with the attribute ID=”DIV1″) and stuff the entire blob of HTML into it using, for example:

      var myDiv = document.getElementById(“DIV1”);
      myDiv.innerHTML = strHugeBlobOfHTML;

      I guess the question then is how to get the huge string from the other server’s file system in a lightweight manner. I might experiment with this some more if I can find the right approach.

      • #755909

        Thanks. ) As of now, I still haven’t found anything that’ll work.

        Dave

      • #755910

        Thanks. ) As of now, I still haven’t found anything that’ll work.

        Dave

    • #755621

      Interesting problem. I’ve never tried it myself, but… assuming you have standardized on a single DOM (e.g., IE5+), you could create a DIV in your page (with the attribute ID=”DIV1″) and stuff the entire blob of HTML into it using, for example:

      var myDiv = document.getElementById(“DIV1”);
      myDiv.innerHTML = strHugeBlobOfHTML;

      I guess the question then is how to get the huge string from the other server’s file system in a lightweight manner. I might experiment with this some more if I can find the right approach.

    • #756606

      Are these three INTRANET sites on the same machine?

      • #756630

        Sorry, three different machines, three different domains. Our company is, internally, three. Combining the sites into one isn’t practical because the business needs are different enough among them that we’d be forced to do so much “click here for this way, click here for that way, click here for the other way” that we might as well have kept 3 separate sites.

        The problem arises when we run into common corporate-wide content that we now have to maintain identically in 3 locations, each with the look and feel of it’s site. Not something the big paycheck folks saw coming. )

        Dave

        • #756634

          Okay, two more questions. Are they running on computers you/company have access too, and are they NT based (IIS servers)?

          • #756640

            1. Yeah, they’re our servers.
            2. Two are on IIS, one on Linux/Apache.

            Love the logo on your posts by the way. ) One point of weirdness – I clicked the email notification’s link to view your post and the logo was there under your name. Then I logged in to do this reply, and all the logos disappeared. Odd, that. confused

            Dave

            • #760458

              Could have sworn I replied to this a while back, but I’ve been out with the flu, and going through all the mail in my inbox, and I didn’t see a reply to this on the lounge. Go figure.

              Okay, essentially what I was going to recommend was an ASP/VB .dll combination. Put the master files on the Linux/Apache machine (since it won’t allow VB .dll’s). On that, the ‘master’ server, create an .asp page that can be given a filename and date/time (as querystring data), and have it return yes/no, or true false, as to whether or not the file requested is ‘newer’ then the date sent with the filename.

              Then, on the IIS servers, create a .dll which does that interaction, using the URLdownloadToFile api, you can hit the asp page on the Linux machine, to determine if the locally ‘cached’ file is the current one, if it is, the .dll returns the text within that file, if it isn’t, it downloads the latest one (from the Linux, using the same API), and then sends the text within the new file (which is now cached for the next user that hits the page).

              I know I’m glossing over specifics, just wanted to give you an outline of how I would do this.

              The other method, which would work just as well, actually, probably a bit better, would be to make an NT service (which you can do with VB (sorry, I’m a VB guy… grin). There is an API that you can call, to ‘watch’ changes in a particular folder, including adding/editing files. Set one of the IIS servers as the ‘Master’ server, and put the ‘includes’ in a particular folder, that the service would ‘watch’. Whenever a file on the master server is changed or added, the service would ‘push out’ the new file to the other two servers. That’s the only catch I can think of, because I’m not exactly sure how to ‘upload’ a file to another machine, without there being some sort of Fileshare, or FTP involved.

              Well, there’s two suggestions for ya.

              My logo is from my website. Not sure why my logo would act up the way you described though……go figure.

            • #762695

              Thanks for the ideas! )

              Dave

            • #762696

              Thanks for the ideas! )

              Dave

            • #760459

              Could have sworn I replied to this a while back, but I’ve been out with the flu, and going through all the mail in my inbox, and I didn’t see a reply to this on the lounge. Go figure.

              Okay, essentially what I was going to recommend was an ASP/VB .dll combination. Put the master files on the Linux/Apache machine (since it won’t allow VB .dll’s). On that, the ‘master’ server, create an .asp page that can be given a filename and date/time (as querystring data), and have it return yes/no, or true false, as to whether or not the file requested is ‘newer’ then the date sent with the filename.

              Then, on the IIS servers, create a .dll which does that interaction, using the URLdownloadToFile api, you can hit the asp page on the Linux machine, to determine if the locally ‘cached’ file is the current one, if it is, the .dll returns the text within that file, if it isn’t, it downloads the latest one (from the Linux, using the same API), and then sends the text within the new file (which is now cached for the next user that hits the page).

              I know I’m glossing over specifics, just wanted to give you an outline of how I would do this.

              The other method, which would work just as well, actually, probably a bit better, would be to make an NT service (which you can do with VB (sorry, I’m a VB guy… grin). There is an API that you can call, to ‘watch’ changes in a particular folder, including adding/editing files. Set one of the IIS servers as the ‘Master’ server, and put the ‘includes’ in a particular folder, that the service would ‘watch’. Whenever a file on the master server is changed or added, the service would ‘push out’ the new file to the other two servers. That’s the only catch I can think of, because I’m not exactly sure how to ‘upload’ a file to another machine, without there being some sort of Fileshare, or FTP involved.

              Well, there’s two suggestions for ya.

              My logo is from my website. Not sure why my logo would act up the way you described though……go figure.

          • #756641

            1. Yeah, they’re our servers.
            2. Two are on IIS, one on Linux/Apache.

            Love the logo on your posts by the way. ) One point of weirdness – I clicked the email notification’s link to view your post and the logo was there under your name. Then I logged in to do this reply, and all the logos disappeared. Odd, that. confused

            Dave

        • #756635

          Okay, two more questions. Are they running on computers you/company have access too, and are they NT based (IIS servers)?

      • #756631

        Sorry, three different machines, three different domains. Our company is, internally, three. Combining the sites into one isn’t practical because the business needs are different enough among them that we’d be forced to do so much “click here for this way, click here for that way, click here for the other way” that we might as well have kept 3 separate sites.

        The problem arises when we run into common corporate-wide content that we now have to maintain identically in 3 locations, each with the look and feel of it’s site. Not something the big paycheck folks saw coming. )

        Dave

    • #756607

      Are these three INTRANET sites on the same machine?

    Viewing 3 reply threads
    Reply To: Sharing content across sites (FP2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: