Slide show: this should be fairly straightforward - a what language to use question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Al Davis

    Slide show: this should be fairly straightforward - a what language to use question

    Note: I tried cross-posting this message to several newsgoups,
    including comp.lang.perl. misc, c.l.p.moderated ,
    comp.infosystem s.www.authoring.cgi, comp.lang.javas cript and
    comp.lang.php. Nothing appeared on my news server, so I'm trying
    again - this time posting a separate copy of the message to each
    group.

    I'm thinking this should be fairly easy to accomplish - a quick and
    dirty ... what? ... script? program?

    Background: I have a website - created using a html-generator
    application called Dreamweaver. I have some limited knowledge of
    html, and I sort of know what php does. I've read that Perl is cool,
    powerful and free ... but beyond that ...???. I know next to nothing
    about Javascript.

    Here's the scenario:

    o User brings up page with, say, 5 thumbnail images. The thumbnails
    represent 5 sets of slides (jpegs), in, say, 5 separate subdirectories
    living in my area of my website host's system. Each slide set
    contains from 10 to 20 images, each with an associated caption. Jpegs
    are named: s01.jpg, s02.jpg, s03.jpg, ... in each subdirectory (or
    maybe they have unique names - but let's simplify). The slides are
    different sizes, ranging from 400x300 to 1000x800 pixels

    o Selecting a thumbnail (by clicking) from among the 5 takes the user
    to a page where he sees the first slide and first caption associated
    with that thumb. In additon to the jpeg and the caption, the screen
    would contain some buttons that the user can click to go back a slide,
    go forward a slide, or return home to thumbnail page. User can also
    click on an image to enlarge it - meaning he would bring up the same
    page, but it would show the file t01.jpg, which is, say, an un-cropped
    version of s01.jpg. (Or perhaps, he would have specified at the home
    page whether he wanted the high or the low bandwith version of the
    slide show.)

    o Subsequent clicking on the forward button brings up the subsequent
    slides in sequence, returning to the first slide after the last is
    displayed. Other than the different images and captions, the pages are
    identical with regard to title, background, font, layout, etc.

    I know how to accomplish this by the brute force method: For each of
    the X number of images in a subdirectory, create X unique html
    code-pages - slide1.htm, slide2.htm, etc. - that each reference a
    particular image and particular caption, bringing up the next (or
    previous) code-page in sequence when the user clicks to advance (or go
    back). So for 5 sets of slides, each with 20 images, you'd have a
    total of 100 unique .htm files. Actually, there would be 200 files,
    given that there are a small and large version of each image.

    Here's the more elegant approach:

    One "routine" does everything. You ?pass? the name of the slide show
    subdirectory to the routine as an ?argument?, and assign it to a
    filename ?string variable? somehow. You might also pass the number of
    slides in the subdirectory, unless there's a way for the routine to
    determine what it is (like, by reading the number from another file,
    or by "calling" some ?system function?, that reveals the number of
    files in the directory.) The routine then loops through the list,
    counting from 1 to X, and somehow opening the associated s0n.jpg file
    (and associated caption text) to put up on the user's screen as he
    clicks his way through the show.

    This brings up a host (no pun intended) of basic questions:

    o Where would this code or script or html actually run? On the site
    host? It is downloaded to the user's machine? Is it intrepreted by
    some entity - like the browser?

    o What support is needed on the host side for something like this?
    What about the user/client side? If it's just a browser he needs, will
    any old browser do? (I do know that the host for my own website ...
    catalog.com ... does support php. The support for it is free for the
    sites they host.)

    o Is this a question of "self-modifying" html? (I'm thinking that's
    not possible.)

    o What is the easiest way to get this done. Could you learn enough
    php, perl, javascript, or whatever in, say, a day and a half, to write
    this little routine together and get it working?


    Thanks for your attention
    -Al Gabis
    Camp Springs, Maryland
    A series of pictorial lessons that explain the flaws in our thinking about the fundamentals of culture and code, politics and government, law and justice in the modern age.

  • Michael Austin

    #2
    Re: Slide show: this should be fairly straightforward - a what languageto use question

    Al Davis wrote:
    [color=blue]
    > Note: I tried cross-posting this message to several newsgoups,
    > including comp.lang.perl. misc, c.l.p.moderated ,
    > comp.infosystem s.www.authoring.cgi, comp.lang.javas cript and
    > comp.lang.php. Nothing appeared on my news server, so I'm trying
    > again - this time posting a separate copy of the message to each
    > group.
    >
    > I'm thinking this should be fairly easy to accomplish - a quick and
    > dirty ... what? ... script? program?
    >
    > Background: I have a website - created using a html-generator
    > application called Dreamweaver. I have some limited knowledge of
    > html, and I sort of know what php does. I've read that Perl is cool,
    > powerful and free ... but beyond that ...???. I know next to nothing
    > about Javascript.
    >
    > Here's the scenario:
    >
    > o User brings up page with, say, 5 thumbnail images. The thumbnails
    > represent 5 sets of slides (jpegs), in, say, 5 separate subdirectories
    > living in my area of my website host's system. Each slide set
    > contains from 10 to 20 images, each with an associated caption. Jpegs
    > are named: s01.jpg, s02.jpg, s03.jpg, ... in each subdirectory (or
    > maybe they have unique names - but let's simplify). The slides are
    > different sizes, ranging from 400x300 to 1000x800 pixels
    >
    > o Selecting a thumbnail (by clicking) from among the 5 takes the user
    > to a page where he sees the first slide and first caption associated
    > with that thumb. In additon to the jpeg and the caption, the screen
    > would contain some buttons that the user can click to go back a slide,
    > go forward a slide, or return home to thumbnail page. User can also
    > click on an image to enlarge it - meaning he would bring up the same
    > page, but it would show the file t01.jpg, which is, say, an un-cropped
    > version of s01.jpg. (Or perhaps, he would have specified at the home
    > page whether he wanted the high or the low bandwith version of the
    > slide show.)
    >
    > o Subsequent clicking on the forward button brings up the subsequent
    > slides in sequence, returning to the first slide after the last is
    > displayed. Other than the different images and captions, the pages are
    > identical with regard to title, background, font, layout, etc.
    >
    > I know how to accomplish this by the brute force method: For each of
    > the X number of images in a subdirectory, create X unique html
    > code-pages - slide1.htm, slide2.htm, etc. - that each reference a
    > particular image and particular caption, bringing up the next (or
    > previous) code-page in sequence when the user clicks to advance (or go
    > back). So for 5 sets of slides, each with 20 images, you'd have a
    > total of 100 unique .htm files. Actually, there would be 200 files,
    > given that there are a small and large version of each image.
    >
    > Here's the more elegant approach:
    >
    > One "routine" does everything. You ?pass? the name of the slide show
    > subdirectory to the routine as an ?argument?, and assign it to a
    > filename ?string variable? somehow. You might also pass the number of
    > slides in the subdirectory, unless there's a way for the routine to
    > determine what it is (like, by reading the number from another file,
    > or by "calling" some ?system function?, that reveals the number of
    > files in the directory.) The routine then loops through the list,
    > counting from 1 to X, and somehow opening the associated s0n.jpg file
    > (and associated caption text) to put up on the user's screen as he
    > clicks his way through the show.
    >
    > This brings up a host (no pun intended) of basic questions:
    >
    > o Where would this code or script or html actually run? On the site
    > host? It is downloaded to the user's machine? Is it intrepreted by
    > some entity - like the browser?
    >
    > o What support is needed on the host side for something like this?
    > What about the user/client side? If it's just a browser he needs, will
    > any old browser do? (I do know that the host for my own website ...
    > catalog.com ... does support php. The support for it is free for the
    > sites they host.)
    >
    > o Is this a question of "self-modifying" html? (I'm thinking that's
    > not possible.)
    >
    > o What is the easiest way to get this done. Could you learn enough
    > php, perl, javascript, or whatever in, say, a day and a half, to write
    > this little routine together and get it working?
    >
    >
    > Thanks for your attention
    > -Al Gabis
    > Camp Springs, Maryland
    > www.SpiritualNeighborhood.org[/color]

    or a google search for PHP slideshow howto will give you lots of pointers to
    code that is freely available - so you don't have write your own...

    --
    Michael Austin.
    Consultant - Available.
    Donations welcomed. Http://www.firstdbasource.com/donations.html
    :)

    Comment

    • Pjotr Wedersteers

      #3
      Re: Slide show: this should be fairly straightforward - a what language to use question

      Al Davis wrote:[color=blue]
      > Note: I tried cross-posting this message to several newsgoups,
      > including comp.lang.perl. misc, c.l.p.moderated ,
      > comp.infosystem s.www.authoring.cgi, comp.lang.javas cript and
      > comp.lang.php. Nothing appeared on my news server, so I'm trying
      > again - this time posting a separate copy of the message to each
      > group.
      >
      > I'm thinking this should be fairly easy to accomplish - a quick and
      > dirty ... what? ... script? program?
      >
      > Background: I have a website - created using a html-generator
      > application called Dreamweaver. I have some limited knowledge of
      > html, and I sort of know what php does. I've read that Perl is cool,
      > powerful and free ... but beyond that ...???. I know next to nothing
      > about Javascript.
      >
      > Here's the scenario:
      >
      > o User brings up page with, say, 5 thumbnail images. The thumbnails
      > represent 5 sets of slides (jpegs), in, say, 5 separate subdirectories
      > living in my area of my website host's system. Each slide set
      > contains from 10 to 20 images, each with an associated caption. Jpegs
      > are named: s01.jpg, s02.jpg, s03.jpg, ... in each subdirectory (or
      > maybe they have unique names - but let's simplify). The slides are
      > different sizes, ranging from 400x300 to 1000x800 pixels
      >
      > o Selecting a thumbnail (by clicking) from among the 5 takes the user
      > to a page where he sees the first slide and first caption associated
      > with that thumb. In additon to the jpeg and the caption, the screen
      > would contain some buttons that the user can click to go back a slide,
      > go forward a slide, or return home to thumbnail page. User can also
      > click on an image to enlarge it - meaning he would bring up the same
      > page, but it would show the file t01.jpg, which is, say, an un-cropped
      > version of s01.jpg. (Or perhaps, he would have specified at the home
      > page whether he wanted the high or the low bandwith version of the
      > slide show.)
      >
      > o Subsequent clicking on the forward button brings up the subsequent
      > slides in sequence, returning to the first slide after the last is
      > displayed. Other than the different images and captions, the pages are
      > identical with regard to title, background, font, layout, etc.
      >
      > I know how to accomplish this by the brute force method: For each of
      > the X number of images in a subdirectory, create X unique html
      > code-pages - slide1.htm, slide2.htm, etc. - that each reference a
      > particular image and particular caption, bringing up the next (or
      > previous) code-page in sequence when the user clicks to advance (or go
      > back). So for 5 sets of slides, each with 20 images, you'd have a
      > total of 100 unique .htm files. Actually, there would be 200 files,
      > given that there are a small and large version of each image.
      >
      > Here's the more elegant approach:
      >
      > One "routine" does everything. You ?pass? the name of the slide show
      > subdirectory to the routine as an ?argument?, and assign it to a
      > filename ?string variable? somehow. You might also pass the number of
      > slides in the subdirectory, unless there's a way for the routine to
      > determine what it is (like, by reading the number from another file,
      > or by "calling" some ?system function?, that reveals the number of
      > files in the directory.) The routine then loops through the list,
      > counting from 1 to X, and somehow opening the associated s0n.jpg file
      > (and associated caption text) to put up on the user's screen as he
      > clicks his way through the show.
      >
      > This brings up a host (no pun intended) of basic questions:
      >
      > o Where would this code or script or html actually run? On the site
      > host? It is downloaded to the user's machine? Is it intrepreted by
      > some entity - like the browser?
      >
      > o What support is needed on the host side for something like this?
      > What about the user/client side? If it's just a browser he needs, will
      > any old browser do? (I do know that the host for my own website ...
      > catalog.com ... does support php. The support for it is free for the
      > sites they host.)
      >
      > o Is this a question of "self-modifying" html? (I'm thinking that's
      > not possible.)
      >
      > o What is the easiest way to get this done. Could you learn enough
      > php, perl, javascript, or whatever in, say, a day and a half, to write
      > this little routine together and get it working?
      >
      >
      > Thanks for your attention
      > -Al Gabis
      > Camp Springs, Maryland
      > www.SpiritualNeighborhood.org[/color]

      As said, you will probably find a script like that for free on the web. And
      if it's PHP, don't worry about browser. Browsers have nothing to do with PHP
      in principle, the server does handle all the PHP scripts and sends HTML to
      the browser. Of course HTML formatting may be an issue if you have an
      antique browser that may or may not support the tags you use.

      And yes, PHP is free, like PERL, and has all the gizmos and tools you may
      want/need to use to achieve what you want if you can't find a ready-made
      script.

      Javascript is not recommended I think here. The images are on the server
      side, better handle the image loading and page creation there as well.
      Besides, Javascript is not enabled on everyone's browser. PHP is
      transparent.

      What you DO need is access to a webserver with PHP support. That can be
      Apache, IIS or any other server that works with PHP. Apache the most popular
      still, IIS I bet a good second.

      As far as image size is concerned, better provide all the desired sizes
      yourself as separate files than just specify display width. For one
      html-up-or-downsized pics look crappy and a 1000x800 image displayed as a
      thumbnail 100x80 still requires the same bandwidth.

      HTH
      Pjotr


      Comment

      • Geoff Berrow

        #4
        Re: Slide show: this should be fairly straightforward - a what language to use question

        I noticed that Message-ID: <8d5ni0p41697rh g2mc66tth6usgic lo0l0@4ax.com>
        from Al Davis contained the following:
        [color=blue]
        >o What is the easiest way to get this done. Could you learn enough
        >php, perl, javascript, or whatever in, say, a day and a half, to write
        >this little routine together and get it working?[/color]

        From the starting position of an absolute beginner?

        No chance.

        --
        Geoff Berrow (put thecat out to email)
        It's only Usenet, no one dies.
        My opinions, not the committee's, mine.
        Simple RFDs http://www.ckdog.co.uk/rfdmaker/

        Comment

        • filesiteguy

          #5
          Re: Slide show: this should be fairly straightforward - a what language to use question

          On Tue, 24 Aug 2004 20:58:54 GMT, in comp.lang.php you wrote:
          [color=blue]
          >Al Davis wrote:
          >[/color]
          [color=blue]
          >or a google search for PHP slideshow howto will give you lots of pointers to
          >code that is freely available - so you don't have write your own...[/color]

          I got this one at the hotscripts.com site. Way too easy to install....



          kai
          www.gamephreakz.com || www.perfectreign.com || www.filesite.org
          kai at 3gproductions dot com

          Comment

          • Michael Fesser

            #6
            Re: Slide show: this should be fairly straightforward - a what language to use question

            .oO(Al Davis)
            [color=blue]
            >This brings up a host (no pun intended) of basic questions:
            >
            >o Where would this code or script or html actually run? On the site
            >host?[/color]

            Yep, on the server.
            [color=blue]
            >It is downloaded to the user's machine? Is it intrepreted by
            >some entity - like the browser?[/color]

            No, the browser just requests a slide of a particular slideshow, a URL
            could look something like



            with xx = number of slideshow and yy = number of slide. Without a
            server-side URL-rewriting mechanismn (mod_rewrite on Apache servers) it
            would look like


            [color=blue]
            >o What support is needed on the host side for something like this?[/color]

            PHP, Apache (with mod_rewrite if possible), a graphics library (GD) if
            you would like to create thumbnails on-the-fly.
            [color=blue]
            >What about the user/client side? If it's just a browser he needs, will
            >any old browser do?[/color]

            As long as the browser is able to display images - yes. There's nothing
            special, the output is plain HTML with some images and links. Even NN4
            can handle that.
            [color=blue]
            >o Is this a question of "self-modifying" html? (I'm thinking that's
            >not possible.)[/color]

            It's a single script that generates some output dependent on the
            parameters it gets.
            [color=blue]
            >o What is the easiest way to get this done.[/color]

            PHP ;)
            [color=blue]
            >Could you learn enough
            >php, perl, javascript, or whatever in, say, a day and a half, to write
            >this little routine together and get it working?[/color]

            Quite easy to do for a fairly experienced programmer, quite heavy for a
            beginner (dealing with URL parameters, file system, maybe image creation
            and cache mechanismns etc.). It would be easier to use an existing
            script (but of course the learning effect would be much better with
            writing your own).

            Micha

            Comment

            Working...