-
Notifications
You must be signed in to change notification settings - Fork 194
Add support for custom image avatar, custom fields to automatically populate the Your Name field, and the ability to hide user fields when logged in.#954
Conversation
populate the Your Name field, and the ability to hide user fields when logged in.
adrianbj
commented
Feb 21, 2015
Just to clarify, this is for the comments fieldtype :)
ryancramerdesign
commented
Feb 27, 2015
Thanks Adrian, looks good to me. I like your additions. One thing I think I'll want to change when adding this is the method of hiding user fields. Currently it uses display=none to hide user fields. I think I'd rather prevent the markup from appearing in the output and let the info be determined at processing time. In addition to being a little more efficient, it'll prevent the possibility of the user manipulating those values using a web inspector or something.
adrianbj
commented
Feb 27, 2015
Great - thanks - looking forward to seeing this in the core - definitely something I need on my a few of my sites at the moment.
adrianbj
commented
Mar 6, 2015
Actually just wondering if when it's a logged in user that is leaving the comment, maybe the cite field shouldn't be populated at all, but when rendering comments, the value for cite should be queried based on the created_users_id field and the values of the fields defined in $this->options['yourNameFields']. Seems it would be nicer in case the user changes their name at some point.
adrianbj
commented
Apr 24, 2015
Hey Ryan,
Do you think there is any chance that this might make its way into 2.6. I am using it on a few sites now and it would be great to have it part of the core.
I completely understand if there is just too much else going on at your end - this is just a polite nudge if you do have time :)
adrianbj
commented
May 9, 2015
One more minor modification - we need to resize the image to 40 x 40
$imgUrl = count($u->{$this->options['useImageField']}) ? $u->{$this->options['useImageField']}->first()->size(40,40)->url : '';
adrianbj
commented
Sep 15, 2019
Hey @ryancramerdesign - what's the chance of getting this implemented - 4 years later and I am still doing this manually on many sites.
Thanks for considering!
netcarver
commented
Sep 15, 2019
Hi Adrian,
Just curious, is this open on the Processwire issues repo?
adrianbj
commented
Sep 16, 2019
Hi Steve - it's not, because I made this PR against a much older version of PW and Ryan sounded keen to implement more or less as is, even adding a ToDo tag to it. I happy to add a feature request on the new repo, but I'm not going to bother with an updated PR for obvious reasons :)
netcarver
commented
Sep 16, 2019
Yep, understood.
No description provided.