Username or Real Name

Permalink 1 user found helpful
This bother me..
post by admin >> something not common here
or
post by DelPiero >> cannot add space

is should be :
post by Del Piero >> admin real name, nice look :)

to accompolish that i add real_name to user attribut
so what we gone do next?
change all output 'admin' to real name. where must change?
1. /profile/view.php
2. /profile/members.php
3. /profile/friends.php
4. /profile/messages.php
5. blog_type.php

all of them echo the username.

another thing is, you cannot get search result by this real name
example : if you want result 'all post by Del Piero' and type 'Del Piero' as key word, the search block will get no result.

if you want the result 'all post by Del Piero', you must add this real name attribut to page attribut too, and check Content included in sitewide page search index.
yes, there is page attribute and and user attribut, they are different but strore in the same table

but again you cannot add the same attribut key. it will throw error
http://www.concrete5.org/community/forums/customizing_c5/fatal-erro...

change name like 'contributor' or 'poster'
and you must add this every time you add page, so search block will find it

beware if member edit his real name in edit profile, she will ask why all my name post not change?
you make sure update page attribut real name/contributor/poster too

sorry if you dont understand what i'm talking about, really clumsy with englis :)

well thats is just my testimony, after several week full throtlle with c5

maybe another someone have best solution than mine.

fastcrash
View Replies:
frz replied on at Permalink Reply
frz
im guessing you're talking about use with the Discussion Forums add-on? Or
is this the user name used elswhere?

best wishes

Franz Maruna
CEO - concrete5.org
http://about.me/frz
fastcrash replied on at Permalink Reply 1 Attachment
fastcrash
thanks frz,
it's the username when we install c5, there is username field there. why not add real name field too? integrated it with search block.

please see the image attachment, is not better to change admin(username account login) with his real name and better for security since it's used for login.
frz replied on at Permalink Reply
frz
I see what you're saying. Yes. Interesting.
Mnkras replied on at Permalink Reply
Mnkras
I was thinking about this a while back, there would be a default attribute called Display Name along with the normal username field, it would be an option to enable.
fastcrash replied on at Permalink Reply
fastcrash
yes Mnkras, that would be nice, and it would more very nice if can bind to sitewide page search index too.
spjuphigh replied on at Permalink Reply
spjuphigh
I completely agree! Especially necessary on corporate sites. (I'm actually trying to figure out a way around this for three clients right now!) I'm finding most business-oriented users (especially executives) aren't thrilled with the notion of being referred to on their profile page and elsewhere on the site (like on blog posts and in discussions) as something other than their actual name - especially considering the "no spaces or punctuation" restriction. I see a clear need for a "real name" attribute with the ability to accept (and this is where it gets tricky) spaces, periods (for middle initials), apostrophes (for names like O'Connor), and hyphens (for names like David Smith-Jones).

Any chance this could be done? I think it would go a long way toward improving C5's penetration into the corporate market.
cannonf700 replied on at Permalink Reply
cannonf700
Check out the ProBlog package.
Chad has added this ability which works with search results as well. His ProBlog also allows admin to type a blog and independently set it's author... which is also a very nice feature!
fastcrash replied on at Permalink Reply
fastcrash
i do this in header_required.php, so it will avalaible in all your theme, single page, etc
if(isset($c->uID)){
   $db = Loader::db();
        // you must add real_name atribut before in user atribut
   $sql = "select ak_real_name from UserSearchIndexAttributes where uID = ? limit 1";
   $vals = array($c->uID);
   $res = $db->execute($sql, $vals);
   $pg = $res->fetchRow();
   $GLOBALS['postBy'] = $pg['ak_real_name'];
}

and then change the echo 'username' in all pages, like profile(view, about, message, member, etc), blog_type, page_list, etc with $GLOBALS['postBy'], it should be available.

but still you cannot search by postBy, because its user attribut, not page attribut. you must add new attribut in page attribut like real_name_page, and harcode it. check the sitewide search.

the disadvantage is if member change his real name in profile, it should change the real name in page attribut too. i'm not gone that far yet.

i dont know if ProBlog have this feature. if has, maybe you should take it to save your time.


fast-cgi
Shotster replied on at Permalink Reply
Shotster
> but still you cannot search by postBy, because its user attribut, not page attribute.
> you must add new attribut in page attribut like real_name_page, and harcode it.

I might be misunderstanding the issue. Are you saying that your are storing redundant data - i.e. both a user attribute and page attribute having the same value - just so that you can search for pages owned by a particular user?

-Steve
fastcrash replied on at Permalink Reply
fastcrash
hi shot,
the purpose to add real_name in page attribut was for search, so the search function can search pages by a particular user. just now, thats the only way i know via GUI.

the purpose to add real_name in user attribut was for change username with real name poster.

but as far as i experience it, you cannot add the same attribut handle, make it different, real_name_in_userAtr or real_name_in_pageAtr or it will give you error like link above in 1rst post.

yes it redundant data. maybe you can change value real_name_in_pageAtr by userID, but it will not match with search keyword, thats why it's hardcode


sorry if you a bit confuse about the issue, you know.. :)
Shotster replied on at Permalink Reply
Shotster
Ok, thanks for the clarification. So it seems there are two issues:

1) You'd like to display something besides username throughout the site wherever username is normally output.

2) You'd like for site visitors to be able to search for all pages/posts owned by a particular user. (Or are you saying you just want admins to be able to do this via the dashboard?)

For number 1, I think Mnkras is on the right track. Or maybe instead of a specific predefined attribute, why not allow any user-defined attribute to be used in place of username? Just allow admins to make the association via the dashboard.

For number 2, it doesn't sound like searching is the best approach. What if you want to find all posts by Jack Smith, but Jane Doe happens to mention "Jack Smith" in her post. With a keyword search, you're going to get Jane's post as well. Why not implement something that does exactly what you want - i.e. returns all pages/posts for a particular user?

-Steve
fastcrash replied on at Permalink Reply
fastcrash
> For number 2

yes, it's make a sense. and search function mechanism core is quite complex,
i will leave it as is then, it's not so urgent right now. and i'm still not looking it more deep, since myhand is busy with another feature of c5


best regards.
ccowper replied on at Permalink Reply
I am sorry I am not very well versed in code, but how do I access header_required.php

Thanks
TheRealSean replied on at Permalink Reply
TheRealSean
A year and a bit on has this changed?, it is possible to search via a user attribute now?

Or is this still best done via a page attribute assigned to say a blog post.
jshannon replied on at Permalink Reply
jshannon
One of my newer addons delegates to an element. So it'll show the display name unless there's an element called "user", in which case it'll pass that the UserInfo and let it return whatever it wishes.

That doesn't solve page searching, but that could be accomplished with an event.

I wonder..... How necessary are the username validation rules? Even keeping the unique one, I don't think no-spaces is that necessary. If you could update this directly with the display name, it would solve this, and maybe feed through to page search.
jshannon replied on at Permalink Reply
jshannon
I just came across this thread as I was looking for a "best practice" solution.

I'm really surprised it hasn't come up before. It seems half the sites have some combination of full_name or first_name + last_name, and then have to use those throughout the system. On of my published addons, for example, looks for first + last and uses that, or defaults to the username.

I'm not a fan of the idea of a core solution to this as described below because my current project requires first + last. Of course, I guess I could store in separate attributes and then combine on update.

Just saying this is important, should be in the core, but requires a bit of thought.

James