This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Computer Graphics with Photoshop > January 2004 > Web Photo Gallery Question...





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Web Photo Gallery Question...
Brian

2004-01-27, 3:28 am

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

Tom Thackrey

2004-01-27, 4:28 am


On 26-Jan-2004, Brian <> wrote:
quote:

> 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.



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
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to jamesbutler@willglen.net (it's reserved for spammers)
Tom Thackrey

2004-01-27, 4:28 am


On 26-Jan-2004, "Tom Thackrey" <use.signature@nospam.com> wrote:
quote:

> On 26-Jan-2004, Brian <> wrote:
>
>
> newline works in a <textarea> but not elsewhere in HTML, so you have to
> convert the newlines to <br> try the function nl2br()



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
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to jamesbutler@willglen.net (it's reserved for spammers)
Brian

2004-01-27, 5:28 am

On Tue, 27 Jan 2004 07:44:33 GMT, "Tom Thackrey"
<use.signature@nospam.com> wrote:

quote:

>
>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



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.

Warren Sarle

2004-01-27, 2:28 pm

<Brian> wrote in message news:ia9c10t24qq6ge1itt1pi9a27lkrc0b3df@4ax.com...
quote:

> ...
> 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.



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.


suz

2004-01-29, 1:28 am

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
correctly:
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
folder.
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
file.
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:

bgcolor=%BGCOLOR%

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
Brian

2004-01-30, 3:28 am

On 28 Jan 2004 21:16:31 -0800, suzan@hevanet.com (suz) wrote:
quote:

>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.
>


<snip>
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>", 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.


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews