Custom Attachment field not working.
Items not being saved to db
Version: 5.0.5
URL:
|
sparkalina
Forum Regular Usergroup: Customer Joined: Nov 25, 2003 Total Topics: 69 Total Posts: 198 |
Posted 09/18/08 - 9:09 AM:
For my slide show the first picture to load is the "main photo", the photo the client wants people to see first. Since I can't sort attachments (a possible custom job for you), I thought I'd just add a custom file field. It appears to be functioning but any photo chosen is not not uploaded or saved to the db. Here is the code on my submit and editing pages. <input type="file" name="filefield_mainattach" /><br> {ITEMFILEFIELD_MAINATTACHTITLE} <input type="checkbox" name="filefield_mainattachdelete" value="1"> Delete this photo? <img src="http://www.webmastersite.net/forums/thumbnail.php?id={ITEMID}&field=filefield_mainattach&thumbwidth=50&thumbheight=50"> I edit the page (choosing an appropriate image), press save and then return to edit to see if the photo is listed to delete. The photo is not there and it's as if I never added it. To show the photo I'm using this code: (also not working because there is either something wrong with my code, or because a photo was never uploaded. The exported code to the page is blank. IE img src="" <img src="http://www.webmastersite.net/forums/{ITEMFILEFIELD_MAINATTACHNAME}" name="Oneshow" border="0"> Am I doing something wrong or is this something internal? ------------------------ Update: I deleted orphan attachments to get a clean start. Attached another image to the item and "thumb_50x50_nothumbnail.jpg" was created and inserted into the attachment directory but the main photo was not uploaded and is not visible in the attachments directory. Debug mode On and recorded after adding an image.
Edited by sparkalina on 09/18/08 - 12:24 PM |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 09/21/08 - 8:13 AM:
Since I can't sort attachments You can with a toplist of them. Testing custom attachment fields now. |
|
sparkalina
Forum Regular Usergroup: Customer Joined: Nov 25, 2003 Total Topics: 69 Total Posts: 198 |
Posted 09/21/08 - 8:51 AM:
Sorry, when I meant I can't sort them, I meant the Member can't sort them to choose which attachment to choose first. I want the member to be able to upload a photo that represents the first photo seen. But since they can't that's why I created a second upload field. Any luck with the custom attachment? I still can't get it to work. |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 09/21/08 - 1:52 PM:
Fixed custom attachments problem. |
|
sparkalina
Forum Regular Usergroup: Customer Joined: Nov 25, 2003 Total Topics: 69 Total Posts: 198 |
Posted 09/21/08 - 2:33 PM:
Fixed in the new version I assume. Hopefully my client will pony up for the license asap. He has the invoice. |
Sorry, you don't have permission to post. Log in, or register if you haven't yet.

Print