Hi Mike,

Sounds like you need to pass the 3 dates into your
UDF as arguments..

Eg: mikesFunction(date1,date2,date3)

Then you can refer to these dates in your udf and
Apply your psuedo code logic, then return the relevant
Value.

Regards,

Adam Chapman
Virtualtours.com.au
mailto:[EMAIL PROTECTED] 

Phone: 1300 366 122
Int: +61 3 9720 5733
Fax: +61 3 9720 6377



-----Original Message-----
From: Michael Kear [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 15, 2004 4:08 PM
To: CFAussie Mailing List
Subject: [cfaussie] Need help with a UDF please ....


I have a need to write a UDF (or another concise way to use
functionality) to do the following: 

I have a session.auth.lastlogin field in the session vars to tell me
when
the user was last here,   and I have a field Dateadded and Dateupdated
in
every document, and I want to put a little "NEW" graphic or "UPDATED"
graphic next to each article in a documents list if it's been added or
changed since the user was last here.  Also at the head of the document
when the user looks through the site.  SO it's going to be used often.

I want to be able to put in the code something like this: 

<cfif Isnew(docID)><img src="new.gif"></cfif> #documents.title# 

How would I write a UDF to tell CF whether to add a "new.gif" or
"updated.gif" or have no graphic (if the document is unchanged since the
user was last here)?

I have been reading up on writing UDFs, but none seem to show me how to
include both the session variable and the document ID in the
functionality here.

Cheers
Mike Kear
Windsor, NSW, Australia
AFP Webworks
http://afpwebworks.com





---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to