but does the job.
You'll need cfx_image.
After you fix it up send it back :)
<!--- index.cfm --->
<html><head>
<title>Gallery</title>
<script language="_javascript_">
<!--
function openWin( windowURL, windowName,
windowFeatures ) {
return window.open( windowURL, windowName,
windowFeatures ) ;
}
// -->
</script>
</head>
<body>
<cfparam Name="thePath" Default="">
<cfset rootdir = "/photos/">
<cfset isHomePage = false>
<cfif not isDefined("pinfo")>
<cfset isHomePage = true>
<cfset pinfo = rootdir>
</cfif>
<cfif IsDefined("Image")>
<cfoutput><!--- Display Image here --->
<img src=""> </cfoutput>
<cfabort>
</cfif>
<!--- Display Thumbnails --->
<cfif isHomePage>
<table width="640" border="0" cellpadding="2"
cellspacing="4">
<tr>
<td align="center" style="font-size:large;
text-align:center; color:0000CC">Photo Album</td>
</tr>
<tr>
<td>
<cfmodule template="viewer.cfm"
thePath="#thePath#"
rootdir="#rootdir#"
pinfo="#pinfo#">
</td>
</tr>
</table>
<cfelse>
<cfmodule template="viewer.cfm"
thePath="#thePath#"
rootdir="#rootdir#"
pinfo="#pinfo#">
</cfif>
</body>
</html>
<!--- // index.cfm --->
<!--- viewer.cfm --->
<cfset basepath = "C:\CFusionMX\wwwroot">
<cfset reload = 0>
<cfdirectory action=""> directory="#basepath##Replace(attributes.pinfo, "/",
"\", "all")#"
name="mydirectory"
sort="name">
<table cellspacing="8" cellpadding="8">
<tr>
<cfset thecount=1>
<cfoutput query="mydirectory"><!--- this is so
sub-folders show above images --->
<cfif ListFindNoCase(type, "dir")>
<td colspan="4">
<cfif ListFindNoCase(name, "..")>
<cfset dirname = "Home">
<cfelse>
<cfset dirname = name>
</cfif>
<cfif not ListFindNoCase(name, ".") and not
ListFindNoCase(name, "..")>
<cfif dirname is not "originals">
<cfif listLen(dirname, "_") is 2><!--- Name the
folders in sort order : 01_January, 02_February etc.
then remove the number and _ --->
<cfset showname = listGetAt(dirname, 2, "_")>
<cfelse>
<cfset showname = dirname>
</cfif>
<a
href=""> </cfif>
</cfif>
</td>
</tr>
<tr>
</cfif>
</cfoutput>
<cfoutput query="mydirectory">
<cfif not ListFindNoCase(Type, "Dir")>
<cfif
listContainsNoCase(QuotedValueList(mydirectory.name),
"thumb_#name#")>
<td width="25%">
<a
href=""> "thumb_", "")#">
<img src=""> <br>#ReplaceNoCase(Name, ".jpg", "")#<br>
</td>
<cfif thecount gt 3 AND (thecount mod 4 eq
0)></tr><tr></cfif>
<cfset thecount=thecount+1>
<cfelseif ListFindNoCase(Right(name, 4), ".jpg")>
<cfif NOT ListFindNoCase(Left(name, 6), "thumb_")>
<cfx_image action=""> file="#basepath##Replace(attributes.pinfo, "/",
"\", "all")##Name#"
commands="
setvar x=100
setvar y=100
resize <x>
write #basepath##Replace(attributes.pinfo, "/",
"\", "all")#thumb_#Name#">
<cfset reload = 1>
</cfif>
</cfif>
</cfif>
</cfoutput>
<cfif reload is 1>
<!--- <cflocation
url=""> addtoken="No"> --->
</cfif>
</tr>
</table>
</body>
</html>
<!--- // viewer.cfm --->
> If someone code point me to some open source code
> that would be great, or if it is not difficult give
> me a couple of pointers on how to build it.
>
> Thanks
>
> Mike
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

