Pulling a small text file into HTML? Easy? Bah!

Discussion in 'HTML' started by Steve, Nov 17, 2005.

  1. Steve

    Steve Guest

    Hi!

    Can anyone help me with this little problem? I just want to be able to pull
    in a small (say 3 or 4 lines) external text file of gig dates into a table
    cell on my band website. Am I right in thinking the only way to go about
    this is by making it an .xml file, then turning each of my pages into XSLT
    pages and then referencing the .xml and displaying client side? This all
    seems extremely complicated!! Is there an easier way I have completely
    overlooked?! If anyone could help me I'm really looking for help learning
    something new here :)

    Cheers!

    Steve
     
    Steve, Nov 17, 2005
    #1
    1. Advertising

  2. Steve

    Steve Guest

    Ahh sorry - yes, I forget to mention that I don't wanna use any server side
    languages if at all possible...

    S.



    ??>> Can anyone help me with this little problem? I just want to be
    ??>> able to pull in a small (say 3 or 4 lines) external text file of
    ??>> gig dates into a table cell on my band website. Am I right in
    ??>> thinking the only way to go about this is by making it an .xml
    ??>> file, then turning each of my pages into XSLT pages and then
    ??>> referencing the .xml and displaying client side? This all seems
    ??>> extremely complicated!! Is there an easier way I have completely
    ??>> overlooked?! If anyone could help me I'm really looking for help
    ??>> learning something new here :)

    BtS> A PHP include? I'm asking because I've never done this inside a
    BtS> table, but it seems like it would work.


    With best regards, Steve. E-mail:
     
    Steve, Nov 17, 2005
    #2
    1. Advertising

  3. Steve wrote:

    > Can anyone help me with this little problem? I just want to be
    > able to pull in a small (say 3 or 4 lines) external text file of
    > gig dates into a table cell on my band website. Am I right in
    > thinking the only way to go about this is by making it an .xml
    > file, then turning each of my pages into XSLT pages and then
    > referencing the .xml and displaying client side? This all seems
    > extremely complicated!! Is there an easier way I have completely
    > overlooked?! If anyone could help me I'm really looking for help
    > learning something new here :)


    A PHP include? I'm asking because I've never done this inside a
    table, but it seems like it would work.

    --
    Blinky
    Killing all Google Groups posts.
    http://blinkynet.net/comp/uip5.html
     
    Blinky the Shark, Nov 17, 2005
    #3
  4. Steve

    JDS Guest

    On Thu, 17 Nov 2005 20:06:20 +0000, Steve wrote:

    > This all
    > seems extremely complicated!!



    Wow, you are right. Don't know what your server specs are, but there are
    ways to do this on pretty much any webserver.

    Google on:
    SSI

    PHP includes

    ASP

    ASP will let you use the same syntax as SSI.

    SSI/ASP can be as simple as this:

    <table>
    <tr>
    <td>
    <!--#include virtual="gig_dates.html" -->
    </td>
    </tr>
    </table>

    The "#include" line in PHP would look like this:

    <?php include("gig_dates.html")?>


    later...


    --
    JDS | lid
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
     
    JDS, Nov 17, 2005
    #4
  5. Steve

    Steve Guest

    Cheers for the help guys - but let me now make it a bit more tricky;
    firstly, as I said I can't use PHP, ASP, etc as I am using a cheap ass
    server! Secondly, it has to be pulling in a simple file as the person
    assigned to editing it has no HTML knowledge!

    S.
     
    Steve, Nov 17, 2005
    #5
  6. Steve

    mbstevens Guest

    Steve wrote:
    > Ahh sorry - yes, I forget to mention that I don't wanna use any server side
    > languages if at all possible...
    >
    > S.
    >
    >
    >
    > ??>> Can anyone help me with this little problem? I just want to be
    > ??>> able to pull in a small (say 3 or 4 lines) external text file of
    > ??>> gig dates into a table cell on my band website. Am I right in
    > ??>> thinking the only way to go about this is by making it an .xml
    > ??>> file, then turning each of my pages into XSLT pages and then
    > ??>> referencing the .xml and displaying client side? This all seems
    > ??>> extremely complicated!! Is there an easier way I have completely
    > ??>> overlooked?! If anyone could help me I'm really looking for help
    > ??>> learning something new here :)
    >
    > BtS> A PHP include? I'm asking because I've never done this inside a
    > BtS> table, but it seems like it would work.
    >
    >
    > With best regards, Steve. E-mail:
    >
    >

    Also possible are SSI, using preprocessing then uploading, or generating
    the pages server side. Just be sure that whatever you put inside that
    cell is valid to put there. Which way you choose to do it depends on
    what is available and what your privileges are on the server.
    --
    mbstevens
    http://www.mbstevens.com/preprocessor
     
    mbstevens, Nov 17, 2005
    #6
  7. Steve wrote:
    > Cheers for the help guys - but let me now make it a bit more tricky;
    > firstly, as I said I can't use PHP, ASP, etc as I am using a cheap ass
    > server! Secondly, it has to be pulling in a simple file as the person
    > assigned to editing it has no HTML knowledge!
    >
    > S.


    If server side processing is not an option, you are stuck
    with either
    a) preprocessing at "home"
    b) client-side processing
    c) teaching the other guy a wee bit of HTML

    I strongly recommend against (b) because either javascript
    or xml/xslt are not supported widely enough (search engines,
    users with disabled JS, older browsers, ...).

    (a) is fine but that means that whoever is going to edit the
    plain-text file must have a scripting language or an capable
    preprocessor available on the local computer, make changes
    to the plain-text file, run the script/preprocessor and
    upload the files via FTP or web interface.
    Now if he's gonna learn all that, you might just as well
    skip all the fuss with preprocessors and show him what to
    change in a series of blocks like
    <tr><td class="gigPlace">
    At me momma's house
    </td><td class="gigTime">
    Tuesday 9pm
    </td></tr>
    He doesn't need to know what all that stuff is, just to
    recognize it as a delimiter. This is not hard to learn at
    all. And if you enter the first few he'll always have
    examples at hand.

    All in all, I'm sure (c) is the simplest. Preprocessing is a
    viable option, especially if you have more than just two,
    three pages and can make use of a preprocessor in several
    ways, not just for listing the gigs.
     
    Mitja Trampus, Nov 17, 2005
    #7
  8. Steve

    JDS Guest

    On Thu, 17 Nov 2005 20:26:54 +0000, Steve wrote:

    > firstly, as I said I can't use PHP, ASP, etc as I am using a cheap ass
    > server! Secondly, it has to be pulling in a simple file as the person
    > assigned to editing it has no HTML knowledge!


    How cheap? Even the cheapest of cheap web hosts these days provides some
    sort of server-side processing. You said what you *don't* have -- now,
    what *do* you have to work with?

    And all the methods I used previously can pull in *any* kind of text file,
    HTML or plain text.

    And frankly, HTML is pretty easy to learn. At least the basics you would
    need to update a simple file like the one you described.

    --
    JDS |
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
     
    JDS, Nov 17, 2005
    #8
  9. JDS wrote:

    > On Thu, 17 Nov 2005 20:26:54 +0000, Steve wrote:
    >
    >> firstly, as I said I can't use PHP, ASP, etc as I am using a
    >> cheap ass server! Secondly, it has to be pulling in a simple
    >> file as the person assigned to editing it has no HTML
    >> knowledge!

    >
    > How cheap? Even the cheapest of cheap web hosts these days
    > provides some sort of server-side processing. You said what you
    > *don't* have -- now, what *do* you have to work with?


    I'm wondering if he was using his *own* server. Notice he doesn't
    say he has a cheap-ass *host*.


    --
    Blinky
    Killing all Google Groups posts.
    http://blinkynet.net/comp/uip5.html
     
    Blinky the Shark, Nov 18, 2005
    #9
  10. Steve

    JDS Guest

    On Fri, 18 Nov 2005 00:17:18 +0000, Blinky the Shark wrote:

    > I'm wondering if he was using his *own* server. Notice he doesn't
    > say he has a cheap-ass *host*.


    Right. Well, even better, if that is the case -- all the software needed
    to run an advanced web server can be had for free.

    --
    JDS |
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
     
    JDS, Nov 18, 2005
    #10
  11. JDS wrote:

    > On Fri, 18 Nov 2005 00:17:18 +0000, Blinky the Shark wrote:
    >
    >> I'm wondering if he was using his *own* server. Notice he
    >> doesn't say he has a cheap-ass *host*.

    >
    > Right. Well, even better, if that is the case -- all the


    We'll see.

    > software needed to run an advanced web server can be had for
    > free.


    I, Apache user, know. ;)

    --
    Blinky
    Killing all Google Groups posts.
    http://blinkynet.net/comp/uip5.html
     
    Blinky the Shark, Nov 18, 2005
    #11
  12. Steve

    Steve Guest

    Right guys, I guess I'm going to round off this thread; firstly on was on
    cheap hosting - not running my own host. Secondly you were right - it's
    easier to teach this guy how to edit HTML than do all of this. Shame really
    as it was interesting to mess around with the XML! Thanks also for so many
    truly *helpful* comments and advice - rare in some newsgroups now!

    Take care!

    Steve
     
    Steve, Nov 18, 2005
    #12
  13. Steve

    Steve Guest

    actually it's not completely finished - I'm going to look at pulling .xml
    into Flash instead :)

    S.
     
    Steve, Nov 18, 2005
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Sobol
    Replies:
    10
    Views:
    982
    Steve Sobol
    Sep 3, 2004
  2. bjg
    Replies:
    15
    Views:
    571
    kchayka
    Dec 14, 2003
  3. luckyads
    Replies:
    0
    Views:
    590
    luckyads
    Jan 21, 2009
  4. luckyads
    Replies:
    0
    Views:
    447
    luckyads
    Jan 22, 2009
  5. Replies:
    17
    Views:
    303
    Tad McClellan
    Mar 10, 2006
Loading...

Share This Page