Go Back   PCMech Forums > Help & Discussion > Internet, Web Applications, & The Cloud

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 07-11-2005, 06:15 PM   #1
Member (10 bit)
 
corosus's Avatar
 
Join Date: Jan 2002
Location: brussels
Posts: 788
Send a message via MSN to corosus
batch html page creation

HI

i'm building a portfolio website and i was wondering

i have a numebr of images (jpg's) taht i would like to see on a page named after the file (for instance IMG0031.jpg would sit on IMG0031.html) eatch with his own name above the foto

is there any tool that will do this in batch procesing????

thanks
corosus is offline   Reply With Quote
Old 07-11-2005, 10:08 PM   #2
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,382
You can use javascript. Here's the basic template I like to use:

PHP Code:
<SCRIPT LANGUAGE="JavaScript">
function 
showPic(fileNamepicTitle)
{

    
picWin window.open("""photo""width=600, height=450, status, scrollbars, resizable, screenX=20, screenY=40, left=20, top=40");

    
picWin.document.write('<html>');
    
picWin.document.write('<head><title>' picTitle '</title></head>');
    
picWin.document.write('<body bgcolor="black" text="white">');
    
picWin.document.write('<p align="center"><img src="' fileName '"></p>');
    
picWin.document.write('<p align="center">' picTitle '</p>');
    
picWin.document.write('</body>');
    
picWin.document.write('</html>');
    
picWin.document.write('<center><a href="javascript:window.close();">Close Window</a></center>');

}
</SCRIPT>

// This is the code for the image links

<a href="" onclick="showPic('mypic.jpg', 'My Picture'); return false;" target="photo">Click Here For My Picture</a>

Just replace 'mypic.jpg' with your picture, make sure to include 'directory/mypic.jpg' if it's in another directory.

---------------------------------
More simple, but with no "close window" link:

In Head
function newWindow(about) {
    
   aboutWindow = window.open(about , 'aboutwin', 'toolbar=no, location=yes, scrollbars=no, resizable=no, width=640,height=480')
   
   aboutWindow.focus()
    
}
In body
<a  href="java script:newWindow('image.jpg')"><img src="thumbimage.jpg" alt=""></a> 
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
Force Flow is offline   Reply With Quote
Old 07-11-2005, 10:35 PM   #3
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Javascript could work, PHP would be better. Goal is to only have one page, and then call the images. Something pretty simple like:

PHP Code:
<img src="IMG<?php echo $image;?>.jpg">
then you could call the page via IMG.php?image=1001 . Too easy to do and only have to worry about having one page to change instead of 1000.
__________________

Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row
mairving is offline   Reply With Quote
Old 07-13-2005, 06:19 AM   #4
Member (10 bit)
 
corosus's Avatar
 
Join Date: Jan 2002
Location: brussels
Posts: 788
Send a message via MSN to corosus
thkas guys that helped out a lot
corosus is offline   Reply With Quote
Old 07-13-2005, 09:18 AM   #5
glc
Forum Administrator
Staff
Premium Member
 
glc's Avatar
 
Join Date: May 2000
Location: Joplin MO
Posts: 37,771
Check out Irfanview. The thumbnail utility can create exactly what you want, then you can manually touch up the code as desired.
glc is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:40 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2