Username or Real Name
Permalink 1 user found helpfulpost 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.
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.
Any chance this could be done? I think it would go a long way toward improving C5's penetration into the corporate market.
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!
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
> 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
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.. :)
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
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.
Thanks
Or is this still best done via a page attribute assigned to say a blog post.
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.
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
is this the user name used elswhere?
best wishes
Franz Maruna
CEO - concrete5.org
http://about.me/frz