Project:Profile CSV
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

any chance to work with contet profile module?

Comments

#1

VIEWS BONUS MODULE can export all views to various CVS formats (it produces a kind of feed).
Views can show and filter CONTENT PROFILE fields as well as fields of CORE PROFILE.

:-)
-ksc-

#2

Title:content profile compatibility» Add note to project page about Views_Bonus module
Status:active» needs work

The Views_Bonus module's CSV exporter works perfectly. It might be worthwhile to add a comment on the project page to suggest using it?

#3

Title:Add note to project page about Views_Bonus module» Support for content_profile
Status:needs work» active

Due to having all of the extra fields available, and being able to give non-experienced site editors access to this vs Views, this is still worthwhile. I'm working on a preliminary patch for a client, will upload later tonight.

#4

Status:active» needs review

Here's a patch to try out for size. I've tried to keep it flexible, able to support field groups, multiple profile nodes, and includes two hooks to allow other modules to extend.

One other change I made was to remove the requirement for the Profile module as it isn't needed. The module now works with the core Profile, the contrib Content_Profile module, both or neither.

Work sponsored by Bluespark Labs.

AttachmentSize
profile_csv-n455030.patch 21.4 KB

#5

ToDo:

  • Documentation for the hooks.
  • Possible code cleanup.

#6

See #894840: Support for profile_csv for why it might need some work.

#7

Updated patch that changes all optionselect fields to be output as a comma-delimited string, e.g. "orange, banana, cumquat".

#8

Updated patch that changes all optionselect fields to be output as a comma-delimited string, e.g. "orange, banana, cumquat".

AttachmentSize
profile_csv-n455030-2.patch 21.59 KB

#9

Status:needs review» needs work

I couldn't get this to work. I got the following errors though:

# warning: Invalid argument supplied for foreach() in profile_csv/profile_csv.module on line 599.
# warning: Invalid argument supplied for foreach() in profile_csv/profile_csv.module on line 599.
# warning: Invalid argument supplied for foreach() in profile_csv/profile_csv.module on line 610.
# warning: Invalid argument supplied for foreach() in profile_csv/profile_csv.module on line 648.
# warning: Invalid argument supplied for foreach() in profile_csv/profile_csv.module on line 599

You need to add a check to ensure $value is array before doing a foreach.

However the main reason it's not working is that $field['name'] is being using and that is set to something like 'profile_csv_param_profile_field_profile_phone' which doesn't exist in the node object.

#10

Thanks for the review, Stella, I'll see about testing it some more and re-rolling.

#11

FYI I'm rewriting this to be much cleaner, should have something in a few days.

#12

subscribing

#13

Hi Damien - did you ever complete the rewrite you mentioned? Thanks!

#14

Haven't gotten back to work on it since October, am intending getting back to it in a few weeks.