Support

  1. schuster.tobias
  2. Features Request
  3. Wednesday, December 06 2017, 08:31 AM
Hello I use easy profile and Kunena Forum. In our Forum the most users have created a signature. It was shown in the Forum but it can not be edited. Is it possible to integrate a field with the Kunena Signature in easy Profil?
admin Accepted Answer
Admin
Hi,
sorry for late reply, unfortunately the Kunena - Easy Profile plugin does not allow this and this is not developed by us.

to make something like this you need to develop a small plugin by following these steps:
- Create a Easy Profile field called "Signature" (type: Textarea), alias should be "signature"
- Download, Install and Enable out Skeleton Plugin (you can find it at the end of page at http://docs.easy-profile.com/index.php/article/triggers)
- Open file /plugins/jsn/skeleton/skeleton.php
- Remove Sample Functions: triggerFieldAvatarUpdate, triggerProfileUpdate
- Write a function like this:
public function triggerProfileUpdate($user,&$data,$changed,$isNew)
{
if($user->id && isset($data['signature'])){
$signature = $data['signature'];
$db = JFactory::getDbo();
$query = 'UPDATE #__kunena_users SET signature = '.$db->quote($signature). ' WHERE userid = '. (int) $user->id;
$db->setQuery($query);
$db->execute();
}
}


Now when you update the field called "Signature" then this function will copy the value also in Kunena table.

Docs about Easy Profile triggers at http://docs.easy-profile.com/index.php/article/triggers

NOTE: This code is not tested and not supported, this is only for example purpose
  1. more than a month ago
  2. Features Request
  3. # 1
schuster.tobias Accepted Answer
Hello and thanx for your reply. I tried your solution and it works. But I can`t import the existing Signatur in the EasyProfile field, is this right?
Only in this one direction, have I understood that correctly?
  1. more than a month ago
  2. Features Request
  3. # 2
admin Accepted Answer
Admin
Hi,
But I can`t import the existing Signatur in the EasyProfile field, is this right?
The fast way to do this is with an SQL query like:
UPDATE prefix_jsn_users SET signature = (SELECT signature FROM prefix_kunena_users WHERE userid = id);
Replace "prefix" with the prefix of your Joomla installation.

You can do this with a Database Tool like phpMyAdmin, normally all hosting provider provide you a tool like this.

IMPORTANT: I have tested this query in my dev environment without problems, but I recommend you to make a backup before.
  1. more than a month ago
  2. Features Request
  3. # 3
schuster.tobias Accepted Answer
Thank you very much!!!
  1. more than a month ago
  2. Features Request
  3. # 4
Störtebeker Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. Features Request
  3. # 5
sgower Accepted Answer
I have tried the above plugin and was able to get it to load but it does not work. Do I need to edit any of the script to make it work with my database?
  1. more than a month ago
  2. Features Request
  3. # 6
admin Accepted Answer
Admin
Hi @sgower,
and sorry for late reply.

You should change $data['signature'] with alias of your Easy Profile signature field, for example like $data['about_me'].
  1. more than a month ago
  2. Features Request
  3. # 7
sgower Accepted Answer
My alias for the Signature filed is 'signature'.

I installed the plugin again and now I am getting the following error when I open my website.
0
SYNTAX ERROR, UNEXPECTED 'PUBLIC' (T_PUBLIC), EXPECTING END OF FILE


If I disable the plugin or uninstall it the website returns to normal.
  1. more than a month ago
  2. Features Request
  3. # 8
sgower Accepted Answer
Content Protected
  1. more than a month ago
  2. Features Request
  3. # 9
admin Accepted Answer
Admin
My alias for the Signature filed is 'signature'.

I installed the plugin again and now I am getting the following error when I open my website.
0
SYNTAX ERROR, UNEXPECTED 'PUBLIC' (T_PUBLIC), EXPECTING END OF FILE


If I disable the plugin or uninstall it the website returns to normal.

I have already replied at https://www.easy-profile.com/support/kunena-integration-only-partial-works.html :D

Is there any way to link the two fields in MySQL backend under PHPAdmin?
No sorry :(
  1. more than a month ago
  2. Features Request
  3. # 10
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.