logo
WSN Links PHP Directory Software
Features Showcase Reviews Demos Purchase Manual Support
 

new file attach field for cats

Version: 4.1.13
Example URL: http://freewebbargains.com/retailers/majestic-wine/


new file attach field for cats
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 262
Total Posts: 831
Posted 11/13/07 - 12:01 AM:
quote post
#1
I have added a field {CATPHOTOATTACH}. I have this within my other sites and it has always worked fine. However, I can't seem to attach an image on this site.

I edit a category, go to the field and browse, select the image and then save changes. Only it doesn't attach the image.

I have in my customcat.tpl....

<input type="file" name="Photoattach" ><br >
{CATPHOTOATTACHTITLE} ({CATPHOTOATTACHNAME}) <br >
<input type="checkbox" name="photoattachdelete" value="1"> Delete Photo

The image does not show in the cat and when I go back into edit {CATPHOTOATTACHTITLE} and ({CATPHOTOATTACHNAME}) are both empty.

No error messages are given and it looks as thought it saves correctly.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5703
Posted 11/13/07 - 09:48 PM:
quote post
#2
Best to always keep field names lowercase, a mixed case field could be problematic. I believe it automatically lowercases when you add it anyway.
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 262
Total Posts: 831
Posted 11/13/07 - 10:07 PM:
quote post
#3
Paul wrote:
Best to always keep field names lowercase, a mixed case field could be problematic. I believe it automatically lowercases when you add it anyway.


OOPS! my typo! thanks for spotting. That's the trouble with being a touch typist.

It has now attached ok, but is not displaying (http://freewebbargains.com/retailers/majestic-wine/), instead I just get: 120x60_logo2e8e.wsn[,]120x60_logo.gif[,]0[,]120[,]60

I currently have:

<IF {CATPHOTOATTACH}>{CATPHOTOATTACH}<br ><br ></IF>

but also tried:

<IF {CATPHOTOATTACHBOOL}>{CATPHOTOATTACH}<br ><br ></IF>
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5703
Posted 11/14/07 - 12:32 AM:
quote post
#4
{CATPHOTOATTACH} isn't supposed to display anything meaningful, see the documentation: http://scripts.webmastersite.net/wsnlinks/wsnmanu... . You probably want
<img src="download.php?catid={CATID}&field=photoattach" alt="" />


Edited by Paul on 11/14/07 - 12:35 AM
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 262
Total Posts: 831
Posted 11/14/07 - 01:12 AM:
quote post
#5
Paul wrote:
{CATPHOTOATTACH} isn't supposed to display anything meaningful, see the documentation: http://scripts.webmastersite.net/wsnlinks/wsnmanu... . You probably want
<img src="download.php?catid={CATID}&amp;field=photoattach" >



Of course! Sorry Paul, I really am having a "blonde" week [sigh]
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

Admin Control Panel

   
Home    |    Features    |    Showcase    |    Reviews    |    Demos    |    Purchase    |    Manual    |    Support
© 2008 Paul Knierim. All rights reserved.