Webmastersite.net
Register Log In

Custom Attachment field not working.

Title Custom Attachment field not working.
Description Items not being saved to db
Message Text 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="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="{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.
Query 6: SELECT `id`,`name`,`parent`,`validated`,`description`,`time`,`parentnames`,`parentids`,`numlinks`,`hide`,`lastlinktime`,`custom`,`lastedit`,`moderators`,`headerinfo`,`related`,`numsub`,`type`,`permissions`,`subscribers`,`subscriber`,`mixtypes`,`isalbum`,`orderlinks`,`totalcomments`,`ulsearchmax`,`ulsearchquery`,`ulsearchadult`,`alias`,`catcols`,`linkcols`,`dmozpath`,`sponsorlinks`,`views`,`customwrap`,`deleted`,`reqlinks`,`reqcoms`,`reqlinksdelay`,`priority`,`levelsdeep`,`lastposterid`,`lastpostername`,`lastcommenttime`,`lastthreadid`,`lastthreadtitle`,`linkshere`,`unvalidatedlinks`,`unvalidatedcomments`,`actaslink`,`countposts`,`subcatshtml`,`linksperpage`,`wysihtml`,`numonline`,`sponsorship`,`lastprofileurl`,`defaultnoaccess`,`lastthreadurl`,`lastposturl`,`specialurl` FROM wsnclassifieds_categories WHERE id=282

Load time so far: 0.09 seconds.
Query 7: SELECT `id`,`to`,`subject`,`message`,`headers`,`replacement`,`mime` FROM wsnclassifieds_email WHERE timesent=0 AND inprogress=0 ORDER BY id ASC LIMIT 0,10

Load time so far: 0.09 seconds.
Number of rows is 0

Query 8: SELECT `catid` FROM wsnclassifieds_sessions WHERE catid>0 AND time > 1221768520

Load time so far: 0.1 seconds.
Number of rows is 1

Load time so far: 0.1 seconds.
Query 9: UPDATE wsnclassifieds_categories SET numonline='0' WHERE 1=1

Load time so far: 0.11 seconds.
Query 10: UPDATE wsnclassifieds_categories SET numonline='1' WHERE id=282

Query 11: SELECT `memberid`,`starttime`,`time` FROM wsnclassifieds_sessions WHERE time < 1221768520 AND memberid > 0

Load time so far: 0.11 seconds.
Number of rows is 0

Load time so far: 0.11 seconds.
Query 12: DELETE FROM wsnclassifieds_sessions WHERE time < 1221768520

Query 13: SELECT `id`,`type`,`objectid`,`filename`,`filetitle`,`filesize`,`width`,`height`,`memberid`,`time`,`deleted`,`field`,`downloads`,`validated`,`ownerip`,`catid`,`importurl` FROM wsnclassifieds_attachments WHERE importurl != '' ORDER BY id ASC LIMIT 0,1

Load time so far: 0.11 seconds.
Number of rows is 0

Query 14: SELECT `id`,`frequency`,`filename`,`nextrun` FROM wsnclassifieds_crons WHERE nextrun < 1221769420 ORDER BY id ASC LIMIT 0,1

Load time so far: 0.11 seconds.
Number of rows is 0

Query 15: SELECT `id`,`name`,`parent`,`validated`,
`description`,`time`,`parentnames`,`parentids`,`numlinks`,`hide`,`lastlinktime`,`custom`,`lastedit`,`moderators`,`headerinfo`,`related`,`numsub`,`type`,`permissions`,`subscribers`,`subscriber`,`mixtypes`,`isalbum`,`orderlinks`,`totalcomments`,`ulsearchmax`,`ulsearchquery`,`ulsearchadult`,`alias`,`catcols`,`linkcols`,`dmozpath`,`sponsorlinks`,`views`,`customwrap`,`deleted`,`reqlinks`,`reqcoms`,`reqlinksdelay`,`priority`,`levelsdeep`,`lastposterid`,`lastpostername`,`lastcommenttime`,`lastthreadid`,`lastthreadtitle`,`linkshere`,`unvalidatedlinks`,`unvalidatedcomments`,`actaslink`,`countposts`,`subcatshtml`,`linksperpage`,`wysihtml`,`numonline`,`sponsorship`,`lastprofileurl`,`defaultnoaccess`,`lastthreadurl`,`lastposturl`,`specialurl` FROM wsnclassifieds_categories WHERE id=282

Load time so far: 0.11 seconds.
Query 16: SELECT `id`,`name`,`parent`,`validated`,`description`,`time`,`parentnames`,`parentids`,`numlinks`,`hide`,`lastlinktime`,`custom`,`lastedit`,`moderators`,`headerinfo`,`related`,`numsub`,`type`,`permissions`,`subscribers`,`subscriber`,`mixtypes`,`isalbum`,`orderlinks`,`totalcomments`,`ulsearchmax`,`ulsearchquery`,`ulsearchadult`,`alias`,`catcols`,`linkcols`,`dmozpath`,`sponsorlinks`,`views`,`customwrap`,`deleted`,`reqlinks`,`reqcoms`,`reqlinksdelay`,`priority`,`levelsdeep`,`lastposterid`,`lastpostername`,`lastcommenttime`,`lastthreadid`,`lastthreadtitle`,`linkshere`,`unvalidatedlinks`,`unvalidatedcomments`,`actaslink`,`countposts`,`subcatshtml`,`linksperpage`,`wysihtml`,`numonline`,`sponsorship`,`lastprofileurl`,`defaultnoaccess`,`lastthreadurl`,`lastposturl`,`specialurl` FROM wsnclassifieds_categories WHERE parent=282 AND validated=1 AND hide=0 AND deleted=0 AND isalbum=0 ORDER BY priority ASC,name ASC LIMIT 0,40

Load time so far: 0.12 seconds.
Number of rows is 0

Query 17: SELECT `id`,`title`,`url`,`description`,`rating`,`votes`,`validated`,`catid`,`sumofvotes`,`email`,`time`,`hits`,`numcomments`,`hide`,`ownerid`,`voterips`,`voterids`,`lastedit`,`type`,`notify`,`suspect`,`pendingedit`,`funds`,`suspended`,`alias`,`expire`,`ip`,`inalbum`,`typeorder`,`recipurl`,`hitsin`,`recipwith`,`hitsinips`,`hitsoutips`,`lastcomment`,`related`,`inhidden`,`viewers`,`threadviewers`,`hitsintemp`,`hitsouttemp`,`origtype`,`importance`,`parentids`,`timesdead`,`timesemailed`,`threadclosed`,`threadposters`,`lastposterid`,`lastpostername`,`ownername`,`deleted`,`deletionreason`,`movedto`,`deletedby`,`timevalidated`,`filefield`,`message`,`sticky`,`downloads`,`pollid`,`posticon`,`savedby`,`validatedemail`,`unpaid`,`recipverified`,`effectivetime`,`sugcatid`,`pagerank`,`wysihtml`,`movedid`,`unrevised`,`feedurl`,`feedcache`,`feedcachetime`,`tags`,`xmlsource`,`ordercomments`,`lastpadupdate`,`padfile`,`lastmonthlycheck`,`invisibleto`,`profileurl`,`lastprofileurl`,`price`,`summary`,`timesrenewed`,`timedeleted`,`address`,`city`,`state`,`country`,`latitude`,`zip`,`sponsorend`,`longitude`,`contact_name`,`contact_phone_office`,`contact_phone_home`,`contact_phone_mobile`,`contact_email`,`property_style_other`,`property_architect`,`property_size`,`property_features`,`property_credits`,`filefield_mainattach`,`contact_phone_other`,`contact_phone_other_label`,`property_style` FROM wsnclassifieds_links WHERE catid=282 AND hide=0 AND deleted=0 AND validated=1 AND effectivetime < 1221769420 ORDER BY typeorder ASC,time DESC,title ASC LIMIT 0,14

Load time so far: 0.12 seconds.
Number of rows is 1

Creating link with Array as row

Query 18: SELECT `id`,`type`,`objectid`,`filename`,`filetitle`,`filesize`,`width`,`height`,`memberid`,`time`,`deleted`,`field`,`downloads`,`validated`,`ownerip`,`catid`,`importurl` FROM wsnclassifieds_attachments WHERE deleted=0 AND validated=1 AND type='link' AND objectid='1' ORDER BY rand() LIMIT 0,1

Load time so far: 0.14 seconds.
Number of rows is 1

Creating attachment with Array as row

Load time so far: 0.15 seconds.
Query 19: SELECT COUNT(id) FROM wsnclassifieds_links WHERE catid=282 AND validated=1 AND hide=0 AND deleted=0 AND type='regular' AND effectivetime < 1221769420

Count is 0
Load time so far: 0.16 seconds.
Query 20: SELECT COUNT(id) FROM wsnclassifieds_links WHERE catid=282 AND validated=1 AND hide=0 AND deleted=0 AND type='featured' AND effectivetime < 1221769420

Count is 1
Query 21: SELECT `id`,`name`,`parent`,`validated`,`description`,`time`,`parentnames`,`parentids`,`numlinks`,`hide`,`lastlinktime`,`custom`,`lastedit`,`moderators`,`headerinfo`,`related`,`numsub`,`type`,`permissions`,`subscribers`,`subscriber`,`mixtypes`,`isalbum`,`orderlinks`,`totalcomments`,`ulsearchmax`,`ulsearchquery`,`ulsearchadult`,`alias`,`catcols`,`linkcols`,`dmozpath`,`sponsorlinks`,`views`,`customwrap`,`deleted`,`reqlinks`,`reqcoms`,`reqlinksdelay`,`priority`,`levelsdeep`,`lastposterid`,`lastpostername`,`lastcommenttime`,`lastthreadid`,`lastthreadtitle`,`linkshere`,`unvalidatedlinks`,`unvalidatedcomments`,`actaslink`,`countposts`,`subcatshtml`,`linksperpage`,`wysihtml`,`numonline`,`sponsorship`,`lastprofileurl`,`defaultnoaccess`,`lastthreadurl`,`lastposturl`,`specialurl` FROM wsnclassifieds_categories WHERE id=1

Load time so far: 0.17 seconds.
Query 22: SELECT `id`,`name`,`parent`,`validated`,`description`,`time`,`parentnames`,`parentids`,`numlinks`,`hide`,`lastlinktime`,`custom`,`lastedit`,`moderators`,`headerinfo`,`related`,`numsub`,`type`,`permissions`,`subscribers`,`subscriber`,`mixtypes`,`isalbum`,`orderlinks`,`totalcomments`,`ulsearchmax`,`ulsearchquery`,`ulsearchadult`,`alias`,`catcols`,`linkcols`,`dmozpath`,`sponsorlinks`,`views`,`customwrap`,`deleted`,`reqlinks`,`reqcoms`,`reqlinksdelay`,`priority`,`levelsdeep`,`lastposterid`,`lastpostername`,`lastcommenttime`,`lastthreadid`,`lastthreadtitle`,`linkshere`,`unvalidatedlinks`,`unvalidatedcomments`,`actaslink`,`countposts`,`subcatshtml`,`linksperpage`,`wysihtml`,`numonline`,`sponsorship`,`lastprofileurl`,`defaultnoaccess`,`lastthreadurl`,`lastposturl`,`specialurl` FROM wsnclassifieds_categories WHERE id=77

Load time so far: 0.17 seconds.
Setting cookie with name returnto, value www.reellocations.com/dir/i...ction=displaycat&catid=282 and expiration time 0

Query 23: SELECT `id`,`memberid`,`location`,`time`,`ip`,`browser`,`starttime`,`catid`,`threadid`,`areaname`,`lastsearch`,`nopermission`,`inchat`,`name`,`isrobot`,`lastchat`,`groupnamestyle`,`acceptims`,`visibility`,`profileurl` FROM wsnclassifieds_sessions WHERE time > 1221768520 AND (catid=282 AND memberid>0) ORDER BY time DESC LIMIT 0,100

Load time so far: 0.18 seconds.
Number of rows is 1

Creating online with Array as row

Query 24: SELECT `id`,`memberid`,`location`,`time`,`ip`,`browser`,`starttime`,`catid`,`threadid`,`areaname`,`lastsearch`,`nopermission`,`inchat`,`name`,`isrobot`,`lastchat`,`groupnamestyle`,`acceptims`,`visibility`,`profileurl` FROM wsnclassifieds_sessions WHERE memberid=1

Load time so far: 0.32 seconds.
Number of rows is 1

Creating online with Array as row

Load time so far: 0.32 seconds.
Query 25: UPDATE wsnclassifieds_sessions SET starttime = '1221762590', name = 'admin', time = '1221769420', location = 'http://www.reellocations.com/dir/index.php?action=displaycat&catid=282', catid = '282', threadid = '', areaname = '50s Diners ', nopermission = '0', inchat = '0', ip = '71.164.194.24' WHERE id=63
Rating
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5
0/5 based on 0 votes.
Ownership sparkalina
Views 283 views. Averaging 0 views per day.
Similar Topics
Submission Date Sep 18, 2008 - 12:09 PM