The Kunena team has announce the arrival of Kunena 6.4.8 [K 6.4.8] in stable which is now available for download as a native Joomla extension for J! 5.0.x/5.1.x/5.2.x/5.3.x/5.4.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 6.4 Important note: Go to the Kunena Dashboard after an upgrade so that the Kunena database tables are also updated. This is particularly necessary for major version jumps so that the table changes are adapted.
This category contains miscellaneous, uncategorised user contributions, (templates, modules, plugins and hacks) relating to older versions of Kunena that are no longer supported.
The topics in this category are for historical interest only. Owing to the structural changes that occurred in K 1.7, many of the ideas in these topics will not work with later versions and, for that reason, the topics are locked.
Question
Modify source code to display fields from community builder [CB]
I was able to hack the source code of Kunena 1.5 to display user's phone number in the forum using the signature function. However, I do not know how to modify the source code of Kunena 1.6 to have the same effect.
Can anybody help? Below is my reference source code for Kunena 1.5.
a) components/com_kunena/template/default_ex/view.php - Line 502:
Modified code to link kunena user to cb profile:
// Join comprofiler table with fb table -
$kunena_db->setQuery("SELECT a.*, b.id, c.phone, b.name, b.username, b.gid ".
"FROM #__fb_users AS a " .
"JOIN `#__comprofiler` AS c ON a.userid = c.id " .
"LEFT JOIN #__users AS b ON b.id=a.userid WHERE a.userid='{$fmessage->userid}'");
b) components/com_kunena/template/default_ex/message.php - Line 420:
// Replace with signature function -
<?php
// Modified code to display phone [using the forum signature function]
$phone = $userinfo->phone;
echo $phone;
?>
Last edit: 14 years 10 months ago by beyond. Reason: simplify
I was trying to modify the codes below but not successful, perhaps you can guide me a little more? I am trying to join a sobi2 table now instead of comprofiler.
/funcs/view.php - Line 473
$query = "SELECT a.*, b.*, s.itemid, modified.name AS modified_name, modified.username AS modified_username
FROM #__kunena_messages AS a
LEFT JOIN #__kunena_messages_text AS b ON a.id=b.mesid
LEFT JOIN #__users AS modified ON a.modified_by = modified.id
LEFT JOIN #__sobi2_item AS s ON s.owner = modified.id
WHERE a.thread={$this->db->Quote($this->thread)} AND {$where}
ORDER BY id {$this->ordering}";
/template/default/view/message.php - Line 117
$itemid = $this->posts->itemid;
echo $itemid;
*Do I need to declare $itemid somewhere?