Re: Three new problems, maybe a fourth
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 12207
interpreted = N
texte = >First I would make sure the [listfiles] with the correct directory stuff is>working. Might be a glich in the / handling. What I am suggesting here is>pour all the images out of the folder, not just one.The problem I had in the beginning is this:When there's NO files in the 'photos' folder, the listfiles context logs anerror. It's only when there's at least one file in that folder that thelistfiles context does NOT log an error. This seems to indicate that thecorrect folder is being identified by WebCat2, but there's a bug in thecode that breaks when the folder is empty ...The actual file name itself is not defined anywhere else. I'm notreferring to any filenames in a database, per se, because the whole purposeof this technique is to eliminate the need for those filenames to be storedin a database.Instead, I want my users to send a file with the name [username].jpg to thephotos folder. Then when the listfiles context is used with the [showif] asin the example below, it *should* display the proper image for that user.I chose the convention [username].jpg for the names of the image filesbecause everyone has a unique username, and each user can have only oneimage in the photos folder. Therefore, the following should actually resultin displaying exactly one image from the photos folder - the image with thename that begins with that user's username:
[listfiles photos/][showif [filename]=[lookup the username in the users.db].jpg] [/showif][/listfiles] |
I haven't tested it without the [showif] stuff, but I think I found a bugin the showif/hideif stuff yesterday (in another template) so I will try itwithout - to see if that's what's breaking it ... :)Sincerely, Ken GromeWebDNA Solutions
Associated Messages, from the most recent to the oldest:
>First I would make sure the
[listfiles] with the correct directory stuff is>working. Might be a glich in the / handling. What I am suggesting here is>pour all the images out of the folder, not just one.The problem I had in the beginning is this:When there's NO files in the 'photos' folder, the listfiles context logs anerror. It's only when there's at least one file in that folder that thelistfiles context does NOT log an error. This seems to indicate that thecorrect folder is being identified by WebCat2, but there's a bug in thecode that breaks when the folder is empty ...The actual file name itself is not defined anywhere else. I'm notreferring to any filenames in a database, per se, because the whole purposeof this technique is to eliminate the need for those filenames to be storedin a database.Instead, I want my users to send a file with the name
[username].jpg to thephotos folder. Then when the listfiles context is used with the
[showif] asin the example below, it *should* display the proper image for that user.I chose the convention
[username].jpg for the names of the image filesbecause everyone has a unique username, and each user can have only oneimage in the photos folder. Therefore, the following should actually resultin displaying exactly one image from the photos folder - the image with thename that begins with that user's username:
[listfiles photos/][showif [filename]=[lookup the username in the users.db].jpg] [/showif][/listfiles] |
I haven't tested it without the
[showif] stuff, but I think I found a bugin the showif/hideif stuff yesterday (in another template) so I will try itwithout - to see if that's what's breaking it ... :)Sincerely, Ken GromeWebDNA Solutions
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
[WebDNA] OT - does anyone know how to get Fetch/BBedit to leave my last line-ending char intact? (2009)
RE: WebCatalog NT beta 18 now available (1997)
Requiring that certain fields be completed (1997)
Grep Search and Replace (2002)
Spreadsheet App pref. [OT] (2001)
Purchased cart being overwritten - still !?? (1997)
Shared conversion under WebTen (1998)
Simple way to create unique SKU (1997)
PCS Frames-Default page is solution! (1997)
ReturnRaw and redirect (1997)
Country & Ship-to address & other fields ? (1997)
t or f (1997)
web delivery (1997)
Help! WebCat2 bug (1997)
2.0 Info (1997)
Where's Cart Created ? (1997)
TCPConnect to Telnet (2003)
Problems passing [SKU] with $Replace in 2.0 (1997)
Bug? (1997)
RE: Recursion & WebDNA (1999)