Don't Get It.

From: Mouse15 Dec 2009 21:47
To: Peter (BOUGHTONP) 4 of 28
Also, I appreciate you typing all that, but it doesn't mean much to me.. Would that replace all or that PHP file I attached or just part of it?
EDITED: 15 Dec 2009 21:49 by MOUSE
From: Peter (BOUGHTONP)15 Dec 2009 21:50
To: Mouse 5 of 28
Shove it on the end.

The end of what, I'm not quite sure. :$

Are you browsing directly to the attached file, or using include(file.php) or similar?
From: Mouse15 Dec 2009 21:53
To: Peter (BOUGHTONP) 6 of 28
That file can be found in the module/froogle/ directory. I started messing with it after reading this.
From: Peter (BOUGHTONP)15 Dec 2009 23:13
To: Mouse 7 of 28

I got confused with that link, so I jumped into PHPEclipse and fixed the file.

 

Not quite so bad to identify the relevant parts to change with a decent font, word wrap off, and syntax formatting on, but I've still only modified the actual file output stuff - that utterly evil SQL query is no doubt doing more work than it needs to be, but I'm definitely not diving in to go fix that.

 

Anyway, should be attached. (Use BeyondCompare/WinDiff/etc if you want to see what I changed).

EDITED: 15 Dec 2009 23:13 by BOUGHTONP
Attachments:
From: Mouse15 Dec 2009 23:23
To: Peter (BOUGHTONP) 8 of 28
Cheers Pete, I'll look over that with a furrowed brow. Just tried using it as is and it broke, but I'll look at it closer tomorrow.
From: Peter (BOUGHTONP)15 Dec 2009 23:39
To: Mouse 9 of 28
Bah!

Broke with an error broke, or worked but produced the wrong results broke?

And did the original version work (just with too many columns) or had you not tried it?
From: Mouse15 Dec 2009 23:54
To: Peter (BOUGHTONP) 10 of 28

Well, there's a section in my admin to export a Tab Delimited file, that just doesn't work.

 

The original works but gives me more columns than I require.

From: Peter (BOUGHTONP)16 Dec 2009 00:05
To: Mouse 11 of 28
Arse.

I missed the trailing concatenation and semi-colon stuff. (I blame PHP being crap for that.)

Anyway, this one will work.
Attachments:
From: Mouse16 Dec 2009 00:22
To: Peter (BOUGHTONP) 12 of 28
Cheers Pete, will try that tomorrow when I am on a desktop, for it is fiddlier than Vannesa Mae on the Netbook.
From: CHYRON (DSMITHHFX)16 Dec 2009 01:01
To: Peter (BOUGHTONP) 13 of 28

Have you tried PDT yet? If so, Howse it compare to PHPEclipse?

 


deit: mind you, this is like me axing a brain surgeon if he prefers a hacksaw or a chainsaw...

EDITED: 16 Dec 2009 01:06 by DSMITHHFX
From: Peter (BOUGHTONP)16 Dec 2009 01:17
To: CHYRON (DSMITHHFX) 14 of 28
Haven't tried it - was about three years ago when I setup that Eclipse config, and at the time PHPEclipse was the only (usable) Eclipse plugin for PHP.

Since I do so little PHP stuff, I haven't bothered updating, nevermind considering alternatives.
From: CHYRON (DSMITHHFX)16 Dec 2009 01:32
To: Peter (BOUGHTONP) 15 of 28
The only reason I ask is because Aptana ('nuther Eclipse-based ide, which I happen to use rather a lot) recently switched to PDT.
From: Peter (BOUGHTONP)16 Dec 2009 01:43
To: CHYRON (DSMITHHFX) 16 of 28
Aptana sucks.

Tried it a couple of times (for JS/CSS/XML stuff), most recently about a month ago, but every time it has annoyed me a great deal.

My work colleagues feel the same, and they're far less fussy about their software than I am.
From: CHYRON (DSMITHHFX)16 Dec 2009 02:01
To: Peter (BOUGHTONP) 17 of 28
Yeah but it sucks less than netbeans ime (at least for generic [x]html/css, and beats the living shit outta anyfink for rails, dunno 'bout javascript per se or anyting heavy), and is a pretty decent replacement for dw, in that it doesn't attempt to 'help' you rewrite your code into an undifferentiated mass of blood, bone and brainmatter...
From: Mouse16 Dec 2009 11:23
To: Peter (BOUGHTONP) 18 of 28
Still giving me the same old headers that when I export a file :(
From: Peter (BOUGHTONP)16 Dec 2009 11:54
To: Mouse 19 of 28
Huh? :S

Look at lines 115..122 - the old headers should be commented out with double slash, with the shortened versions beneath?

Only thing I can think is that maybe I've gone mad and PHP doesn't use that for comments - try switching for the hash that the other comments use and see if that makes a difference?
From: Mouse16 Dec 2009 12:29
To: Peter (BOUGHTONP) 20 of 28
It says:
code:
if ($fp !== false) {
		# Write file header
 
		# Full header: 
		# title\tdescription\tlink\timage_link\tid\texpiration_date\tlabel\tprice\tprice_type\tcurrency\tpayment_accepted\tpayment_notes\tquantity\tbrand\tupc\tisbn\tmemory\tprocessor_speed\tmodel_number\tsize\tweight\tcondition\tcolor\tactor\tartist\tauthor\tformat\tproduct_type\tlocation
		if ($froogle_iso) {
			// fputs($fp, "title\tdescription\tlink\timage_link\tid\tprice\tcurrency\tpayment_accepted\tpayment_notes\tquantity\tweight\texpiration_date\tbrand\tcondition\tproduct_type\tlanguage\n");
			fputs($fp, "title\tdescription\tlink\timage_link\tid\tprice\tcondition\tlanguage\n");
 
		} else {
			// fputs($fp, "title\tdescription\tlink\timage_link\tid\tprice\tcurrency\tpayment_accepted\tpayment_notes\tquantity\tweight\texpiration_date\tbrand\tcondition\tproduct_type\n");
			fputs($fp, "title\tdescription\tlink\timage_link\tid\tprice\tcondition\n");
		}


I believe it is commented out correctly... I kind of did that sort of thing myself before and it didn't work, so I assumed there must be something else.

Sorry Pete :(
From: Peter (BOUGHTONP)16 Dec 2009 13:49
To: Mouse 21 of 28
Hmmm. Is there any form of caching in place?
From: Mouse16 Dec 2009 16:26
To: Peter (BOUGHTONP) 22 of 28
I don't think so.. tried it again in a different browser with no luck. Grr..
From: Peter (BOUGHTONP)16 Dec 2009 16:57
To: Mouse 23 of 28
I meant server/software level, rather than browser.

Also, do you have any of the other PHP files lying around in the same directory - if so, try moving them or changing the extension in case the software tries to be clever and execute them all.