Web Photo Gallery Question...

Discussion in 'Photoshop Tutorials' started by Brian, Jan 27, 2004.

  1. Brian

    Brian Guest

    OK, here is a simple question, one that seems to be out of my brain's
    reach. How does one insert a CR/LF within the input text of the
    "Description" in the File Info so that it actually works in the HTML
    document? For example, I would like to display 3 sepearate lines of
    text from the "Description" as 3 seperate lines in the HTML document.

    It seems that while entering text in the PS CS File Info "Description"
    window, a CR seems to work and display within the window, but when
    output through the Web Photo Gallery, all such characters are passed
    through as literals and not parsed into HTML code. The result is one
    big run-on sentence.

    Any ideas?

    Brian, Jan 27, 2004
    1. Advertisements

  2. Brian

    Tom Thackrey Guest

    newline works in a <textarea> but not elsewhere in HTML, so you have to
    convert the newlines to <br> try the function nl2br()
    Tom Thackrey, Jan 27, 2004
    1. Advertisements

  3. Brian

    Tom Thackrey Guest

    Sorry, brain check, thought I was in comp.lang.php.

    Try using <br> with the newline, you will see it in the description window
    but it will be interpreted correctly in HTML
    Tom Thackrey, Jan 27, 2004
  4. Brian

    Brian Guest

    Been there, done that. No joy.

    Apparently all text from the "Description" window gets parsed into the
    HTML document as literals which means that "<" from the text becomes
    "&lt;" in the HTML doc. In other words, the <br> apprears in the HTML
    doc as "&lt;br&gt;".

    I've tried embedding all sorts of HTML code and everything gets passed
    as a literal so that can't be the answer.

    I'm beginning to think that this "simple" question is not so simple.
    I've looked far and wide and can't believe that nobody else has ever
    asked this. I suppose the answer will ultimately turn out to be right
    in front of my face all the time.

    In the meanwhile, the only workaround for the time being seems to
    embed some sort of weird character or series of weird characters, i.
    e., $$, whereever I want a new line, and then edit all of the HTML
    docs by doing a global search for "$$" and replace with <br>. Messy
    but it would work.
    Brian, Jan 27, 2004
  5. Brian

    Warren Sarle Guest

    There are lots of glitches like this in Web Photo Gallery. Another one is
    that you can't use file extensions other than .htm and .html. So you have to
    write a script to post-process everything. So you might as well do all the
    image processing in the script, too, and scrap Web Photo Gallery. Then
    you can process multiple folders, you can sharpen images after resizing,
    etc. In my case, the scripts run a lot faster than Web Photo Gallery
    because I generate web images in three different sizes, so I can read
    the original image just once instead of three times.

    Web Photo Gallery is fine for creating one or two simple galleries,
    but it is amateur-level software.
    Warren Sarle, Jan 27, 2004
  6. Brian

    suz Guest

    So I just tried this in CS and it worked.

    First I made a Web Gallery.

    Then I opened the index page and tweeked the code and made it
    exactly like I wanted.

    I did it by hand and then I did it using Dreamweaver.

    Worked great.

    I also remember reading somewhere in the PS Help that you can add your
    own looks and feels if you know how to code html but that you have to
    do it correctly or it doesn't work. OK! Found it, From PS CS Help:

    "Customizing Web photo gallery styles

    You can customize an existing Web photo gallery style by editing one
    or more of its HTML template files. When customizing a style, you need
    to follow these guidelines so that Photoshop can generate the gallery
    The style folder must contain these files: Caption.htm, IndexPage.htm,
    SubPage.htm, Thumbnail.htm, and FrameSet.htm.
    You can rename the style folder but not the HTML template files in the
    You can have an empty Caption.htm file, and place the HTML code and
    tokens determining the layout of the caption in the Thumbnail.htm
    You can replace a token in a template file with the appropriate text
    or HTML code, so that an option is set through the template file
    rather than through the Web Photo Gallery dialog box. For example, a
    template file may contain a BODY element with the following bgcolor
    attribute that uses a token as its value:


    To set the background color of the page to red, you can replace the
    token %BGCOLOR% with "FF0000."
    You can add HTML code and tokens to the template files. All tokens
    must be in uppercase characters, and begin and end with the percent
    (%) symbol. For information on the tokens that you can use in the
    template files, seeUsing tokens in Web photo gallery styles.

    To customize an existing Web photo gallery style:
    Locate the folder for the Web photo gallery style that you want to
    customize. For the location of style folders, seeAbout Web photo
    gallery styles.
    If you don't want to overwrite an existing style, create a copy of the
    style folder, and store it in the same location on your hard drive as
    the existing style folders.
    Using an HTML editor, open one of the HTML template files located
    inside the style folder.
    Customize the HTML template file using the guidelines for
    customization outlined in this section, and save the file.
    Repeat steps 2, 3, and 4 to customize other HTML template files in the
    style folder.

    When you have finished, you can create a gallery using the customized
    style. The customized style appears as an option in the Styles pop-up
    menu in the Web Photo Gallery dialog box." ©adobe
    suz, Jan 29, 2004
  7. Brian

    Brian Guest

    I appreciate all your added comments but unfortunately none of it
    address my original question. My particular web gallery files are
    already highly customized. My question related to the procedure to
    pass a carriage return from the "Description" text area of the File
    Info so that the resultant web page would have such a carriage return
    within the text that was passed through.

    So far it seems impossible. All carraige returns and attempts to embed
    HTML tags (such ar <BR> or <P>) get either filtered out or inserted
    into the text as "&lt;BR&gt", etc.

    Try this is the File Info / Description of any image:
    This is line 1
    This is line 2

    Now create your web gallery with or without your customized HTML
    templates and the result is :

    This is line 1 This is line 2

    Not good.
    Brian, Jan 30, 2004
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.