Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navhorizontal with user avatar #400

Merged

Conversation

thomas-topway-it
Copy link
Contributor

Allows to display an avatar in NavbarHorizontal, PersonalTools, as follows:


ScreenshotChameleonAvatar
the avatar will be displayed using a file with same username of the user (like Admin.png), or using a dedicated hook ChameleonNavbarHorizontalPersonalToolsAvatarUrl, that can for instance be used in conjunction with SemanticMediawiki by setting a file as value of the property User image, and then retrieving the thumbnail from a code snippet placed in LocalSettings.php. (or from a dedicated extension)

Also the pull request includes the global parameter $chameleonDisableAvatar to disable the avatar.

@krabina
Copy link
Contributor

krabina commented Dec 14, 2023

any thoughts, @malberts ?

@krabina
Copy link
Contributor

krabina commented May 4, 2024

can we get this integrated?

@malberts malberts merged commit ab5b9cc into ProfessionalWiki:master Jul 29, 2024
5 checks passed
@malberts malberts mentioned this pull request Jul 29, 2024
$this->indent() );

$this->indent( -1 );

return $dropdownToggle;
}

private function setUserAvatar() {
if ( !empty( $GLOBALS['chameleonDisableAvatar'] ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged the code, but this is not the right approach:

  • This should be a setting/attribute on the component in the XML. It is not a global Chameleon setting, but rather specific to one component.
  • It should be opt-in (avatars should be disabled by default), otherwise existing wikis might suddenly see avatars if they coincidentally had images with the matching names. This causes an unexpected change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #432

malberts pushed a commit that referenced this pull request Jul 29, 2024
* add user-avatar

* add userAvatar

* fix comment

* add avatar

* fix comment

* added global parameter chameleonDisableAvatar

* restore Fix deprecated Hooks usage

---------

Co-authored-by: Bernhard Krabina <[email protected]>
(cherry picked from commit ab5b9cc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants