Webmastersite.net
Register Log In

new file attach field for cats

Comments on new file attach field for cats

babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Nov 13, 2007 - 12:01 AM:

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
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 13, 2007 - 9:48 PM:

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

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Nov 13, 2007 - 10:07 PM:

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
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 14, 2007 - 12:32 AM:

{CATPHOTOATTACH} isn't supposed to display anything meaningful, see the documentation: scripts.webmastersite.net/w...chmentspan-fields-161.html . You probably want
<img src="download.php?catid={CATID}&field=photoattach" alt="" />
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Nov 14, 2007 - 1:12 AM:

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}&field=photoattach" >



Of course! Sorry Paul, I really am having a "blonde" week [sigh]
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.