Keyword

Help! How to show usenames as authors of items and not REAL NAMES?

  • tidhar
  • tidhar's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 10 months ago #74815 by tidhar
All items published state the auther's real name instead of the username.
Same goes for comments and modules....

Is there a way change this?

Please advise, This is critical!
I can't just let everyone see all the users real names....
Please help, I've searched on the forums and could'nt find how to switch it...

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago #74816 by boho
I am facing the same problem. Please somebody to tell how to deal with this.

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #74817 by boho
Hey guys,
i'll tell you solution i found for this. In some files i have changed "name" with "username" and it works for my site.

The files are:
/YourHost/modules/mod_k2_login/tmpl/userblock.php line23
/YourHost/modules/mod_k2_content/helper.php line284
/YourHost/components/com_k2/templates/user.php line57
/YourHost/components/com_k2/templates/default/item.php line66,381,404
/YourHost/components/com_k2/templates/default/category_item.php line72
/YourHost/components/com_k2/models/item.php line270,387
/YourHost/components/com_k2/views/item/view.html.php line109,228,229,432,436,442

You have to look for "user->name" and replace with "user->username".

I hope this will help you...

Please Log in or Create an account to join the conversation.

More
14 years 2 days ago #74818 by Doc Chaos
USERNAMES INSTEAD OF NAMES FOR K2.3 HACK

The above hack is no longer working so here is the version I am using for K2.3, I'll use BoHo's presentation format, hope it helps all those that are stuck ...

In some files i have changed "name" with "username" and it works for my site.

The files are:
/YourHost/components/com_k2/helpers/route.php line57
/YourHost/components/com_k2/models/item.php line272,633
/YourHost/components/com_k2/models/itemlist.php line656
/YourHost/components/com_k2/sef_ext/com_k2.php line133
/YourHost/components/com_k2/views/item/view.html.php line132,277,278,533,537,543
/YourHost/components/com_k2/views/item/view.raw.php line122
/YourHost/components/com_k2/views/itemlist/view.feed.php line85,147
/YourHost/components/com_k2/views/itemlist/view.html.php line165,166(x2)
/YourHost/components/com_k2/views/itemlist/view.raw.php line163

/YourHost/components/com_k2/templates/user.php line22,52,56
/YourHost/components/com_k2/templates/default/item.php line66,68,392,397,425
/YourHost/components/com_k2/templates/default/category_item.php line71
/YourHost/components/com_k2/templates/default/latest.php line83,87

/YourHost/modules/mod_k2_content/helper.php line379
/YourHost/modules/mod_k2_login/tmpl/userblock.php line24,27
/YourHost/modules/mod_k2_tools/tmpl/authors.php line20,21,26
/YourHost/modules/mod_k2_users/tmpl/Default/default.php line21,22,27,28

You have to look for "user->name" and replace with "user->username" and "author->name" with "author->username" etc.

Hard to believe this is so hard to accomplish :( 17 files almost 40 edits (39!) and many hours of staring at code just to get an option that should have been default ... my only complaint for K2 though and now that I know what and where to edit, I can live with it ;)

This should be the FULL fix to including some lesser traveled parts of K2 if you have any trouble with it please post here and I'll try to help ...

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #74819 by Dave Marshall
Doc Chaos said:USERNAMES INSTEAD OF NAMES FOR K2.3 HACK
The above hack is no longer working so here is the version I am using for K2.3, I'll use BoHo's presentation format, hope it helps all those that are stuck ...

In some files i have changed "name" with "username" and it works for my site.

The files are:
/YourHost/components/com_k2/helpers/route.php line57
/YourHost/components/com_k2/models/item.php line272,633
/YourHost/components/com_k2/models/itemlist.php line656
/YourHost/components/com_k2/sef_ext/com_k2.php line133
/YourHost/components/com_k2/views/item/view.html.php line132,277,278,533,537,543
/YourHost/components/com_k2/views/item/view.raw.php line122
/YourHost/components/com_k2/views/itemlist/view.feed.php line85,147
/YourHost/components/com_k2/views/itemlist/view.html.php line165,166(x2)
/YourHost/components/com_k2/views/itemlist/view.raw.php line163

/YourHost/components/com_k2/templates/user.php line22,52,56
/YourHost/components/com_k2/templates/default/item.php line66,68,392,397,425
/YourHost/components/com_k2/templates/default/category_item.php line71
/YourHost/components/com_k2/templates/default/latest.php line83,87

/YourHost/modules/mod_k2_content/helper.php line379
/YourHost/modules/mod_k2_login/tmpl/userblock.php line24,27
/YourHost/modules/mod_k2_tools/tmpl/authors.php line20,21,26
/YourHost/modules/mod_k2_users/tmpl/Default/default.php line21,22,27,28

You have to look for "user->name" and replace with "user->username" and "author->name" with "author->username" etc.

Hard to believe this is so hard to accomplish :( 17 files almost 40 edits (39!) and many hours of staring at code just to get an option that should have been default ... my only complaint for K2 though and now that I know what and where to edit, I can live with it ;)

This should be the FULL fix to including some lesser traveled parts of K2 if you have any trouble with it please post here and I'll try to help ...

This worked like a dream!

Cheers
Dave

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #74820 by Doc Chaos
I've updated the process to K2 v2.4.1 in my blog here at getk2.org :)

community.getk2.org/profiles/blogs/usernames-instead-of-name...

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #74821 by Albert
I have dreamweaver, so I can search a folder "com_k2" and find "author->name" replace all with "author->username", and takes 3 seconds.

Does anybody know a free software that does the same thing?

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #74822 by william white
Try notepad ++
there are many free tools this is just one

iLLeT said:I have dreamweaver, so I can search a folder "com_k2" and find "author->name" replace all with "author->username", and takes 3 seconds.
Does anybody know a free software that does the same thing?

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #74823 by Albert
*facepalm* I forgot about notepad++ I used to use a lot. I've been spoiled with Dreamweaver.


William White said:Try notepad ++ there are many free tools this is just one

iLLeT said:I have dreamweaver, so I can search a folder "com_k2" and find "author->name" replace all with "author->username", and takes 3 seconds. Does anybody know a free software that does the same thing?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum