Pragmatism in code

If you use both JomSocial and kunena on your website and use Jomsocial to manage users profile data you would probably noticed that there is nowhere to edit the forum signature.

This quick mod will use the text entered into the 'About Me' field in the users Jomsocial profile as the kunena forum signature.

There is one file to edit


Open the file and find the following line

$this->signatureHtml = KunenaHtmlParser::parseBBCode ( $this->profile->signature, null, $this->config->maxsig );

Replace it with the following code

$userId = $this->message->userid;
$user =& CFactory::getUser($userId);
$data = $user->getInfo('FIELD_ABOUTME');
$this->signatureHtml = $data;

Thats it!

You could also use a custom field by simply substituting 'FIELD_ABOUTME' with the relevant field code from the JomSocial 'custom profiles' page.

Please also note that as this is a mod to change to core files it could be overwritten when you update Kunena. If the mod stops working simply re-apply it to the new file.