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> $rec{'ENTRY_DATE'} </font></td>
<td><font face=Verdana size=1>$rec{'COUNTRY'} </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
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> $rec{'ENTRY_DATE'} </font></td>
<td><font face=Verdana size=1>$rec{'COUNTRY'} </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