Closed (fixed)
Project:
Real Name
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Sep 2014 at 11:25 UTC
Updated:
22 Nov 2015 at 15:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rudiedirkx commentedVoila patch. Very easy.
Comment #2
rudiedirkx commentedNow with a link to the user profile, if the current user has access to that.
Comment #4
rudiedirkx commentedNote to self: don't hack patches.
Attached patch is re-rolled against 1.2.
Comment #8
rudiedirkx commentedFFS! Last attempt!
Comment #10
rudiedirkx commentedThis patch is unsafe. Use #29.
Now it's getting ridiculous....
Comment #11
rudiedirkx commentedComment #12
hass commentedHave you tried views field module or how was this named...?
Comment #13
rudiedirkx commentedViews field? How is that related to an extra field in the user profile?
Comment #14
hass commentedIt allows you to show what you are looking for. I'm using this to show views data.
Comment #15
rudiedirkx commentedWho's talking about views??
"Extra fields" doesn't mean "more fields". It means extra_fields.
Comment #16
hass commentedIt allows you to add a field to every entity and the source of the vield is a view. And this view can select the realname. See https://www.drupal.org/project/viewfield
Comment #17
rudiedirkx commentedAre you seriously talking about adding a real field to load a real view, to display a logicless name? This is THE reason extra_fields exist.... You don't create a field and a view to display a node title or created date, do you?
Did you see the patch? That's what an
extra_fielddoes. No logic, no display settings, no querying, just a simple display.Comment #18
hass commentedI know what extra fields are. The views solution may be a bit heavy. However I wonder that you do not have the first/lastname in user fields. I'm using addressfield and it shows perfectly.
Comment #19
rudiedirkx commentedI have 3 fields that combined are the realname. Sometimes 1 of those 3 fields is shown. I can do that with the normal field display. Other times the full name (realname) is displayed. No addressfield. Realname takes care of the combination logic/pattern. Now I need to display it...
It seems a sensible addition. Whether to add it, is up to you.
Comment #20
michael_lessard_micles.biz commentedFeedback : this seems like a good place to quickly mention how not user-friendly the D7 version of this module has become.
D6 was more user friendly; albeit somewhat complicated: it was easy to understand how to make the real name field appear.
D7 Realname needs some clear HowTo instructions ("If needed, create a text field in Account Settings > Manage Fields. In the Real name settings, browser tokens options and use your desired field instead of core User name").
Comment #21
ericclaeren commentedGreat, thanks for the patch. Will this land in a stable release soon?
Comment #22
rudiedirkx commented@dreamlabs If you've reviewed & tested, change the issue status so the maintainer knows this one's ready to go.
Comment #23
ericclaeren commentedIt works for me, simple fix. Could the maintainer look at this?
Comment #24
ericclaeren commentedComment #25
ericclaeren commentedComment #26
simon_j_nichols commentedI haven't deployed this, but looking at the code, doesn't the #markup create a URL to the user account page, while being displayed on the user account page.
Not a problem as such .....
:)
Nice code though, I didn't know about the hook_field_exta_fields function
Comment #27
hass commentedIsn't there a checkplain required on the realname if I have no view permissions?
Comment #28
rudiedirkx commentedVery true!
#10 is unsafe.
Comment #29
rudiedirkx commentedNew patch & interdiff.
#entity_typewas also missing from the fake field.Comment #30
rudiedirkx commentedRealname strips HTML tags during its update process:
(which is WRONG IMO), so #10 isn't really unsafe, but wrong nonetheless.
Comment #31
hass commentedJust reviewed this patch and wondered why I cannot select how to label should be shown. This should work like all other fields.
Comment #32
hass commentedDamn, we cannot make this invisible by default.
Comment #34
hass commentedComment #36
rudiedirkx commentedExtra fields don't have settings out of the box. They're still very useful to position fields, like in this case. I have a Sandbox I use to add settings to extra fields. https://www.drupal.org/sandbox/rudiedirkx/2501347 I don't think D8 will have this out of the box.
Comment #37
hass commentedI have read that this is already in D8, but haven't verified it myself.
Comment #38
rudiedirkx commentedExtra fields with settings?? That would be awesome, but
hook_entity_extra_field_info()doesn't mention anything. Neither doesEntityFieldManagerInterface::getExtraFields().Comment #39
hass commentedNo, just the default setting for visibility can be configured. This is what I'd wish to do here. Hide it by default.
Comment #40
rudiedirkx commentedAh yes. It's still TRUE by default in D8, which is still weird, but it's better.
You can explicitly check the display settings for the extra field. If it's not explicitly enabled, it's not user-enabled. A lot of code to check something very simple...
This is what I use in Node Registration, including the comment =)
Comment #41
hass commentedSee #1256368: Add 'visible' key to hook_field_extra_fields()