ProcessWire icon indicating copy to clipboard operation
ProcessWire copied to clipboard

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.

Open adrianbj opened this issue 10 years ago • 10 comments

adrianbj avatar Feb 21 '15 23:02 adrianbj

Just to clarify, this is for the comments fieldtype :)

adrianbj avatar Feb 21 '15 23:02 adrianbj

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.

ryancramerdesign avatar Feb 27 '15 12:02 ryancramerdesign

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 avatar Feb 27 '15 22:02 adrianbj

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 avatar Mar 06 '15 04:03 adrianbj

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 avatar Apr 24 '15 22:04 adrianbj

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 avatar May 09 '15 13:05 adrianbj

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!

adrianbj avatar Sep 15 '19 17:09 adrianbj

Hi Adrian,

Just curious, is this open on the Processwire issues repo?

netcarver avatar Sep 15 '19 23:09 netcarver

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 :)

adrianbj avatar Sep 16 '19 00:09 adrianbj

Yep, understood.

netcarver avatar Sep 16 '19 00:09 netcarver