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.
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.