Photo Gallery edit?

D

Drew

Does anyone know how to edit the pages created by the Photo Gallery
component, horizontal layout? Specifically, the page that comes up to
display the full size image after you click on one of the thumbnails from
the gallery. The program automatically creates a white background and
aligns the image on the left. I would like to edit the page to match the
rest of the site I am building. This would save me a lot time, otherwise I
will have to build separate pages for all 80 images on this site. Thanks!!
 
J

Jim Buyens

Sorry, when you click to display a full-sized picture,
the Photo Gallery doesn't display a Web page. It just
displays the picture. In the top left corner... With a
white background...

A third-party photo gallery is one option, but here's
another. Add this script to your <head> section:

<script>
function qsobj (){
var qvbl;
var qstring = "" + document.location.search.substring(1);
if (qstring != ""){
var qpairs = qstring.split("&");
for (i=0; i < qpairs.length; i++) {
qvbl = qpairs.split("=");
this["" + qvbl[0]] =
unescape(qvbl[1].replace("+"," "));
}
}
}
function getQS(avbl){
if (qstr[avbl] == null){
return "";
}else{
return qstr[avbl];
}
}
var qstr = new qsobj();
</script>

and then add *this* script to the <body> section.

<script>
document.write("<img src=' + getQS("pic") + "'>";
</script>

Now, you can make this page display any picture you want
by appending ?pic= to the URL. For example:

<a href="fullsize.htm?pic=images/whatever.jpg">

As to generating the thumbnails, Mocrosoft Office
FrontPage 2003 Inside Out includes a page named
picsizer.aspx that generates them on the fly. For example.

<img src="picsizer.aspx?size=75&url=images/me.jpg">

will display a thumbnail (75 pixels on its widest side)
of the full-sized picture images/me.jpg. You can see some
examples of this and other techniques at:

http://www.interlacken.com/fp11extras/piclib/default.aspx

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
D

Drew

Thanks for your help. I copied your script over, but I must be doing
something wrong. I keep getting an error for this line:

document.write("<img src=' + getQS("pic") + "'>";

The error is: Expected ')'

I tried changing things a bit, but can't seen to get it right. Any
suggestions? Thanks again.

Jim Buyens said:
Sorry, when you click to display a full-sized picture,
the Photo Gallery doesn't display a Web page. It just
displays the picture. In the top left corner... With a
white background...

A third-party photo gallery is one option, but here's
another. Add this script to your <head> section:

<script>
function qsobj (){
var qvbl;
var qstring = "" + document.location.search.substring(1);
if (qstring != ""){
var qpairs = qstring.split("&");
for (i=0; i < qpairs.length; i++) {
qvbl = qpairs.split("=");
this["" + qvbl[0]] =
unescape(qvbl[1].replace("+"," "));
}
}
}
function getQS(avbl){
if (qstr[avbl] == null){
return "";
}else{
return qstr[avbl];
}
}
var qstr = new qsobj();
</script>

and then add *this* script to the <body> section.

<script>
document.write("<img src=' + getQS("pic") + "'>";
</script>

Now, you can make this page display any picture you want
by appending ?pic= to the URL. For example:

<a href="fullsize.htm?pic=images/whatever.jpg">

As to generating the thumbnails, Mocrosoft Office
FrontPage 2003 Inside Out includes a page named
picsizer.aspx that generates them on the fly. For example.

<img src="picsizer.aspx?size=75&url=images/me.jpg">

will display a thumbnail (75 pixels on its widest side)
of the full-sized picture images/me.jpg. You can see some
examples of this and other techniques at:

http://www.interlacken.com/fp11extras/piclib/default.aspx

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


-----Original Message-----
Does anyone know how to edit the pages created by the Photo Gallery
component, horizontal layout? Specifically, the page that comes up to
display the full size image after you click on one of the thumbnails from
the gallery. The program automatically creates a white background and
aligns the image on the left. I would like to edit the page to match the
rest of the site I am building. This would save me a lot time, otherwise I
will have to build separate pages for all 80 images on this site. Thanks!!


.
 
J

Jim Buyens

Drew said:
Thanks for your help. I copied your script over, but I must be doing
something wrong. I keep getting an error for this line:

document.write("<img src=' + getQS("pic") + "'>";

The error is: Expected ')'

Whoops, my error. The correct form is:

document.write("<img src=' + getQS("pic") + "'>");

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
D

Drew

Thanks once again. Your edit helped get me on the right track, but it still
didn't work. I noticed it was missing a full quote. It now works as
follows:

document.write("<img src='" + getQS("pic") + "'>");

Thanks again. My next challenge is to add a navigation bar on the page that
the full size image is displayed on that provides back, next and previous
links so the user can scroll through each image without having to go back to
the main page.
 
J

Jim Buyens

Drew said:
Thanks once again. Your edit helped get me on the right track, but it still
didn't work. I noticed it was missing a full quote. It now works as
follows:

document.write("<img src='" + getQS("pic") + "'>");

Thanks again. My next challenge is to add a navigation bar on the page that
the full size image is displayed on that provides back, next and previous
links so the user can scroll through each image without having to go back to
the main page.

That's going to be tough, working only in JavaScript. I guess you'd
need to code an array that contained all the picture names in order,
and then write some code to find the current picture, get the file
name that precedes it in the list, and then get the file name that
follows it in the list (with exceptions to deal with the first and
last entries).

Microsoft Office FrontPage 2003 Inside Out includes the ASP.NET code
for a picture library that automates most of what you're trying to do.
You can see this code in action at:

http://www.interlacken.com/fp11extras/piclib/default.aspx

To add pictures or folders, you just add them to the appropriate
parent folder. The ASP.NET pages create the thumbnails and selection
lists automatically.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|+---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top