Webmastersite.net
Register Log In

Custom Link Attachments

Comments on Custom Link Attachments

sportrow
Member

Usergroup: Customer
Joined: Feb 14, 2005
Location: Iowa

Total Topics: 20
Total Comments: 43
Posted Nov 25, 2007 - 11:20 PM:

Hello- I have been struggling with the instructions for custom file attachment fields. I have been able to get the files to upload but with quirky outcomes. Understand that I would like to offer both type of upload options when submitting or editing a link. So I am seeking help on some advice here. Also I am having troubles deleting the files once added. The original code below. I have added a tag called {LINKATTACHCOUPONS}



My modified try
<tr>
<td class="labelscolumn" width="20%"><span class="labels">Attach Coupon(s):</span>
<br />Allowed file types: {ALLOWEDEXTENSIONS}</td>
<td class="optionscolumn" width="80%">
<IF {LINKNUMATTACHMENTS} is less than {THISMEMBERGROUPATTACHPERLINK}><input type="file" name="attachcoupons" /> <input type="submit" name="uploadattachment" value="Attach" class="button" /></IF>
<IF {LINKNUMATTACHMENTS}>

<br />Coupon:<br/>
<!-- BEGIN MENU ATTACHMENTS -->
<input type="checkbox" name="attachcouponsdelete[]" value="{ATTACHID}" /> {LINKATTACHCOUPONSTITLE} ({LINKATTACHCOUPONSKB} KB)<br />
<!-- END MENU ATTACHMENTS -->
<input type="submit" name="attachdeletion" value="Delete Selected" class="button" />

</IF>
</td>
</tr>


Orignal Code
<tr>
<td class="labelscolumn" width="20%"><span class="labels">Attach Menu(s):</span>
<br />Allowed file types: {ALLOWEDEXTENSIONS}</td>
<td class="optionscolumn" width="80%">
<IF {LINKNUMATTACHMENTS} is less than {THISMEMBERGROUPATTACHPERLINK}><input type="file" name="filefield" /> <input type="submit" name="uploadattachment" value="Attach" class="button" /></IF>
<IF {LINKNUMATTACHMENTS}>

<br />Menus:<br />
<!-- BEGIN LINK ATTACHMENTS -->
<input type="checkbox" name="attachdelete[]" value="{ATTACHID}" /> {ATTACHFILETITLE} ({ATTACHKB} KB)<br />
<!-- END LINK ATTACHMENTS -->
<input type="submit" name="attachdeletion" value="Delete Selected" class="button" />

</IF>
</td>
</tr>
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 28, 2007 - 12:15 AM:

The upload attachment button is meant for the grouped, generic attachment. With custom file fields, you just specify the file and it'll be submitted when you submit the link. This can be a problem if you also use the generic attachments, since someone could upload one of those which would cause the custom file field's attachment to be lost. I don't have a solution for that though, they were really meant as exclusive options.
sportrow
Member

Usergroup: Customer
Joined: Feb 14, 2005
Location: Iowa

Total Topics: 20
Total Comments: 43
Posted Nov 28, 2007 - 2:37 PM:

Hey Paul- I am digging that. What you are explaining was exactly happening to me. I could really benefit from having a solution to upload 2 seperate files each with their own user permissions. However I am guessing most people using WSNlinks would not have a need for that. Thanks for your info on this.
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.