Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
adrianbj wants to merge 4 commits into
ryancramerdesign:dev from
adrianbj:dev
Open

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
adrianbj wants to merge 4 commits into
ryancramerdesign:dev from
adrianbj:dev

Conversation

@adrianbj

@adrianbj adrianbj commented Feb 21, 2015

Copy link
Copy Markdown

No description provided.

populate the Your Name field, and the ability to hide user fields when
logged in.

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
Owner

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.

andy-scboy reacted with thumbs up emoji

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
Author

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.

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
Author

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 : '';

Copy link
Copy Markdown
Author

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!

Copy link
Copy Markdown

Hi Adrian,

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

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown

Yep, understood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /