Hi,
I have tested the last version of RealName module and it works quite well either with core profile and either with ContentProfile. Honestly I prefer the last module because of it's flexibility and also because it permits quite easily to associate different profiles to different users (roles). RealName module permits to chose one of this ContentProfile and to configure the settings to create the RealName token on the basis of this ContentProfile fields. I think perhaps that it should be more useful and powerful to associate and to configure RealName setting for every ContentProfile (one setting for each). I'll try to explain better with an example:
- I define a ContentProfile "Teacher" for the rules "teachers" and I associate a field "First name", "Last name", "Title" (type of professor), ...
- I define a ContentProfile "Student" for the rules "students" and I associate a filed "First name", "Last name", "Class", ...
What I'll like to obtain is so a RealName "%Title %Last_name" for the teachers and "%Last_name % First_name (%Class)" for the students. Obviously there is also a "priority problem" because theoretically is possible to associate more ContentProfiles to one users (i.e. if a user is contemporary "student" and "teacher") but I think is sufficient to set a Priority (weight) for every ContentProfile so if a user as many ContenProfiles, the RealName module uses the one with highest priority/weight.
Do you think this can be implemented in future versions?
Best regards and thanks a lot for this great module.
Saxx
Comments
Comment #1
NancyDruThis sounds like a reasonable request and one which I had thought of when I was first adding this support. I just don't know when I can get to it.
Comment #2
NancyDruMarked #369616: Support fields shared accross multiple content profiles (content_profile). as duplicate if this one.
Comment #3
Balbo CreditAttribution: Balbo commented+1
(I also raised Priority to normal)
Comment #4
stefan81 CreditAttribution: stefan81 commentedhi, I am interested in this too,
as I have a profile for corporate members, and one for individuals.
So I would like to set up a rule using fields from two different content types.
Then I could enter three Variables 1% 2% 3% - "Company" "First name" "Last name"
Then I had either "Company" or "Firstname Lastname" as Realname.
So, it would be nice if we could select fields from multiple content types.
Can this be accomplished?
Comment #5
stefan81 CreditAttribution: stefan81 commentedHow about a token integration?
Then we could grab the tokens from various content profile pages.
Comment #6
jannol CreditAttribution: jannol commentedI have 2 content profiles set up, member_profile and company_profile and they have different roles
in member_profile I have field_first_name and field_last_name
in company_profile I use a field as the existing field_first_name but labeled as Company name
For now I allow company role to both view and edit own field_last_name even though there is no such fields in company_profile content.
realname.module (v 1.4.4.57 2009/10/13 17:48:06 nancyw)
org
added 1 line after line 743
realname_content_profile.inc
org
added 3 lines (plus comment line) after line 12
And now I have the Company name showing in both pages/nodes/private msg
I know my "solution" might be ugly hacks but in order to be able to write more later for either me or anyone else I try to find out what to do.
Comment #7
mandclu CreditAttribution: mandclu commentedSubscribing.
FWIW, token integration seems like a good approach, particularly given that Token is part of core for Drupal 7.
Comment #8
bjsomers CreditAttribution: bjsomers commentedjannol: I'd like to do a similar thing, but I'm not a coder and I have 3 content profile types. How would your patch look for two additional content types?
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm interested too...
Comment #10
g.k CreditAttribution: g.k commented+1 Subscribing
Comment #11
HippoOnDiet CreditAttribution: HippoOnDiet commented+1 Subscribing as well...
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedI really need a solution to this in the next month. Has anyone started on this? I'd be glad to lend a hand and in the event no one has progress, get a start on it. PM me if you'd like.
Comment #13
geerlingguy CreditAttribution: geerlingguy commentedSimilar issue for 7.x: #1194546: Different RealName for different roles and/or Profile2 profiles (maybe one of these two could be marked duplicate to focus efforts on one branch?).
Comment #14
lucascaro CreditAttribution: lucascaro commentedThat issue doesn't really look like a dupplicate of this one. One is for showing the same realname in different ways based on role, and this one is for having different realnames taken from different content profile node types.
Comment #15
lucascaro CreditAttribution: lucascaro commentedWell, here's a patch for those who need to use multiple content types to extract realnames.
This patch lets you select more than one profile content types in the realname settings page (admin/user/realname/module) and then shows you all fields from all of the selected types in the "fields" page.
Then you can basically use any fields from any of the selected content types as a source for realnames. as an example, if you have two profile types, say "personal" and "professional" with the following fields:
personal:
* first name
* last name
professional:
* title
if you select both types in the modules tabs (admin/user/realname/module) you will see all fields listed in the fields tab (admin/user/realname/fields).
You can then check all three fields if you want:
[x] personal: first name
[x] personal: last name
[x] professional: title
and then specify the pattern as usual.
%3 %2 %1
As an interesting note, all fields that are not present are ignored in the pattern, and this patch will let you specify different real names for users with different profile content types.
i.e. if you have teacher_profile and student_profile, with fields teacher_name and student_name, if you check both fields and use %1 %2 as a pattern, it will show either teacher_name or student_name as realname (assuming nobody has both content profile types created, in which case it would show both fields).
Well, I'm really interested in your feedback so if anybody finds any bug or problem, please let me know!
Edit: This is a valid -p0 (old style) patch, I'm not using git so the bot won't validate, but if you use patch -p0 < realname_multiple_profile_types.patch it should work.
the same goes for the next patch.
Comment #17
lucascaro CreditAttribution: lucascaro commentedChanged version to 6.x-1.x-dev and additional patch to remove warning message in the settings page.
Comment #18
lucascaro CreditAttribution: lucascaro commented#15: realname_multiple_profile_types.patch queued for re-testing.
Comment #20
Balbo CreditAttribution: Balbo commentedI tried the patch.
I had 2 roles with different content profiles and wanted different realnames. I created a (third, common) content type (also set as content profile) with 1 computed field and a text field. The computed field executed a php script to see if the form for the registration was filled with the field of one or the other content type and generated the realname writing it in the text field of this 3rd content profile. I, then, put this field in the /admin/user/realname/fields.
Here's what I did and what I noticed:
- patched realname,
- disinstalled computedfield,
- deleted the third content profile,
- in /admin/user/realname/module -> "content profile",
- in /admin/user/realname/fields -> checked Name, Surname, Company name (Name & Surname are fields of a content type used as content profile for "private" while Company name is a field of a content type used as content profile for "company"),
- rebulid realname.
It seems to work fine even if I'm still trying registration procedure...
Only things not to work very well, is the list in /admin/user/realname/fields where I expected to see (in the "field name" column) something like "content_type : field" instead of "0: field" (zero is fixed for all fields) and that created a little confusion since several fields are duplicated.
If others confirm the patch as working this should be a great add to the module. Thanks lucascaro!
Comment #21
lucascaro CreditAttribution: lucascaro commentedI think you need to go to admin/user/realname/module and select more than one content type.
For that, you need to click on the "Use this module" button and then you are presented with the content types selection page.
Anyways, this is a bug with the patch #15. I've created another patch that corrects this bug (added below).
This new patch needs to be applied after #15 and #17 were applied to the dev code.
I hope it helps.
Comment #22
lucascaro CreditAttribution: lucascaro commentedand the mentioned patch
Comment #23
Balbo CreditAttribution: Balbo commentedYour last patch is missing the part:
Except for this typo, it is working great!
Ps. I attached the same last patch (#22) with correct header.
Pps. Can this changes be added to the next release of the module?
Comment #24
lucascaro CreditAttribution: lucascaro commentedAwesome, so in order to make this work, one would need to apply patches #15, then #17 and after that #23 to the dev version.
It would be nice to have this as part of the module, but that is up to the maintainers. Also I'm using it without any problems, but it wouldn't hurt to have more people trying it and reporting here how it works.
Cheers!
Comment #25
abcdgeek CreditAttribution: abcdgeek commentedThank you i subscribe to the issue, is it ok for 1.4?
Comment #26
lucascaro CreditAttribution: lucascaro commentedI think it sould work for 1.4. If you test it, please report back here!
Comment #27
abcdgeek CreditAttribution: abcdgeek commentedAfter a short test, it works for 1.4
Comment #28
lucascaro CreditAttribution: lucascaro commentedHi all, I've re rolled the patch for the new 6.x-1.x-dev (datestamp is 1315960553).
I've put all the patches in one file and re-generated it with git.
Can you review so we can mark it as RTBC?
thanks!
Comment #29
marcvangendThe patch from #28 works as expected for me. Thanks lucascaro.
Comment #30
lucascaro CreditAttribution: lucascaro commentedyay! thanks! it's a much smaller patch though. I'd like it if more people could give it a look and see if it would work without the rest of the changes.
Comment #31
samalander CreditAttribution: samalander commentedThe patch from #28 worked for us on 6.x-1.4 and is working as well on 6.x-1.5.
Comment #32
ivanbreet CreditAttribution: ivanbreet commentedI can confirm that the patch from #28 worked for us on 6.x-1.5 too.
Comment #33
lucascaro CreditAttribution: lucascaro commentedRe-testing to see if this still applies to the latest -dev. if it works this should be good to go.
Edit: it seems that the patch does not apply to the latest dev. bummer. needs a manual re-roll. If the maintainer(s) like the patch I can do it, but I'd like to hear from them first.
Cheers.
Comment #36
hass CreditAttribution: hass commented