×
Kunena 5.1.15 Released (27 Oct 2019)

The Kunena team has announce the arrival of Kunena 5.1.15 [K 5.1.15] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1.

× Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Solved Usernumber in "post profile"

More
8 years 9 months ago #1 by SDK1198R
In previous Kunena versions we've been able to show usernumber in the "post profile" (to the right in each post). This was done by adding the code below to: "components/com_kunena/template/default_ex/message.php"

<?php
{
echo '#'.$userinfo->username;
}
?>


We've figured out it's the file "components/com_kunena/template/default/view/profile.vertical.php" that needs to be edited. This gives the name of the user:

<li class="kpost-username">
<?php echo CKunenaLink::GetProfileLink ( intval($this->profile->userid), $this->escape($this->username) ); ?>
</li>


How do we get the field "username" from tabel "_user"?

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

More
8 years 9 months ago #2 by sozzled
G'day, SDK1198R, and welcome to Kunena.

I'm not quite sure why you want to find the user "number" but that's your business. I don't know the precise information that will answer your question, either, but it would help to know what version of Kunena you are describing. Can you please give us that information? Thanks.

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

More
8 years 9 months ago #3 by SDK1198R
The earlier version I'm talking about is 1.5.12 (first example of code). We're now trying to get this to work in Kunena 1.6.3.
This code takes data from "_kunena_messages":

<li class="kpost-username">
<?php echo CKunenaLink::GetProfileLink ( intval($this->profile->userid), $this->escape($this->username) ); ?>
</li>

How do we get the field "username" from tabel "_user"?

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

More
8 years 9 months ago #4 by severdia
You might try something like:
<li class="kpost-usernum">
<?php echo intval($this->profile->userid); ?>
</li>

Add it underneath the line you pasted above.

Author of Using Joomla from O'Reilly Media. | www.usingjoomlabook.com

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

More
7 years 6 months ago - 7 years 6 months ago #5 by SDK1198R
Great! This did the trick:

<li class="kpost-usernum">
#<?php echo intval($this->profile->username); ?>
</li>

The actual "member number" is sort of "holy" in the Swedish Ducati Club (the lower the number is the longer you've been a member).

Thanks!
Last edit: 7 years 6 months ago by sozzled. Reason: Change topic icon

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.134 seconds