Kunena 6.4.8 Released

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 User Information: intergation Kunena and Mighty Registration

More
14 years 11 months ago #83161 by rinokua
Hello.
Let's discuss this peace of code (intergation Kunena and Mighty Registration)

this is function for making avatar
Code:
function generateAvatar( $user_id, $avatar=null, $k=null, $width=null, $height=null, $class=null, $target="_top" ) global $Itemid; $x = kunena_config::get_instance(); $db =& JFactory::getDBO(); if ($user_id == 0) return; $code = null; $juserini = parse_ini_file(JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_juser'.DS.'config.ini'); if (file_exists(JPATH_SITE.DS.$juserini['general::avatars_dir'].DS.$avatar.'.jpg')) { $avatar_path = JURI::root().DS.$juserini['general::avatars_dir'].DS.$avatar.'.jpg'; } else { return; } if ($x->mightyitemid !== "") { $x->mightyitemid = "&Itemid=".$x->mightyitemid; } $code = "<a href=\"".JRoute::_("index.php?option=com_community&controller=profile".$c->mightyitemid."&user_id=".$user_id)."\"><img src=\"".$avatar_path."\" width=\"".$c->avatarwidth."\" border=\"0\" alt=\""._ALTUSR."\" class=\"thumb".$k."\" /></a><br />";

this function we can use in Kunena's code in such manner (maybe :unsure: )
Code:
if (!isset($data->avatar)) { data->avatar = ''; } $photo->avatar = generateAvatar($data->user_id, $data->avatar);

advices from more professional people needing

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

More
14 years 11 months ago #83545 by Sergey Romanov
I cannot understand your question. What in particular you need. What discuss?

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

More
14 years 11 months ago #83909 by rinokua
I need link in Kunena forum to Mighty Touch user profile. With avatar support of course.

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

More
14 years 11 months ago - 14 years 11 months ago #84050 by Sergey Romanov
The working code should looks something like this
Code:
function generateAvatar($user_id, $avatar = null, $k = null, $width = null, $height = null, $class = null, $target = "_top") { global $Itemid; $avatar_path = getAvatarPath($user_id); $x = kunena_config::get_instance(); if($x->mightyitemid !== "") { $x->mightyitemid = "&Itemid=" . $x->mightyitemid; } if($user_id) { $profile = JRoute::_("index.php?option=com_community&controller=profile" . $x->mightyitemid . "&user_id=" . $user_id); $code = sprinf('<a href="%s"><img src="%s" width="%d" border="0" alt="%s" class="thumb%s" /></a><br />', $profile, $avatar_path, $x->avatarwidth, _ALTUSR, $k); } else { $code = sprinf('<img src="%s" width="%d" border="0" alt="%s" class="thumb%s" /><br />', $avatar_path, $x->avatarwidth, JText::_('Anonymous'), $k); } } function getAvatarPath($uid) { $avatar = JURI::root() . 'components/com_juser/images/default_avatar.png'; if(!$uid) { return $avatar; } $user = &JFactory::getUser($uid); $username = $user->get('username'); jimport('joomla.filesystem.file'); $ini = JFile::read(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_juser' . DS . 'config.ini'); $params = new JParameter($ini); $path = $params->get('general::avatars_dir'); $path = $path . '/' . $username . '.jpg'; if(JFile::exists(JPATH_ROOT . DS . $path)) { return JURI::root() . $path; } else { return $avatar; } }
Last edit: 14 years 11 months ago by Sergey Romanov.

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

More
14 years 11 months ago #84439 by Sergey Romanov
The following user(s) said Thank You: rinokua

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

More
14 years 11 months ago #84720 by rinokua
Yes, of course, Sergey. I'm still trying to combine your code with Kunena.
Have a idea to replace some of other integration (JS or AUP) with Touch profile link and avatar - to make a temporary hack. Any help from Kunena community will be thankful. I need to know places where putting "profile link and avatar image" code will give a result.
Sergey, can I ask you about private messaging in Mighty Touch? Your support center
( www.mightyextensions.com/knowledge-base/faq/list/answers ) is offline in my internet node now. So I found this in com_jsinbox.1.0.4(php5)\com_jsinbox\site\views\inbox\tmpl\default.php
Code:
$link = JURI::root()."index.php?option=com_jsinbox&controller=inbox&task=compose&context=draft&view=compose&stored_msg_id=".$msg->msg_id.( JRequest::getVar( "Itemid" ) ? "&Itemid=".JRequest::getVar( "Itemid" ) : "" );
it produced interesting link in my browser:
index.php?option=com_jsinbox&task=compose&type_id=1&Itemid=141&to=admin&return=aHR0cDovL3ZhcGVycy5ydS9pbmRleC5waHA/b3B0aW9uPWNvbV9jb21tdW5pdHkmdmlldz1ncm91cHMmbGF5b3V0PWRlZmF1bHQmY2F0ZWdvcnlfaWQ9MSZJdGVtaWQ9MTM1
can I try use more simple command? like this:
Code:
$link = JURI::root()."index.php?option=com_jsinbox&controller=inbox&amp;task=compose&amp;context=draft&amp;view=compose&amp;stored_msg_id=1&amp;Itemid=".JSINBOX_Itemid;
Sorry for my later response.

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

Time to create page: 0.330 seconds