Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

CB and EasyBlog

8 years 1 week ago #290252 by brockhaslam
CB and EasyBlog was created by brockhaslam
I am currently using CB and EasyBlog including the published plugin to display EasyBlog articles in a CB profile tab.

However I would like to disable users ability to update their author profile on EasyBlog (easy enough to do in that system) and instead

- Push their CB canvas image across to be used as their EasyBlog profile pic
- Create a CB field for them to input their 'author bio' and push that across to EasyBlog

If anyone can give me any tips on how to achieve this I'd be most grateful.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
8 years 1 week ago #290283 by krileon
Replied by krileon on topic CB and EasyBlog
CB Auto Actions acting on the after user profile update and after user registration triggers can be used to push data from 1 extension to another either with API of that extension in a Code action using PHP method or a Query action using a database query. I've no idea how EasyBlog stores profile pictures, but it's unlikely to be as simply as pushing the value over to EasyBlogs. The CB field should be easy enough to push with your query though by substituting in the field.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: brockhaslam

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

8 years 1 week ago #290316 by brockhaslam
Replied by brockhaslam on topic CB and EasyBlog
I have found the two fields I need to update.



They're "avatar" and "biography" both in the table _easyblog_users

I've also figured out that the files in that "avatar" value are stored at /public_html/images/easyblog_avatar/

So I guess I need to push the file name to that field AND copy the file from wherever CB puts its canvas images to that directory?

I'll install those plugins later today and see what I can't break.
Attachments:

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

8 years 6 days ago - 8 years 6 days ago #290320 by brockhaslam
Replied by brockhaslam on topic CB and EasyBlog
So I got Auto-Action working for some other features that I wanted (very handy extension) but I am stuck with the PHP/query stuff. I know exactly what I need it to do, I just don't know how to put this into the right language

- Look up a user's profile image by getting the value of "canvas" from the database "_comprofiler"
- Copy that image from /public_html/images/comprofiler/ to /public_html/images/easyblog_avatar/
- Insert the name of that image into the value of "avatar" in the database "_easyblog_users" overwriting any value which is already there

ADDITIONALLY

- Look up a user's bio text by getting the value of "cb_backstory" from the database "_comprofiler"
- Insert that text (as plain text without tags) into the value of "biography" in the database "_easyblog_users" overwriting any value which is already there

Where can I turn for this kind of PHP coaching or support?
Last edit: 8 years 6 days ago by brockhaslam.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
8 years 6 days ago #290337 by krileon
Replied by krileon on topic CB and EasyBlog
Updating biography is easy enough with the below using a query action after user registration and user profile update. I assume in that table id column is their Joomla user id. If not then I've no idea how they're linking the two user tables.

Code:
UPDATE `#__easyblog_users` SET `biography` = '[cb_backstory]' WHERE `id` = '[user_id]'

You're on your own in regards to the images. I've no clue how easyblogs handles that, but looks like they only store the filename and the pathing is done internally which means it's unlikely you'll be able to synchronize that information without an actual integration plugin to it (just renders the image from CB) or if that column supports supplying the URL to the image.

Where can I turn for this kind of PHP coaching or support?

We do not provide either here. We can only provide you with simple examples. We do not provide coding assistance at all and is at supports leisure to do so (again, often just providing simple examples only).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: brockhaslam

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

8 years 4 days ago #290496 by brockhaslam
Replied by brockhaslam on topic CB and EasyBlog
Thanks that's perfect.

I also got the name of the image to copy across with
Code:
UPDATE `#__easyblog_users` SET `avatar` = REPLACE('[canvas]', 'http://oasisoftwoscimitars.com/images/comprofiler/', '') WHERE `id` = '[user_id]'

Now I simply need to copy the image from /public_html/images/comprofiler/ to /public_html/images/easyblog_avatar/

I'm guessing this will have to be a 'code' style command or a 'html' style commend in CB Auto Actions?

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

Moderators: beatnantkrileon
Powered by Kunena Forum