Map data from any database table to EB custom fields

  • Patrick
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 year 10 months ago - 1 year 10 months ago #158471 by Patrick
Hello

EB comes with a plugin that allows to map user custom fields to EB custom fields.

In my case I need the possibility to map the content from another database table to EB custom fields.

Example:
I have EB custom field "Hobby".
In database table "user_special_data" there are two columns: UserID and HOBBY.

Now I want map EB field "Hobby" with column "HOBBY" = if the user is logged in, for this user the value from column "Hobby" gets loaded into EB field "Hobby".

Is there such Plugin? If not it would be a great idea to have such one. This way in EB it's not only possible to map user custom fields, instead it's possible to map fields/columns  from any DB table.

Thanks.

Patrick
Last edit: 1 year 10 months ago by Patrick.

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

More
1 year 10 months ago #158472 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Map data from any database table to EB custom fields
Hi Patrick

Unfortunately, there is no plugin like that available. This is a special requirement and not being supported by our extension, so you will need to develop a plugin if you want that behavior

The plugin could be build base on user profile plugin comes with the extension. That plugin need to implement onGetProfileData method and return $data array to allow populating data

Tuan
The following user(s) said Thank You: Patrick

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

  • Patrick
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 year 10 months ago #158478 by Patrick
Hi Tuan

Thanks a lot for your information and technical suggestions. I will continue on this.

Patrick

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

More
1 year 10 months ago #158479 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Map data from any database table to EB custom fields
OK Patrick. Good luck with the development

Tuan

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

More
1 year 9 months ago #159285 by OTWD
Hi Patrick did you get any further with this? I would be interested.
Thanks

Success consists of going from failure to failure without loss of enthusiasm.

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

  • Patrick
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 year 9 months ago #159314 by Patrick
Hi

No, I did not go any further yet, because the extra DB table might not be needed. Still checking technical requirements. In case I will go on with it, I will let you know.

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

More
1 year 9 months ago #159325 by OTWD
You should check this
joomdonation.com/forum/events-booking-ge...e-clause.html#159292
except the query shown wont work because id is not equal to [user_id] but you get the idea.
This query works for example in a sql field:
SELECT id AS value, name AS text FROM #__users WHERE id = [USER_ID]

Success consists of going from failure to failure without loss of enthusiasm.
The following user(s) said Thank You: Patrick

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

Moderators: Tuan Pham Ngoc