- Posts: 8
- Thank you received: 0
Kunena 6.3.0 released
The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3
This category may also contain a few topics relating to K 1.6 that may have been moved here possibly by mistake.
The topics in this category are for historical interest only. Owing to the structural differences between K 1.6 and K 1.7, the ideas in these topics may not work with later versions and, for that reason, the topics are locked.
Question Kunena and JomSocial. And the signature?
sababer9 wrote: Hey guys,,
Studies few earlier messages in this post for the same requirement, the signautre integration with jomsocial. I think you ppl have got the solution with a plugin may be.
in the meantime, i built up my own solution, thought it might help anyone there.
Its an extra field in jomsocial which picks and puts signature in kunena table with following code.
// no direct access
defined('_JEXEC') or die('Restricted access');
class CFieldsForumSignature
{
function getFieldHTML( $field , $required )
{
$config =& CFactory::getConfig();
$js = '/assets/validate-1.5';
$js .= ( $config->getBool('usepackedjavascript') ) ? '.pack.js' : '.js';
CAssets::attach($js, 'js');
// If maximum is not set, we define it to a default
$field->max = empty( $field->max ) ? 200 : $field->max;
$loggedInUser =& JFactory::getUser();
$userid = JRequest::getVar('userid',$loggedInUser->id,'get');
$db =& JFactory::getDBO();
$query = "SELECT signature FROM #__kunena_users WHERE userid = $userid";
$db->setQuery($query);
$field->value = $db->loadResult();
$class = ($field->required == 1) ? ' required' : '';
CFactory::load( 'helpers' , 'string' );
$html = '<textarea id="field' . $field->id . '" name="field' . $field->id . '" class="jomTips tipRight inputbox textarea' . $class . '" title="' . $field->name . '::' . CStringHelper::escape( $field->tips ) . '">' . $field->value . '</textarea>';
$html .= '<span id="errfield'.$field->id.'msg" style="display:none;"> </span>';
$html .= '<script type="text/javascript">cvalidate.setMaxLength("#field' . $field->id . '", "' . $field->max . '");</script>';
return $html;
}
function isValid( $value , $required )
{
if( $required && empty($value))
{
return false;
}
$loggedInUser =& JFactory::getUser();
$userid = JRequest::getVar('id',$loggedInUser->id);
$db =& JFactory::getDBO();
$query = "UPDATE #__kunena_users SET signature ='$value' WHERE userid = $userid";
$db->setQuery($query);
$db->query();
return true;
}
}
Regards,
The signature from jomsocial
Just 1 thing. This works perfectly but you forgot something.
Do not forget to put the following in front off the code above.
Then it all works fine!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Installed version: Kunena 1.5.14
js 2.2.0
Please Log in or Create an account to join the conversation.
Joomla! Version Joomla! 1.6.3 Stable
Installed version: Kunena 1.6.4
We do have an extra field in the profile, but the signature does not appear in Kunena
i've tried with <?php at beginnen, ?> at the end...
all dont work
-edit-
It's puttin the info in: jos_community_fields_values
even when you change
$query = "SELECT signature FROM #__kunena_users WHERE userid = $userid";
to
$query = "SELECT signature FROM jos_kunena_users WHERE userid = $userid";
Please Log in or Create an account to join the conversation.
Hi,
You have to follow these steps:
1. This code is to be added in a new file "forumsignature.php" created in /components/com_community/libraries/fields.
2. Edit the file "customfields.xml" and add new field tag:
<field>
<type>forumsignature</type>
<name>Forum Signature</name>
</field>
3. Now go into backend menu Components -> Jomsocial -> Custom Profiles -> New Field
4. Select "Forum Signature" and you are done.
Regards
tuumke wrote: JomSocial Version: 2.2.2
Joomla! Version Joomla! 1.6.3 Stable
Installed version: Kunena 1.6.4
We do have an extra field in the profile, but the signature does not appear in Kunena
i've tried with <?php at beginnen, ?> at the end...
all dont work
-edit-
It's puttin the info in: jos_community_fields_values
even when you change
$query = "SELECT signature FROM #__kunena_users WHERE userid = $userid";
to
$query = "SELECT signature FROM jos_kunena_users WHERE userid = $userid";
Please Log in or Create an account to join the conversation.
Hence, the <?php story
I've added the My Kunena Menu or something, so people can edit there forum signature for now, but i'd like it to be in the normal profile menu.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
i've tried with
$query = "SELECT signature FROM #__kunena_users WHERE userid = $userid";
to
$query = "SELECT signature FROM jos_kunena_users WHERE userid = $userid";
but it still takes it from jos_community_fields_values and also puts it in there.
With the my kunena toolbar for jomsocial, you can edit your forum profile, which does show the
signature. So i think it might be in the query somehow.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.