Use the Name instead of Username in Vote/Comment

  • Posts: 50
  • Thank you received: 1
12 years 9 months ago #45443

Hi,

In the vote/comment system, I would like to know how to display the commenter's Name instead of the Username.

For example, if my Joomla account is registered under the following- Name: Ricky L, Username: ricky8888

I want the Ricky L to appear as the commenter's name in the vote/comment system rather than the ricky8888. Any way to do this?

Thanks.

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

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 9 months ago #45573

Hi,

For that , you will have to change the code:
vote_user_id,vote_comment,username,vote_id,vote_useful,vote_pseudo,vote_rating

to:
*

in the file components/com_hikashop/views/vote/view.html.php

and the code:
echo $elt[$i]->username;

to:
echo $elt[$i]->name;

in the file "listing" of the view "vote" of your front end template via the menu Display->Views.

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

  • Posts: 50
  • Thank you received: 1
12 years 9 months ago #47336

Hi Nicolas,

Thanks for the tip.

I've added another 'name' into /components/com_hikashop/views/vote/view.html.php:
- Add "name" to $query.
- Add "$elts[$i]->name = $hikashop_vote->name;"

Somehow it works as well. Now, the voting commenter name is showing.

Thanks.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum