Keyword

How to show username in comments and real author name in articles?

More
14 years 3 months ago #81098 by DKcrm
Christoffer Müller said:Hi all - and thank you all for your help in this matter...
It seems to be working now, following the solution given above.. It took some time figuring out which bit of code to change as there were 3 statements like 'echo $comment->userName;' following each other..

If others wants the same change, the item.php (in my case) file is located under [J!installation]/templates/[your template folder]/html/com_k2/templates/default/
- the bit of (working) code looks like the attached picture

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

More
13 years 10 months ago #81099 by Deborah Nix
Just to confirm the solutions by Lefteris Kavadas and Christopher work perfectly. Thanks

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

More
13 years 3 months ago #81100 by Ivor Middleton
This would be a really great addition.  I'm quietly going nuts trying to deliver on the promise of anonymity for commenters.  Is there a chance this will be in an update , please ?

 

JoomlaWorks said:

This is something that can be added on your Joomla! template really, in the place where you override the MVC template of the module. We'll add it in 2.4 as an option on mod_k2_comments ;)

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

More
13 years 2 weeks ago #81101 by Andy Connell
I have this working too, Thanks

 

Though using 2.4.1 and cant see it as a setting in the back as suggested in fotis's post

Also for anyone else interested, I use the comments module, this too needs changing if you want to display the username.

 

I searched for "written by" and changed the same piece of code below it.

 

Found in modules/mod_k2_comments/tmpl/comments.php

 

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

  • John-Eilif Eliassen
  • John-Eilif Eliassen's Avatar
  • Offline
  • New Member
More
12 years 11 months ago #81102 by John-Eilif Eliassen
Could someone please add a comment with the most recent fixes to this issue? I allso would love it if mod_k2_content would display usernames instead of names. Is this an option? And how could i achieve the author name to link to jomsocial profile instead of k2 user? I need to echo the author userID in the mod_k2_content but i dont know how.

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


Powered by Kunena Forum