Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools
Board » General » Feature Discussions » Username instead of first and second name

Page: 1 2 3 4 Next

I haven't found such an option so I assume that it is a new feature to be discussed.

I'd like to have a switch which will make the board showing only usernames (and not user's first and second name). A user's full name should be visible only in user's profile.

This is how boards like autokacik.pl (polish one) works and this is reasonable in my opinion. I have a nickname so I'd like it to be shown. My full name is also accessible but not on the first shot.

There is some places to change in board code: template, email texts, edited by etc.

Any suggestions? I need such a functionality so I'd like to implement that.
well .. the first place to look would be the template sphene/community/_display_username.html ...

but.. your username is not necessarily your nickname... maybe there should be another option in the profiles to set your nickname ?
Hey, we have Signatures !!! Great, isn't it ? ;)
how about a 'display name' similar to 'email address' ? if it is not defined the first and second name is used (and if these aren't set the username) ?
Hey, we have Signatures !!! Great, isn't it ? ;)
how about a 'display name' similar to 'email address' ? if it is not defined the first and second name is used (and if these aren't set the username) ?
Hmm... not a bad idea but in this case I'd like 'display name' to be set by default to username. What do you think?
i guess it depends on the type of community .. so .. the right thing would probably be to make it configurable through SPH_SETTINGS if by default it should use login or first/last name .. ?
at least this can't be wrong :)
Hey, we have Signatures !!! Great, isn't it ? ;)
i have created a new issue for this enhancement: http://code.google.com/p/sct-project/issues/detail?id=106

if you start working on it, let me know .. otherwise i'll probably try to implement it in the next week or so :)
Hey, we have Signatures !!! Great, isn't it ? ;)
i have created a new issue for this enhancement: http://code.google.com/p/sct-project/issues/detail?id=106

if you start working on it, let me know .. otherwise i'll probably try to implement it in the next week or so :)

Hi!

I'm working on it. Here is the first effect of my work. This patch adds displayname field to community settings and makes it visible in a way you proposed above. There is no 'default value' functionality yet.

At the moment I wonder about "edit profile" page. There is a statement: Editing profile for: <name>. What should be the <name> here? What wouldn't be confusing for the users? Imo the clearest solution is to always show 'username' there.

regards
Attachments
I'm working on it. Here is the first effect of my work. This patch adds displayname field to community settings and makes it visible in a way you proposed above. There is no 'default value' functionality yet.
cool thanks :)

i guess the 'default value' shouldn't be too hard either .. ? i guess the behavior would be pretty similar to the one of the public email address.. (i guess it also modifies the help_text to reflect the behavior)

At the moment I wonder about "edit profile" page. There is a statement: Editing profile for: <name>. What should be the <name> here? What wouldn't be confusing for the users? Imo the clearest solution is to always show 'username' there.


hmm.. i think it's not that bad how it is currently - because now it displays the same thing users would see in the forum, wiki, etc..

so i would keep it this way..
Hey, we have Signatures !!! Great, isn't it ? ;)
i guess the 'default value' shouldn't be too hard either .. ? i guess the behavior would be pretty similar to the one of the public email address.. (i guess it also modifies the help_text to reflect the behavior)
Here I attach a patch which includes defaults for displayusername. However there are two or three issues:

1. I had to copy get_fullusername from sphutils to models.py because I wasn't able to import it. I'm getting:
    from sphene.community.sphutils import get_fullusername
ImportError: cannot import name get_fullusername

Strange. Maybe there is some circular import or something.

2. Caching issue. After you change displayusername in profile it is still read from cache in some places. I'm not sure how cache is used in SPH so any pointers will be helpful.

3. I have created SPH_SETTING parameter called: 'community_displayname_filled_with_username_or_fullname'. It can be set to 'username', 'fullname' or None (or anything which is neither username nor fullname). Any other preferences for that?
Attachments
Strange. Maybe there is some circular import or something.
yes, i guess there are some circular dependencies.. you gut put the import statement directly into the get_displayname_default function .. and not in module-level .. not nice, but a bit better than having the method in sphutils and models.

2. Caching issue. After you change displayusername in profile it is still read from cache in some places. I'm not sure how cache is used in SPH so any pointers will be helpful.


i guess you mean the authorinfo in the forum which is not updated ?

the cache is cleared through the post-save signals .. see sphene/sphboard/templatetags/sphboard_extras:

dispatcher.connect(clear_authorinfo_cache,
                   sender = User,
                   signal = signals.post_save)


when the display name is changed.. is the user object itself ever saved ? it should be i guess ?

3. I have created SPH_SETTING parameter called: 'community_displayname_filled_with_username_or_fullname'. It can be set to 'username', 'fullname' or None (or anything which is neither username nor fullname). Any other preferences for that?


i think that's perfect for now .. could you please add the allowed values in the comments to the option in sphsettings.py ?


thanks for your efforts !
herbert
Hey, we have Signatures !!! Great, isn't it ? ;)

Page: 1 2 3 4 Next

Please login to post a reply.



Powered by Sphene Community Tools