Masquerade by FriendsOfFlarum, the user profile builder
Released version 0.3.6
- Fix issue with fields in bio. Thanks arteteco for the report
composer require fof/masquerade
php flarum cache:clear
- Edited
Can I actually put array and regex in validation field? Having big trouble to compose this:
- Can’t contain spaces
- Must begin with a letter
- Can only contain letters, numbers, and the special characters hyphen ( - ), underscore ( _ ), and period ( . ), EXCEPT that the username:
- Can’t begin with a number, hyphen, underscore, or period
- Can’t end with a hyphen, underscore, or period
- Can’t contain emojis or other symbols such as @, $, #, etc.
along with my other requirements I've already covered:
string| min:3| max:15
I've heard that I can't use a pipe character while using regex so tried to make an array:
array(
'string' ,
'min:3' ,
'max:15' ,
'regex:[^0-9]'
)
However it does not seem to work ;/
EDIT
Actually googled regex which should cover all requirements:
[a-z][0-9a-z\-_\.]{1,13}[0-9a-z]
I think that it should be formated in validation field as that:
regex:[a-z][0-9a-z\-_\.]{1,13}[0-9a-z]
But it still does not work. What am I doing wrong?
EDIT.2
I finally worked it out on my own. Posting it in case someone ever needs something similiar.
regex:/(^[a-zA-Z][\w-_.]{1,13}[\w]$)/
aaronlbpeterman glad you figured it out! You probably don't need the parenthesis, but it's correct that the delimiters ()and start/finish match in this situation) is required.
- Edited
When marking a field obligatory, after signup the user is directed to their user profile to complete the fields. After completing them they are left on their user profile page, with no indication how to go 'home' other than the forum logo. For new users that's not so obvious though.
Suggestion, redirect to home after completing masquerade fields for the first time.
Also, I think there should be a back button on the profile regardless of how you enter the user profile. Right now it's only provided if you enter via a discussion. This would be related to flarum core (I think) though and there was also topic about this a few years back here, so I submitted an issue for that flarum/core2568 . Either solution would help, but the masquerade solution would be more user friendly for users of this extension (with obligatory fields).
ctml I see we have an existing issue about that and I even already published some of my thoughts there FriendsOfFlarum/masquerade60
I'm not sure exactly how to implement it in practice, but we might add it in a future update.
Thanks, I should have looked there. Glad to see it is already reported and it is being considered, it would provide a big UX improvement.
First of all, great effort on this add-on, thank you!
Short question, would it be possible to have the enabled fields visible when one hovers over a username (along the avatar, online status, joined date)? Currently one would have to dig through by going on the users profile to see the information in the enabled fields.
Thanks in advance.
ChipsyKing that feature already exists, for each field there is an option "Show answer to this field in user bio"
ctml, that's what I mean - that option is enabled and I still have to dig into the user profile to view it. It doesn't appear in the pop-up bubble when you hover the mouse over a username.
- Edited
ChipsyKing I think there could be a bug. I've seen behavior where a field doesn't show up on some profile cards (the popup) while for other users it does show, even though it has been set by them, and permissions to have/view are set to all members.
Yes this looks like a bug, I think I see what the problem is, but I'll need to take a closer look to fix it.
We show the fields on all user cards, on the profile or on the discussion list. Likewise, the bio fields relationship can be loaded on both BasicUser and User, so it should be loadable on the discussion list as well.
What's missing is the actual include in the discussion list. So this means that if you visited a user profile in the same browsing session, you will see their fields in the discussion card, otherwise you won't.
If someone can replicate this, feel free to open a GitHub issue explaining the steps to reproduce. Otherwise I'll get to it once I find some time.
clarkwinkelmann can confirm above steps work. I've made the issue to track FriendsOfFlarum/masquerade61
- Edited
not sure if is a bug but i have some visualization problem @luceos @clarkwinkelmann
and here when field are not compiled by user.
Justoverclock I don't understand what the problem is?
Is the field marked as required?
Even if a field is marked required, the users can avoid filling it in by navigating away from the Masquerade page after every login.
- Edited
no i mean css visualization problem, the text goes a little bit over the white space (is this regular?)
and if field are empty, the result is as the second image (is this regular too?) @clarkwinkelmann
and if yes, how can i adjust the visualization style?
Justoverclock first screenshot yes, that's how it has always looked like. I can agree it isn't the most pretty UI...
Second screenshot also seems to be as intended.
You can use custom local CSS to change the look. If you need more advanced customization that cannot be done with CSS, let us know what we could do to make it possible (additional classnames, different HTML tree?).
clarkwinkelmann You can use custom local CSS to change the look. If you need more advanced customization that cannot be done with CSS, let us know what we could do to make it possible (additional classnames, different HTML tree?).
for my website i'm using masquerade to allow user to post theyr PC configuration specs...
but as u can see in the second image, it looks really bad with default style, i do not want something specific, just to make it more modern.
clarkwinkelmann maybe can be better if is possible to mantain the look that anyone can see into own profile...like this:
and not like this:
Release 0.3.7
- Use new Flarum beta 15 admin panel page
- Update deprecated code
- Fix bio fields not always loaded
- Improve user experience around saving and required fields
composer require fof/masquerade
clarkwinkelmann should i launch
composer require or composer update ?