•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 396,970 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,946 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 1084 | Replies: 2
![]() |
•
•
Join Date: May 2005
Posts: 494
Reputation:
Rep Power: 4
Solved Threads: 18
Download the gallery_viewer.zip, unzip, and put the gallery_viewer.cfm file into any folder with .jpg images. Upload the file and browse to the page to view your slideshow gallery.
http://www.webhostingelite.com/downl...EncodedFormat(
http://www.webhostingelite.com/downl...EncodedFormat(
<!---gallery Viewer 2.1.1 Source Code--->
<!--- param the image to show --->
<cfparam name="url.image" default="1">
<!--- directory --->
<cfset dir = expandPath(".")>
<!--- get all images --->
<cfdirectory directory="#dir#" filter="*.jpg" name="images" sort="name">
<!--- quick sanity checks --->
<cfif not isNumeric(url.image) or url.image lte 0 or url.image gt images.recordcount or round(url.image) neq url.image>
<cfset url.image = 1>
</cfif>
<html>
<head>
<title>
<!---JSD - dynamically retrieve the image name into the page title, SEO --->
<cfoutput>#images.name[url.image]#</cfoutput>
</title>
</head>
<body>
<!--- do we even have images? --->
<cfif images.recordCount>
<cfoutput>
<table align="center">
<tr><!---JSD - dynamically retrieve the image name into the page text, SEO --->
<td colspan="2"><cfoutput>#images.name[url.image]#</cfoutput></td>
</tr>
<tr>
<td><cfif url.image gt 1>
<!--- JSD - Set the Delimeter path to "\/" for windows and linux--->
<a href="#listLast(getCurrentTemplatePath(),"\/")#?image=#url.image-1#">Previous</a>
<cfelse>
Previous
</cfif></td>
<td><cfif url.image lt images.recordCount>
<a href="#listLast(getCurrentTemplatePath(),"\/")#?image=#url.image+1#">Next</a>
<cfelse>
Next
</cfif></td>
</tr>
<tr>
<td colspan="2"><img src="#images.name[url.image]#"></td>
</tr>
<!--- links --->
<tr>
<td>
<cfif url.image gt 1>
<a href="#listLast(getCurrentTemplatePath(),"\/")#?image=#url.image-1#">Previous</a>
<cfelse>
Previous
</cfif> </td>
<td align="right">
<cfif url.image lt images.recordCount>
<a href="#listLast(getCurrentTemplatePath(),"\/")#?image=#url.image+1#">Next</a>
<cfelse>
Next
</cfif> </td>
</tr>
</table>
</cfoutput>
</cfif>
</body>
</html>•
•
Join Date: Feb 2008
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
thanks. i will try that. an add on question before i explore this; i am going to use this to show like 5 different movie posters, 5 different music posters, etc for about 7 subjects or so to show a featured type gallery. would i put the 5 thumbs in an indiv folder for each subject then put the .cfm file in the each folder and then reference from there?
thanks again.
thanks again.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ColdFusion Marketplace
Similar Threads
- adding keylistener (Java)
- Javascript image slider issue (JavaScript / DHTML / AJAX)
- Slideshow for the images (JavaScript / DHTML / AJAX)
- Slideshow Des/Dev - PHP/SQL/XML/FLASH/AS/AJAX, not all needed but it wouldn't hurt. (Web Development Job Offers)
- Program-contolled delay (PHP)
- Moving avatars (C++)
- setTimeout prevents resetting of image (JavaScript / DHTML / AJAX)
- changing the image dynamically (ASP)
Other Threads in the ColdFusion Forum
- Previous Thread: Using #parameter# string of databases
- Next Thread: Listing items only from an specific range


Linear Mode