|
|
Server Time: Thursday May 22 2008 02:18 PM |
|
Your Time: |
The first thing we need to do is to define the
save file path and the web path to the "myimages" folder which we will later
query for the files.
<cfset imagepath =
"C:\webroot\myimages">
<cfset imageURL = "http://myserver/myimages">
<!--- first get a list of all jpg's in your image
directory --->
<cfdirectory action="LIST"
directory="#imagepath#"
filter="*.jpg" name="homeimages">
<!--- This variable will hold a comma delimited list of
all the jpg's found in the directory --->
<cfparam name="imglist"
default="">
<cfloop query="homeimages">
<cfset imglist = listappend(imglist, name,
",")>
</cfloop>
<!--- "ThisImage" is this rounds random image file --->
<cfset thisimage = listgetat(imglist, randrange(1,
listlen(imglist)))>
<cfoutput>
<img src="#imageURL#/#ThisImage#">
</cfoutput>
<!--- hope someone can use it and as always... Have
fun! --->
Date added: Tue. August 12, 2003
Posted by: Bobby Hartsfield | Views: 9425 | Tested Platforms: CF4,CF5 | Difficulty: Intermediate
Other
 |
A Basic Calendar Application to Build on
I have seen quite a few people looking for prebuilt calendar apps but the people I wrote this for are the people who wanted a headstart in building their OWN custom calendar app.
It is very basic and does nothing more than display the currently selected month/year's calendar and give links to the PREVIOUS the NEXT month's calendars by using The DateAdd() function. Basically the backbone of any calendar app.
Enjoy. and as Always.. HAVE FUN! - Date added: Fri. August 15, 2003
Random String/Password Generation
This is a custom tag I wrote that generates a random string at the set number of characters using the characters you decide on
Alpha
AlphaNumeric
or Numeric
Uppercase, lowercase, mixed case...
It will create a variable that you name as you wish and call however you'd like.
It is a small example of how to create a custom tag and will hopefully send someone in the right direction. It is also fully functional and has come in handy quite a few times. Enjoy and as always.. Have Fun! - Date added: Tue. August 12, 2003
|
|
|
|
|
|
|
|