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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
8 years 1 day ago #290539 by krileon
Replied by krileon on topic CB and EasyBlog
I really do not suggest doubling your storage size for canvas images. You are significantly better off finding a way to integrate the two. Typically it should be a EasyBlog plugin that would do this. It'd load CB API then load in the canvas field for that user using getFields API. If you still want to copy the files over then yes a Code action with Method set to PHP.


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.

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

7 years 11 months ago #290637 by brockhaslam
Replied by brockhaslam on topic CB and EasyBlog
I'll see if I can find something for EB that does that.

In the mean time, can you please tell me

- Does [user_id] work the same way in a 'code' as it does in a 'query'?
- If I'm using the 'code' type for PHP do I still need <?php ?> tags? - any time I include them I just get a 500 error
- If I have echo on for a PHP where does this echo on a onAfterUserProfileSaved? - I'm using the echo command in my script and seeing nothing on the page
- If I have Debug turned on, where does the data dump to?
- If I'm doing a 'query' and a 'code' both on onAfterUserProfileSaved, do I need Reload User turned on?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
7 years 11 months ago - 7 years 11 months ago #290655 by krileon
Replied by krileon on topic CB and EasyBlog

- Does [user_id] work the same way in a 'code' as it does in a 'query'?

Yes, but you need to treat all substitutions as stings. So be surround to surround it with quotes. Example as follows.

Code:
$userId = (int) '[user_id]';

Also worth mentioning you've access to $user object directly in your PHP code. $vars contains an array of all the variables sent to the trigger and is also available.

- If I'm using the 'code' type for PHP do I still need <?php ?> tags? - any time I include them I just get a 500 error

You do not supply php tags. PHP in a Code action is executed using an anonymous function.

- If I have echo on for a PHP where does this echo on a onAfterUserProfileSaved? - I'm using the echo command in my script and seeing nothing on the page

No where. There's a redirect right after that trigger so any output from your code will never be seen.

- If I have Debug turned on, where does the data dump to?

For auto actions it's a var_dump when something fails.

- If I'm doing a 'query' and a 'code' both on onAfterUserProfileSaved, do I need Reload User turned on?

If you want the second action to be aware of changes to the user object from the first action then the section action needs reload user.


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.
Last edit: 7 years 11 months ago by krileon.

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

Moderators: beatnantkrileon
Powered by Kunena Forum