- Posts: 214
COMMUNITY FORUM
display comment author username not name
- George Nasis
- Topic Author
- Offline
- Elite Member
Less
More
10 years 1 month ago #132325
by George Nasis
Replied by George Nasis on topic Re: display comment author username not name
trully thank you for your respnse Krikor,
i did it.
i add $user = JFactory::getUser(); in the loop but know i have for every comment the same author..
it is so close to be done..any last advice?
thank you
i did it.
i add $user = JFactory::getUser(); in the loop but know i have for every comment the same author..
it is so close to be done..any last advice?
thank you
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #132326
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: display comment author username not name
You need to pass the userId agument like the example in the URL
eg:
where 99 is your userID
eg:
$user = JFactory::getUser(99);
where 99 is your userID
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- George Nasis
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 214
10 years 1 month ago - 10 years 1 month ago #132327
by George Nasis
Replied by George Nasis on topic Re: display comment author username not name
PERFECT!!!
IT WORKED!
$user = JFactory::getUser($comment->userID);
thank you very very much!
IT WORKED!
$user = JFactory::getUser($comment->userID);
thank you very very much!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #132328
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: display comment author username not name
You 're welcome George.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- George Nasis
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 214
10 years 1 month ago #132329
by George Nasis
Replied by George Nasis on topic Re: display comment author username not name
really do not misunderstand me and i already apologized if that i will say is offending you
i imagine that this line
<?php $user = JFactory::getUser($comment->userID); ?>
and this
<?php echo $user->username; ?>
was the answer of the very beginning of the forum.
Why didn`t you state that?i asked it because with too many responses you lost more time.
so two things i can imagine
1. it is my fault that from beginning i didn`t clear what i ask for
2. it is a policy of the administrators to search a little by themselves to understand how joomla,k2,php and tables are combining
:)
i repeat do not misunderstand me
really thank you anyway
best regards
i imagine that this line
<?php $user = JFactory::getUser($comment->userID); ?>
and this
<?php echo $user->username; ?>
was the answer of the very beginning of the forum.
Why didn`t you state that?i asked it because with too many responses you lost more time.
so two things i can imagine
1. it is my fault that from beginning i didn`t clear what i ask for
2. it is a policy of the administrators to search a little by themselves to understand how joomla,k2,php and tables are combining
:)
i repeat do not misunderstand me
really thank you anyway
best regards
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #132330
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: display comment author username not name
You have to understand that we are here to help a really large number of people here every day.
I asked the var_dump because it is quite frankly impossible to remember what each object in K2 contains. I also do not want to give any wrong answers.
I can assist you in custom parts of your projects but your (by your I mean the user's) participation is needed. It is impossible to search the DB or perform template overrides for each single request.
This is the difference between getting help over a free forum and hiring a developer.
I personally try to help each member of the forum and avoid the "Go hire a developer" answers but users have to keep in their mind that you are not receiving help over a free product and you (again replace you with the user) have not hired a dev for their custom project.
I Hope I did not bore you with my rant.
I asked the var_dump because it is quite frankly impossible to remember what each object in K2 contains. I also do not want to give any wrong answers.
I can assist you in custom parts of your projects but your (by your I mean the user's) participation is needed. It is impossible to search the DB or perform template overrides for each single request.
This is the difference between getting help over a free forum and hiring a developer.
I personally try to help each member of the forum and avoid the "Go hire a developer" answers but users have to keep in their mind that you are not receiving help over a free product and you (again replace you with the user) have not hired a dev for their custom project.
I Hope I did not bore you with my rant.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- George Nasis
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 214
10 years 1 month ago #132331
by George Nasis
Replied by George Nasis on topic Re: display comment author username not name
Absolutely you were not tiring. Your answer is really helpful and it was necessary.
I understand you 100% and we all really thank you for your effort and for your contribution here.
How can somenoe hire you ? :)
best regards!
I understand you 100% and we all really thank you for your effort and for your contribution here.
How can somenoe hire you ? :)
best regards!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #132332
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: display comment author username not name
Thanks George I really appreciate this.
Thank you for the request but at this point it would be unprofessional of me to offer commercial services from this forum.
However I can refer you to ideasencoded.gr/ which I can personally guarantee that she knows her way around K2. Trust me on this one :)
Thank you for the request but at this point it would be unprofessional of me to offer commercial services from this forum.
However I can refer you to ideasencoded.gr/ which I can personally guarantee that she knows her way around K2. Trust me on this one :)
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- George Nasis
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 214
10 years 1 month ago #132333
by George Nasis
Replied by George Nasis on topic Re: display comment author username not name
nice to hear that!
thanx once again Krikor!
best regards!
thanx once again Krikor!
best regards!
Please Log in or Create an account to join the conversation.
- Bart Coenen
- Visitor
10 years 1 month ago - 10 years 1 month ago #132334
by Bart Coenen
Replied by Bart Coenen on topic Re: [SOLVED] display comment author username not name
Nice that you found the solution (and a funny conversation :lol: ).
To me however it is not yet clear what to do to get this result. Can someone describe to me which lines in which file I have to alter?
To me however it is not yet clear what to do to get this result. Can someone describe to me which lines in which file I have to alter?
Please Log in or Create an account to join the conversation.