From: Matthew G. <gr...@mu...> - 2002-03-25 20:33:07
|
Since I didn't get any feedback on this idea, I went ahead an created the attached patch against current CVS. I'm sure it's lacking somewhere so...comments? --On Saturday, March 23, 2002 10:09:27 AM -0500 Matthew Gregg <gr...@mu...> wrote: > I've got this roughed in and working. > I'm getting around headers/data being sent as follows: > In export.inc on the CSV download url, I'm adding another parameter that > is used in manage.php and when export.inc is called later to bypass any > headers or data being sent. > > At your suggestion I split survey_export_cvs() into survey_export_cvs() > and survey_generate_cvs() > > As for as mime types: > I'm considering "application/x-msexcel" or "text/plain-text". We've used > x-msexcel before to "trick" excel into opening tab delimited text files. > Not sure how it will work for csv. > > How's this sound? > > > --On Friday, March 22, 2002 03:00:06 PM -0500 "James E. Flemer" > <jf...@ac...> wrote: > >> Please do! How do you plan to do this? I was thinking that >> there would have to be some script outside the >> admin/include framework to do this (since by then there are >> already headers/data sent). This script outside should use >> a content-type of "application/x-csv"(?) and return the >> actual csv data. I would suggest splitting the exising >> survey_export_cvs() into: >> survey_generate_cvs() -- creates a string/array of data >> survey_export_cvs() -- calls generate, and writes to file >> Then your download script could call generate, and just >> print the appropriate headers then the data directly. >> >> -James >> >> On Fri, 22 Mar 2002, Matthew Gregg wrote: >> >>> Cool. Since that was done so fast. I can move on to the next change. >>> Unless someone objects or has already started it, I would like to add >>> "download" to the export function. >> > > > > _______________________________________________ > phpESP-devel mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > one of the friendly folks in the IT Lab. --------------------------------------\ The IT Lab (http://www.itlab.musc.edu) \____________________ Probably the world's premier software development center. Serving: Programming, Tools, Ice Cream, Seminars |