R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
User Photos
Last Post 01 Jan 1900 05:00 AM by . 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
frescoUser is Offline
New Member
New Member
Posts:6

--
25 Jul 2007 07:15 PM  
We need some help adding some conditional display logic for Photos located in a folder for DNN Users.

The following code retrieves the Photos...

<img src=[PORTALPATH,System]Human%20Resources/EmployeePictures/[FirstName]%20[LastName].jpg width=50 border=0 >

We are looking to add the following logic...

1) Check if file exists. If not show generic image

2) Automatically create Thumbnails from Larger Photo

Any ideas? Thank you.
frescoUser is Offline
New Member
New Member
Posts:6

--
25 Jul 2007 07:48 PM  
I am trying "EXISTS" within an IIF but it is always evaluating to false and running the second image. Perhaps there is something wrong with my syntax or the Path. I am trying variations of it without success yet.

<img src="{IIF, [FORMAT, ~[PORTALPATH,System]Human%20Resources/EmployeePictures/[FirstName]%20[LastName].jpg ,{EXISTS}], "[PORTALPATH,System]Human%20Resources/EmployeePictures/[FirstName]%20[LastName].jpg", "http://[ALIAS,System]/images/File.gif"}" width=40 border=0>
frescoUser is Offline
New Member
New Member
Posts:6

--
25 Jul 2007 07:53 PM  
ok, the following IIF code works so I know there is something wrong with the EXISTS check.

<img src="{IIF, 1=1, "[PORTALPATH,System]Human%20Resources/EmployeePictures/[FirstName]%20[LastName].jpg", "http://[ALIAS,System]/images/File.gif"}" width=40 border=0>
frescoUser is Offline
New Member
New Member
Posts:6

--
25 Jul 2007 08:34 PM  
got it!!!!
<img src="{IIF, [FORMAT,[Request.PhysicalApplicationPath]Portals\23\Human Resources\EmployeePictures/[FirstName] [LastName].jpg,{EXISTS}], "[PORTALPATH,System]Human%20Resources/EmployeePictures/[FirstName]%20[LastName].jpg", "http://[ALIAS,System]/images/File.gif"}" width=50 border=0>

Looking for #2) Solution now.
pauldesUser is Offline
Veteran Member
Veteran Member
Posts:1392

--
25 Jul 2007 09:52 PM  
It's possible to do, never tried personally, but check out this post....

http://dnn.bi4ce.com/Support/Forums/tabid/106/view/topic/forumid/7/postid/4116/Default.aspx
ListX....makes you look brilliant, even though you're not.
You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share