Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Exporting PM's

Quote Reply
Exporting PM's
I want to add the facility to let users save all their PM's locally.
I think that the following might work, but I'm not sure exactly how to impliment it.

1. Create a new action - Export PM
2. Link the action to a new template
3. Call a sub in the new template which gets all the PM data for the current user
4. Write a header, something like
print $IN->header(
'-type' => 'application/msexcel-comma',
'-Content-Transfer-Encoding'=> 'binary',
'-Content-Disposition' => \("inline; filename=export.csv")
);

5. Write the data, comma seperated.

1 & 2 are simple.
3 must be something like "SELECT * FROM gforum_Message WHERE to_user_id_fk = %current_user%", but I'm not sure if a sub supports direct SQL or whether I have to get the data some other way. I noticed also that the date seems to need converting back to dd/mm/yyyy hh:mm.
4, does GF support writing output directly like this ?
5, presumably just a simple loop to output the data in the correct format ?

Any help on this gratefully appreciated.
Subject Author Views Date
Thread Exporting PM's davidnavigator 5914 Jun 15, 2004, 9:36 AM
Thread Re: [davidnavigator] Exporting PM's
Jagerman 5750 Jun 16, 2004, 2:05 PM
Thread Re: [Jagerman] Exporting PM's
davidnavigator 5754 Jun 18, 2004, 10:44 AM
Thread Re: [davidnavigator] Exporting PM's
Jagerman 5739 Jun 21, 2004, 11:58 AM
Thread Re: [Jagerman] Exporting PM's
davidnavigator 5729 Jun 22, 2004, 9:11 AM
Thread Re: [davidnavigator] Exporting PM's
davidnavigator 5704 Jul 6, 2004, 6:30 AM
Thread Re: [davidnavigator] Exporting PM's
davidnavigator 5693 Jul 13, 2004, 6:40 AM
Thread Re: [davidnavigator] Exporting PM's
Jagerman 5665 Jul 23, 2004, 4:40 PM
Post Re: [Jagerman] Exporting PM's
davidnavigator 5653 Jul 29, 2004, 4:36 AM