Dreamweaver batch page creating

Caporegime
Joined
25 Jul 2005
Posts
28,851
Location
Canada
I have a large number of photos I want to stick into a website, each photo on a seperate page (click a link and the page appears with the photo). I have created a template of the page layout but I don't want to spend hours inserting each photo in seperatly and renaming the page after the filename.

Is there a batch process that will do this for me? Say pointing the program at the file with the photos and giving it the page template and let it insert the photos and create the pages on automatically?

I am using Dreamweaver 8 in HTML

Can anyone point me to some good text guides on how to use dreamweaver as well?

Thanks
 
paulsheff said:
Could you not make it dynamic and simply pass a variable to the page from the querystring instead? Then you'd only need the one page.

To sound really thick how would i do that? That would be useful as it would save time and lots of space.


Beanspout isn't that just a piece of gallery software? I already have the thumbnail pages ready, I would just like to find an automated way of inserting all the larger pictures into a template page so I dont have to insert them by hand. :)
 
Last edited:
Well say you used php, your links would be like:
image.php?img=1
image.php?img=2
image.php?img=3
image.php?img=4
image.php?img=5

Then you could just put those in to page as it's loaded:
<img src="_large_images/image_<?php echo $_GET["img"]; ?>.jpg">
 
paulsheff said:
Well say you used php, your links would be like:
image.php?img=1
image.php?img=2
image.php?img=3
image.php?img=4
image.php?img=5

Then you could just put those in to page as it's loaded:
<img src="_large_images/image_<?php echo $_GET["img"]; ?>.jpg">


Sorry for taking this off topic, but how do you use PHP for the blah.php?img1 etc?

PHP:
<?php
switch($blah) { 
default: 
  include('blah.php'); 
break; case "img": 
  include('image1.jpg');
}
?>

I got told its like that? but you have to add them all etc :p
 
You're meant to use a switch statement so that you can check the value from the querystring and make sure no one tries to load a page they shouldn't, and load a default page if they try to.

Code:
$page = $_GET["page"];

switch($page)
{
case "info":
$load = "info";
$title_tag = "Info - ";
break;

case "main_room":
$load = "main_room";
$title_tag = "Main Room - ";
break;

case "galleries":
$load = "galleries";
$title_tag = "Galleries - ";
break;

case "chat":
$load = "chat";
$title_tag = "Chat Room - ";
break;

case "downloads":
$load = "downloads";
$title_tag = "Downloads - ";
break;

case "links":
$load = "links";
$title_tag = "Links - ";
break;

case "contact":
$load = "contact";
$title_tag = "Contact Us - ";
break;

default:
$load = "main";
$title_tag = "";
}//End of switch($page)

You can then use what you've gleaned from the switch statement in the page

Code:
<?php require_once "$load.php"; ?>

If you're going to be using querystrings to navigate database products etc it's going to difficult to use a switch to validate that, so checking the format, like in the image example something like is_numeric(), would probably suit better.
 
Unfortunatly I can't understand most of that. :( Is there anywhere that can explain it fully showing the editable bits, which parts need to be put on a server etc?

Also what would I put in the thumbnail that links to the page? This?

PHP:
<img src="_large_images/image_<?php echo $_GET["img"]; ?>.jpg">
 
if you have asp on your server i have some code which grabs all images from a directory and puts them into a gallery and shows them one at a time

depends on your host

never done php so cant help on that front
 
Amp34 said:
Unfortunatly I can't understand most of that. :( Is there anywhere that can explain it fully showing the editable bits, which parts need to be put on a server etc?

Also what would I put in the thumbnail that links to the page? This?

PHP:
<img src="_large_images/image_<?php echo $_GET["img"]; ?>.jpg">

It depends on how you've named them.

Say for instance you have an image and a thumbnail for that image.

Thumbnail is called me_at_seaside_thumb.jpg

And your big image is called me_at_seaside.jpg

on your thumbnail page you would have:

Code:
<a href="big_image.php?img=me_at_seaside.jpg"><img src="me_at_seaside_thumb.jpg"></a>

And then on your big_image.php page you'd have:

Code:
<img src="<?php echo $_GET["img"]; ?>">

So whatever name of the image was in the querystring would be put onto the page when it loads.
 
Amp34 said:
Beanspout isn't that just a piece of gallery software? I already have the thumbnail pages ready, I would just like to find an automated way of inserting all the larger pictures into a template page so I dont have to insert them by hand. :)
Simplegal uses Smarty templating from what I'm aware, so it should be fairly elementary to integrate an existing template into it, without needing to be concerned about how the application logic works. Just edit the template files as necessary, configure Simplegal and it should be all ready to go.
 
Back
Top Bottom