Gossamer Forum
Home : Products : DBMan : Customization :

UPLOAD MOD WITH SHORT LONG DISPLAY

Quote Reply
UPLOAD MOD WITH SHORT LONG DISPLAY
Hi All

This is a strange one I fear!

I have installed the Short/Long Mod and the fileupload 3 mod. The idea being that my users can attach up to 5 piccie files to each record. All is working great until I tried to make some changes to the short long .

The idea is that in the short listing it will show detail of available records with a link to the long record but I also wanted to show a little graphic indicating whether or not the record had any piccies.

It seems to work fine for some bizarre reason in the sub_html_delete form and the sub_html_modify_form but on the sub_html_view_success it doesnt work had anybody any ideas. The code is shown below.It simply searches for a directory which matches the record id and if it doesnt find one it assumes no photos.



< !----- Code Below

# <-- Start of short display formatting -- >

print qq|
<font face=Verdana size=1><a href="$long_url">$rec{'TITLE'}</a></font></td><td><font face=Verdana size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$rec{'ENTRY_DATE'}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></td>
<td><font face=Verdana size=1>$rec{'COUNTRY'}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></td><td><font face=Verdana size=1>$rec{'LOCATION'}</font>|;

if (-e "/home/jamesmorris/public_html/photos/$rec{'$db_key'}") {
print qq|<img src="http://www.mydirectory.com/images/camera.gif">|;## If Photo Folder Exists
}
else {
print "<b>No Photos</b>";
}



print qq|
|;
# if you want to display your fields in columns, use the following format:
# print qq|
# $rec{'Field'}</td>
# <td>$rec{'Field'}</td>
# <td>$rec{'Field'}</td>
# <td>$rec{'Field'}|;

# Add or remove columns as needed. Be sure you add the $long_url link to one of your fields

# <-- End of short display formatting -- >

Any assistance greatly appreciated!!

Regards



James
Quote Reply
Re: [jamesamorris] UPLOAD MOD WITH SHORT LONG DISPLAY In reply to
If you are using the checkbox field "Graphic" which users would check if they are uploading a photo then you could easily use:

|;
if ($rec{'Graphic'} eq "Yes") { print qq| $pic_gif|; }
print qq|

within your short display.

And then just define the $pic_gif variable in your .cfg file as:

<img src="../images/camera.gif">

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] UPLOAD MOD WITH SHORT LONG DISPLAY In reply to
All Sorted now!

Thanx for the Help Lois