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 an error. It's only when there's at least one file in that folder that the listfiles context does NOT log an error. This seems to indicate that the correct folder is being identified by WebCat2, but there's a bug in the code that breaks when the folder is empty ...The actual file name itself is not defined anywhere else. I'm not referring to any filenames in a database, per se, because the whole purpose of this technique is to eliminate the need for those filenames to be stored in a database.Instead, I want my users to send a file with the name [username].jpg to the photos folder. Then when the listfiles context is used with the [showif] as in the example below, it *should* display the proper image for that user.I chose the convention [username].jpg for the names of the image files because everyone has a unique username, and each user can have only one image in the photos folder. Therefore, the following should actually result in displaying exactly one image from the photos folder - the image with the name 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 bug in the showif/hideif stuff yesterday (in another template) so I will try it without - to see if that's what's breaking it ... :)Sincerely, Ken Grome WebDNA Solutions Associated Messages, from the most recent to the oldest:

    
  1. Re: Three new problems, maybe a fourth (Kenneth Grome 1997)
  2. Re: Three new problems, maybe a fourth (grichter@panavise.com (Gary Richter) 1997)
  3. Re: Three new problems, maybe a fourth (Kenneth Grome 1997)
  4. Re: Three new problems, maybe a fourth (grichter@panavise.com (Gary Richter) 1997)
>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 an error. It's only when there's at least one file in that folder that the listfiles context does NOT log an error. This seems to indicate that the correct folder is being identified by WebCat2, but there's a bug in the code that breaks when the folder is empty ...The actual file name itself is not defined anywhere else. I'm not referring to any filenames in a database, per se, because the whole purpose of this technique is to eliminate the need for those filenames to be stored in a database.Instead, I want my users to send a file with the name [username].jpg to the photos folder. Then when the listfiles context is used with the [showif] as in the example below, it *should* display the proper image for that user.I chose the convention [username].jpg for the names of the image files because everyone has a unique username, and each user can have only one image in the photos folder. Therefore, the following should actually result in displaying exactly one image from the photos folder - the image with the name 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 bug in the showif/hideif stuff yesterday (in another template) so I will try it without - to see if that's what's breaking it ... :)Sincerely, Ken Grome WebDNA 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] Successful, working WebDNA7/CentOS install? (2013) includes and cart numbers (1997) problem serving foreign languages text (1997) WebCat2 Append problem (B14Macacgi) (1997) emailer (1997) [include] error message (was:how to put/keep product customization info in basket?) (1998) tricky embedded[showifs/hideifs] (w/ code.. long) (2000) Trouble with formula.db + more explanation (1997) raw=T is broken in [include] (1997) [WebDNA] Installing 7.1.702 on CentOS (2012) Fwd: Problems with Webcatalog Plug-in (1997) Robert Minor duplicate mail (1997) Help formatting search results w/ table (1997) File Upload (1997) Upgrade to WebCat2 from Commerce Lite (1997) creator code (1997) suffix mapping for NT? (1997) WebCat2 Append problem (B14Macacgi) (1997) ShowNext & Showif together (1999) Aquick question about replace (1999)